Prepare QCW Lima (from revision) #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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: "ποΈ Install lima-infra" | |
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 | |
dir qcw-art | |
dir qcw-art/qcw-alpine | |
wsl --install --from-file qcw-art/qcw-alpine/lima-infra.wsl | |
wsl --list | |
- 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 |