Skip to content

Prepare QCW Lima (from revision) #11

Prepare QCW Lima (from revision)

Prepare QCW Lima (from revision) #11

name: Prepare QCW Lima (from revision)
on:
workflow_dispatch:
workflow_call:
outputs:
lima_version:
description: "Lima version"
value: ${{ jobs.build.outputs.lima_version }}
gowsllinks_version:
description: "go-wsllinks version"
value: ${{ jobs.build.outputs.gowsllinks_version }}
alpine_version:
description: "Alpine version"
value: ${{ jobs.build.outputs.alpine_version }}
alpine_wsl_version:
description: "Alpine-WSL version"
value: ${{ jobs.build.outputs.alpine_wsl_version }}
env:
LIMA_GITURL: https://github.com/lima-vm/lima.git
LIMA_SHA: e911564e4a5f3151a3beef5ec2446914e016c745
LIMA_VERSION: dev
jobs:
# call-prepare-alpine-wsl:
# uses: ./.github/workflows/prepare-alpine-wsl-release.yml
# call-prepare-go-wsllinks:
# uses: ./.github/workflows/prepare-go-wsllinks-release.yml
build:
# needs: [call-prepare-go-wsllinks, call-prepare-alpine-wsl]
runs-on: windows-latest
steps:
- name: "Check WSL"
run: |
wsl --shutdown
Import-module -Name Appx -UseWindowsPowerShell
Add-AppxPackage https://github.com/microsoft/WSL/releases/download/2.4.9/Microsoft.WSL_2.4.9.0_x64_ARM64.msixbundle
wsl --version
# outputs:
# lima_version: ${{ steps.make_versions.outputs.lima }}
# gowsllinks_version: ${{ steps.make_versions.outputs.gowsllinks }}
# alpine_version: ${{ steps.make_versions.outputs.alpine }}
# alpine_wsl_version: ${{ steps.make_versions.outputs.alpine_wsl }}
# steps:
# - name: "πŸ—οΈ Install msys2"
# uses: msys2/setup-msys2@v2
# with:
# msystem: UCRT64
# update: true
# install: >-
# make git unzip base-devel mingw-w64-ucrt-x86_64-toolchain zip mingw-w64-ucrt-x86_64-go
# - name: "πŸ“ Configure checkout"
# run: git config --global core.autocrlf input
# - name: "πŸ“ Checkout"
# uses: actions/checkout@v4
# with:
# fetch-depth: 1
# - name: "πŸ›» Donwload artifacts"
# uses: actions/download-artifact@v4
# with:
# path: qcw-art
# - name: "πŸ“ Fetch sources"
# shell: msys2 {0}
# run: |
# mkdir lima-release
# cd lima-release
# git init
# git remote add origin $LIMA_GITURL
# git fetch --depth 1 origin $LIMA_SHA
# git checkout FETCH_HEAD
# patch --binary -l -p 1 < ../patches/lima/0001-Add-QEMU-driver-support-on-Windows-hosts.patch
# - name: "πŸ› οΈ Build Lima"
# working-directory: lima-release
# shell: msys2 {0}
# run: |
# cp -f ../qcw-art/qcw-go-wsllinks/go-wsllinks.exe ./contrib/bundle-wsl/go-wsllinks.exe
# make binaries add-bundles
# - name: "πŸ“¦ Pack Lima"
# shell: msys2 {0}
# run: |
# mkdir -p qcw
# mkdir -p qcw-tmp
# cp -r "lima-release/_output" qcw-tmp/lima
# cd qcw-tmp/
# zip -9 -r ../qcw/lima.zip .
# cd ../qcw
# find . -type f \( ! -iname "*.checksums" \) -exec sha256sum -b {} \; > sha.checksums
# find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums
# cat sha.checksums
# - id: make_versions
# name: "πŸ“Œ Export versions"
# env:
# GOWSLLINKS_VERSION: ${{ needs.call-prepare-go-wsllinks.outputs.gowsllinks_version }}
# ALPINE_VERSION: ${{ needs.call-prepare-alpine-wsl.outputs.alpine_version }}
# ALPINEWSL_VERSION: ${{ needs.call-prepare-alpine-wsl.outputs.alpine_wsl_version }}
# shell: msys2 {0}
# run: |
# echo "lima=$LIMA_VERSION-$LIMA_SHA" >> "$GITHUB_OUTPUT"
# echo "gowsllinks=$GOWSLLINKS_VERSION" >> "$GITHUB_OUTPUT"
# echo "alpine=$ALPINE_VERSION" >> "$GITHUB_OUTPUT"
# echo "alpine_wsl=$ALPINE_WSL_VERSION" >> "$GITHUB_OUTPUT"
# - name: "πŸš€ Upload artifact"
# uses: actions/upload-artifact@v4
# with:
# name: qcw-lima
# path: qcw