diff --git a/.gitea/workflows/verify.yml b/.gitea/workflows/verify.yml index fe3cf712..f9cfffe4 100644 --- a/.gitea/workflows/verify.yml +++ b/.gitea/workflows/verify.yml @@ -195,8 +195,73 @@ jobs: if: always() run: python3 ci/cleanup-generated.py -# The Windows build of each change is validated on the main release run -# (build-test-release / windows-native), not on the PR gate: it is a full -# mingw + Wine cross-build that roughly doubled PR wall-clock. PRs verify Linux -# (clippy, build, tests, self-test) fast; Windows is still built and shipped at -# release, so a Windows-only break surfaces on the merge to main. + # The Windows build of the same change (main's release gate, run on the PR): + # clippy for the Windows target, the release .exe, every unit test under + # Wine, and the headless UI self-test under Wine. Only for changes that can + # affect the binary (the "full" surface). + verify-windows: + needs: verify + if: needs.verify.outputs.surface == 'full' + runs-on: alkane-ci + container: + image: gitea.bluefla.re/blueflare/alkane-ci@sha256:4929b2979851f1f12fb8f92ef74236ae4c2ea735a41ead94a16af416a4f0a1a5 + env: + CARGO_TARGET_DIR: target + CARGO_BUILD_JOBS: 2 + WX_WINDOWS_PREFIX: /root/.cache/wx-3.3.3-mingw + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install Windows toolchain + run: bash ci/windows-ci.sh toolchain + + - name: Configure bounded Rust compiler cache + run: bash ci/configure-rust-cache.sh + + - name: Compute wxMSW cache key + id: wx-key + run: bash ci/wx-cache-key.sh windows + + - name: Check prebuilt wxMSW + id: wx-image + run: bash ci/check-wx-image-prefix.sh windows + + - name: Cache vendored wxMSW build + if: steps.wx-image.outputs.available != 'true' + id: wx-cache + 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 (once, then cached) + id: wx-build + run: bash ci/ensure-wx-prefix.sh windows + + - name: Save vendored wxMSW build + if: 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: Clippy (Windows target, warnings are errors) + run: bash ci/windows-ci.sh clippy + + - name: Build (Windows) + run: bash ci/windows-ci.sh build + + - name: Unit tests (Windows build, under Wine) + run: bash ci/windows-ci.sh test + + - name: Headless UI self-test (Windows build, under Wine) + run: bash ci/windows-ci.sh selftest + + - name: Clean generated Toolkit build + if: always() + run: python3 ci/cleanup-generated.py