18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 06:55:02 +01:00

fix(ci): the no-AVX2 Windows build has its own concurrency group and its own public download

After master was merged the two Windows variants shared one concurrency group with
cancel-in-progress, so one cancelled the other, and the publish job looked for an artifact
name the matrix no longer produces. Each variant now has its own group, the publish job
downloads both, and the release carries maszyna-windows-x64.zip (AVX2, the old name, so the
links already handed out still work) and maszyna-windows-x64-noavx2.zip. The AVX2 variant
passes -DENABLE_AVX2=ON explicitly instead of an empty flag.
This commit is contained in:
maj00r
2026-11-15 21:18:22 +01:00
parent 6ffbc0a6f6
commit 348a814ce2

View File

@@ -32,11 +32,14 @@ jobs:
# running is left to finish; with a build cancelled the publish job of that run is skipped. A push
# to master gets a group of its own, its commit, so the builds of master are never cancelled.
# Windows is built twice: with AVX2 (the default of ENABLE_AVX2) and without it, for CPUs older
# than Haswell (2013). Each variant has its own concurrency group, or one would cancel the other.
windows:
name: Windows x64 / MSVC / ${{ matrix.variant.name }}
runs-on: windows-2022
concurrency:
group: ${{ github.workflow }}-windows-${{ github.event_name }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
group: ${{ github.workflow }}-windows-${{ matrix.variant.suffix }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
cancel-in-progress: true
strategy:
@@ -45,7 +48,7 @@ jobs:
variant:
- name: "AVX2"
suffix: "avx2"
cmake_flags: ""
cmake_flags: "-DENABLE_AVX2=ON"
- name: "No AVX2"
suffix: "noavx2"
cmake_flags: "-DENABLE_AVX2=OFF"
@@ -393,12 +396,19 @@ jobs:
cancel-in-progress: false
steps:
- name: Download Windows build
# the AVX2 build keeps the old name of the download, so the links already handed out still work
- name: Download Windows build (AVX2)
uses: actions/download-artifact@v4
with:
name: maszyna-windows-x64-${{ env.CONFIG_WIN }}
name: maszyna-windows-x64-avx2-${{ env.CONFIG_WIN }}
path: dist/maszyna-windows-x64
- name: Download Windows build (no AVX2)
uses: actions/download-artifact@v4
with:
name: maszyna-windows-x64-noavx2-${{ env.CONFIG_WIN }}
path: dist/maszyna-windows-x64-noavx2
- name: Download Linux build
uses: actions/download-artifact@v4
with:
@@ -415,6 +425,7 @@ jobs:
fi
(cd maszyna-windows-x64 && zip -qr9 ../maszyna-windows-x64.zip .)
(cd maszyna-windows-x64-noavx2 && zip -qr9 ../maszyna-windows-x64-noavx2.zip .)
tar -czf maszyna-linux-x64.tar.gz -C maszyna-linux-x64 .
ls -la
@@ -435,6 +446,7 @@ jobs:
"" \
"Download without a GitHub account:" \
"- Windows: $base/maszyna-windows-x64.zip" \
"- Windows, CPUs without AVX2 (older than Haswell, 2013): $base/maszyna-windows-x64-noavx2.zip" \
"- Linux: $base/maszyna-linux-x64.tar.gz" \
"" \
"Unpack over a MaSzyna installation (the game data isn't included). Build log: $RUN_URL")"
@@ -442,6 +454,7 @@ jobs:
gh release delete "$tag" --yes --cleanup-tag || true
gh release create "$tag" \
dist/maszyna-windows-x64.zip \
dist/maszyna-windows-x64-noavx2.zip \
dist/maszyna-linux-x64.tar.gz \
--target "$SHA" \
--prerelease \
@@ -451,4 +464,5 @@ jobs:
echo "### Public download" >> "$GITHUB_STEP_SUMMARY"
echo "- Windows: $base/maszyna-windows-x64.zip" >> "$GITHUB_STEP_SUMMARY"
echo "- Windows, no AVX2: $base/maszyna-windows-x64-noavx2.zip" >> "$GITHUB_STEP_SUMMARY"
echo "- Linux: $base/maszyna-linux-x64.tar.gz" >> "$GITHUB_STEP_SUMMARY"