Skip to content

Commit

Permalink
Update Lima workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
arixmkii committed Feb 1, 2025
1 parent b136eaf commit 0d1a90f
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prepare-go-wsllinks-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
value: ${{ jobs.build.outputs.gowsllinks_version }}
env:
GOWSLLINKS_GITURL: https://github.com/arixmkii/go-wsllinks.git
GOWSLLINKS_SHA: 7a099c056aca088c41aa78c9ec15252df6dfd28a # v0.0.2
GOWSLLINKS_VERSION: 0.0.2
GOWSLLINKS_SHA: 7a099c056aca088c41aa78c9ec15252df6dfd28a # v0.0.3
GOWSLLINKS_VERSION: 0.0.3
jobs:
build:
runs-on: windows-latest
Expand Down
41 changes: 40 additions & 1 deletion .github/workflows/prepare-lima-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,29 @@ on:
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]
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
Expand All @@ -40,6 +50,24 @@ jobs:
uses: actions/download-artifact@v4
with:
path: qcw-art
- name: "🏗️ Install lima-infra"
shell: pwsh
run: |
wsl --set-default-version 2
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
wsl --install --from-file qcw-art/qcw-alpine/lima-infra.wsl
wsl -l -v
# workaround for oobe https://github.com/microsoft/WSL/issues/12398
- name: "✅ Check user"
shell: pwsh
run: |
cmd /c "start wsl -d lima-infra"
sleep 5
wsl -d lima-infra whoami
wsl -d lima-infra -u lima whoami
- name: "📝 Fetch sources"
shell: msys2 {0}
run: |
Expand All @@ -56,6 +84,13 @@ jobs:
run: |
cp -f ../qcw-art/qcw-go-wsllinks/go-wsllinks.exe ./contrib/bundle-wsl/go-wsllinks.exe
make binaries add-bundles
- name: "🧪 Test Lima WSL2"
working-directory: lima-release/_output/bin
shell: pwsh
run: |
.\limactl start template://experimental/wsl2
type C:\Users\runneradmin\.lima\wsl2\ha.stdout.log
type C:\Users\runneradmin\.lima\wsl2\ha.stderr.log
- name: "📦 Pack Lima"
shell: msys2 {0}
run: |
Expand All @@ -72,10 +107,14 @@ jobs:
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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-podman-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: "🏗️ Install Pandoc"
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install pandoc -y --force\
args: install pandoc -y --force
- name: "🏗️ Install WiX toolset"
run: dotnet tool install --global wix
- name: "📝 Configure checkout"
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/publish-qcw-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ jobs:
uses: ./.github/workflows/prepare-podman-release.yml
call-prepare-qemu:
uses: ./.github/workflows/prepare-qemu-release.yml
call-prepare-alpine-wsl:
uses: ./.github/workflows/prepare-alpine-wsl-release.yml
call-prepare-lima:
uses: ./.github/workflows/prepare-lima-release.yml
publish:
needs: [call-prepare-docker, call-prepare-podman, call-prepare-qemu, call-prepare-lima, call-prepare-alpine-wsl]
needs: [call-prepare-docker, call-prepare-podman, call-prepare-qemu, call-prepare-lima]
runs-on: ubuntu-latest
steps:
- name: "📝 Configure checkout"
Expand All @@ -42,8 +40,8 @@ jobs:
path: qcw
- name: "🗒️ Prepare release notes"
env:
ALPINE_VERSION: ${{ needs.call-prepare-alpine-wsl.outputs.alpine_version }}
ALPINEWSL_VERSION: ${{ needs.call-prepare-alpine-wsl.outputs.alpine_wsl_version }}
ALPINE_VERSION: ${{ needs.call-prepare-lima.outputs.alpine_version }}
ALPINEWSL_VERSION: ${{ needs.call-prepare-lima.outputs.alpine_wsl_version }}
DOCKER_VERSION: ${{ needs.call-prepare-docker.outputs.cli_version }}
DOCKER_COMPOSE_VERSION: ${{ needs.call-prepare-docker.outputs.compose_version }}
GOWSLLINKS_VERSION: ${{ needs.call-prepare-lima.outputs.gowsllinks_version }}
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Version bundled with Podman is used

#### `go-wsllinks`

Version `v0.0.2`. Rebuilt for Windows amd64 platform.
Version `v0.0.3`. Rebuilt for Windows amd64 platform.

#### `Lima`

Expand Down Expand Up @@ -204,8 +204,9 @@ docker compose up --wait

Donwload from release page `lima-infra` WSL distribution. If one was previously installed it should be first removed using command
`wsl --unregister lima-infra`. Install the new one by double clicking on the `.wsl` file or using command
`wsl --install --from-file lima-infra.wsl`. Don't rename the distribution - currently only predefined name `lima-infra` having
default user `lima` is supported.
`wsl --install --from-file lima-infra.wsl` (if one uses this, then it is important to open default shell with `wsl -d lima-infra`
for setup completion because of https://github.com/microsoft/WSL/issues/12398). Don't rename the distribution -
currently only predefined name `lima-infra` having default user `lima` is supported.

### Basics

Expand Down

0 comments on commit 0d1a90f

Please sign in to comment.