Build, test and release the Windows build in CI
- ci/windows-ci.sh is the one definition of every Windows step (toolchain, clippy, build, tests and UI self-test under Wine, packaging, test bundle); verify, release and next only call it. - release.yml: a windows job builds, tests and packages alkane-toolkit-vX.Y.Z-windows-x86_64.zip; the release job waits for it and attaches the zip next to the Linux tarball. next.yml does the same for -rc candidates, verify.yml runs the Windows gates on PRs. - windows-native.yml (advisory, never gates a release) runs main's cross-built unit tests and UI self-test on real Windows 11 through the self-hosted VM runner (label alkane-windows). - CI image: ci/images/alkane-ci.Dockerfile layers mingw-w64, Wine with a ready prefix, the rustup target and a prebuilt wxMSW prefix on the previously verified image; ci/images/build-image.sh pushes it and pins the digest. wx prefix/cache scripts take a linux|windows argument. - CI checks the wx-rs patch queue; versioning treats the GUI build script, Windows resources and assets as release-relevant; the workflow contract test covers the Windows gates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,10 +12,75 @@ permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
candidate:
|
||||
# Windows build of the candidate (see release.yml's windows job); the
|
||||
# candidate job attaches its zip next to the Linux tarball.
|
||||
windows:
|
||||
runs-on: alkane-ci
|
||||
container:
|
||||
image: gitea.bluefla.re/blueflare/alkane-ci@sha256:9d2a992bbcb91014af3c85d2e1ec8c5990701cecf83fd06c8d46f9ef13dbd948
|
||||
image: gitea.bluefla.re/blueflare/alkane-ci@sha256:8f20439b38ae1c070b1a692a89c084f69134f4fa16a755d02783f621cd9ac041
|
||||
env:
|
||||
CARGO_TARGET_DIR: target
|
||||
CARGO_BUILD_JOBS: 2
|
||||
WX_WINDOWS_PREFIX: /root/.cache/wx-3.3.3-mingw
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Select candidate version
|
||||
id: version
|
||||
run: bash ci/compute-rc-version.sh >> "$GITHUB_OUTPUT"
|
||||
- name: Install Windows toolchain
|
||||
if: steps.version.outputs.release == 'true'
|
||||
run: bash ci/windows-ci.sh toolchain
|
||||
- name: Configure bounded Rust compiler cache
|
||||
if: steps.version.outputs.release == 'true'
|
||||
run: bash ci/configure-rust-cache.sh
|
||||
- name: Compute wxMSW cache key
|
||||
if: steps.version.outputs.release == 'true'
|
||||
id: wx-key
|
||||
run: bash ci/wx-cache-key.sh windows
|
||||
- name: Check prebuilt wxMSW
|
||||
if: steps.version.outputs.release == 'true'
|
||||
id: wx-image
|
||||
run: bash ci/check-wx-image-prefix.sh windows
|
||||
- id: wx-cache
|
||||
if: steps.version.outputs.release == 'true' && steps.wx-image.outputs.available != 'true'
|
||||
uses: actions/cache/restore@v4
|
||||
continue-on-error: true
|
||||
with:
|
||||
path: /root/.cache/wx-3.3.3-mingw
|
||||
key: ${{ steps.wx-key.outputs.key }}
|
||||
- name: Build wxMSW
|
||||
if: steps.version.outputs.release == 'true'
|
||||
id: wx-build
|
||||
run: bash ci/ensure-wx-prefix.sh windows
|
||||
- name: Save vendored wxMSW build
|
||||
if: steps.version.outputs.release == 'true' && steps.wx-cache.outputs.cache-hit != 'true' && steps.wx-build.outputs.built == 'true'
|
||||
uses: actions/cache/save@v4
|
||||
continue-on-error: true
|
||||
with:
|
||||
path: /root/.cache/wx-3.3.3-mingw
|
||||
key: ${{ steps.wx-key.outputs.key }}
|
||||
- name: Build Windows candidate
|
||||
if: steps.version.outputs.release == 'true'
|
||||
run: bash ci/windows-ci.sh build
|
||||
- name: Package Windows candidate
|
||||
if: steps.version.outputs.release == 'true'
|
||||
run: bash ci/windows-ci.sh package "${{ steps.version.outputs.version }}"
|
||||
- uses: https://github.com/ChristopherHX/gitea-upload-artifact@81f940d004763f986ba3582c007fd842dd5cb0d7
|
||||
if: steps.version.outputs.release == 'true'
|
||||
with:
|
||||
name: alkane-toolkit-windows
|
||||
path: dist/alkane-toolkit-v*-windows-x86_64.zip
|
||||
- name: Clean generated Toolkit build
|
||||
if: always()
|
||||
run: python3 ci/cleanup-generated.py
|
||||
|
||||
candidate:
|
||||
needs: windows
|
||||
runs-on: alkane-ci
|
||||
container:
|
||||
image: gitea.bluefla.re/blueflare/alkane-ci@sha256:8f20439b38ae1c070b1a692a89c084f69134f4fa16a755d02783f621cd9ac041
|
||||
env:
|
||||
CARGO_TARGET_DIR: target
|
||||
CARGO_BUILD_JOBS: 2
|
||||
@@ -65,11 +130,23 @@ jobs:
|
||||
mkdir -p dist
|
||||
cp target/release/alkane-toolkit dist/
|
||||
tar -C dist -czf "dist/alkane-toolkit-${{ steps.version.outputs.version }}-linux-x86_64.tar.gz" alkane-toolkit
|
||||
- name: Fetch Windows candidate
|
||||
if: steps.version.outputs.release == 'true'
|
||||
uses: https://github.com/ChristopherHX/gitea-download-artifact@75635f32b4c1c41c4b3d64e8f85210112ed4c9c7
|
||||
with:
|
||||
name: alkane-toolkit-windows
|
||||
path: dist/windows
|
||||
- name: Create private prerelease
|
||||
if: steps.version.outputs.release == 'true'
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
run: python3 ci/release-rc.py "${{ steps.version.outputs.tag }}" true "dist/alkane-toolkit-${{ steps.version.outputs.version }}-linux-x86_64.tar.gz"
|
||||
run: |
|
||||
set -euo pipefail
|
||||
V="${{ steps.version.outputs.version }}"
|
||||
WIN="dist/windows/alkane-toolkit-v${V}-windows-x86_64.zip"
|
||||
[ -s "$WIN" ] || { echo "Windows candidate for ${V} is missing" >&2; exit 1; }
|
||||
python3 ci/release-rc.py "${{ steps.version.outputs.tag }}" true \
|
||||
"dist/alkane-toolkit-${V}-linux-x86_64.tar.gz" "$WIN"
|
||||
- name: Rust compiler cache statistics
|
||||
if: always()
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user