From 139f15ac88cc4cb3df55fccb5e99e07f81c02cd4 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Fri, 20 Nov 2026 18:29:46 +0100 Subject: [PATCH 1/8] ci: cache the Linux compiler output with ccache --- .github/workflows/build_bin.yml | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/build_bin.yml b/.github/workflows/build_bin.yml index fed45a44b..a4e8097ff 100644 --- a/.github/workflows/build_bin.yml +++ b/.github/workflows/build_bin.yml @@ -252,6 +252,7 @@ jobs: # Without them it builds with OSS only, which modern distributions and the Steam Linux Runtime don't have: no sound. sudo apt-get install -y \ build-essential \ + ccache \ libasound2-dev \ libpulse-dev \ libpipewire-0.3-dev \ @@ -309,11 +310,34 @@ jobs: cmake --version python --version + # The compiler cache (ccache), one per variant. Only the runs on staging and master save it (the step after the + # build); a pull request takes the newest one of its variant, and so recompiles just what it changed. A pull + # request can read the caches of its base branch and of the default branch, not those of other pull requests. + # The compiler version is in the key, so a new GCC of the runner image starts a cache of its own. + - name: Compiler cache key + id: ccache-key + run: echo "gcc=$(g++ -dumpfullversion)" >> "$GITHUB_OUTPUT" + + - name: Restore the compiler cache + uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: ${{ runner.temp }}/ccache + key: ccache-linux-${{ matrix.variant.suffix }}-gcc${{ steps.ccache-key.outputs.gcc }}-${{ github.sha }} + restore-keys: | + ccache-linux-${{ matrix.variant.suffix }}-gcc${{ steps.ccache-key.outputs.gcc }}- + ccache-linux-${{ matrix.variant.suffix }}- + - name: Configure + env: + CCACHE_DIR: ${{ runner.temp }}/ccache + CCACHE_MAXSIZE: 500M run: | + ccache --zero-stats cmake \ -S . \ -B build \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE="${CONFIG_LINUX}" \ -DWITH_BETTER_RENDERER=OFF \ -DWITH_ZMQ=OFF \ @@ -323,11 +347,24 @@ jobs: -DPython3_EXECUTABLE="${{ steps.python.outputs.python-path }}" \ -DCMAKE_CXX_FLAGS="-Wno-attributes -fno-inline-functions-called-once" + # CCACHE_BASEDIR makes the paths relative, so a cache made on another checkout path still hits - name: Build + env: + CCACHE_DIR: ${{ runner.temp }}/ccache + CCACHE_MAXSIZE: 500M + CCACHE_BASEDIR: ${{ github.workspace }} run: | cmake \ --build build \ --parallel "$(nproc)" + ccache --show-stats + + - name: Save the compiler cache + if: ${{ !cancelled() && github.event_name == 'push' && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/master') }} + uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: ${{ runner.temp }}/ccache + key: ccache-linux-${{ matrix.variant.suffix }}-gcc${{ steps.ccache-key.outputs.gcc }}-${{ github.sha }} # the build copies the shared libraries next to the game (CMake_modules/bundle_runtime_libs.cmake) and the # game looks for them there first ($ORIGIN): each one it loads from outside build/bin has to be one of the system From b64d4dab1a0f54a16e5886d4924b27ade78a078b Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Fri, 20 Nov 2026 18:30:21 +0100 Subject: [PATCH 2/8] ci: build only the AVX2 variants on pull requests --- .github/workflows/build_bin.yml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_bin.yml b/.github/workflows/build_bin.yml index a4e8097ff..a3cd2e5d1 100644 --- a/.github/workflows/build_bin.yml +++ b/.github/workflows/build_bin.yml @@ -45,13 +45,9 @@ jobs: strategy: fail-fast: false matrix: - variant: - - name: "AVX2" - suffix: "avx2" - cmake_flags: "-DENABLE_AVX2=ON" - - name: "No AVX2" - suffix: "noavx2" - cmake_flags: "-DENABLE_AVX2=OFF" + # a pull request builds the AVX2 variant only; the variant without AVX2 (the same sources, one compiler + # switch) is built by the pushes to the branches and by a manual run + variant: ${{ fromJSON(github.event_name == 'pull_request' && '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"}]' || '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"},{"name":"No AVX2","suffix":"noavx2","cmake_flags":"-DENABLE_AVX2=OFF"}]') }} steps: - name: Checkout repository @@ -215,13 +211,9 @@ jobs: strategy: fail-fast: false matrix: - variant: - - name: "AVX2" - suffix: "avx2" - cmake_flags: "-DENABLE_AVX2=ON" - - name: "No AVX2" - suffix: "noavx2" - cmake_flags: "-DENABLE_AVX2=OFF" + # a pull request builds the AVX2 variant only; the variant without AVX2 (the same sources, one compiler + # switch) is built by the pushes to the branches and by a manual run + variant: ${{ fromJSON(github.event_name == 'pull_request' && '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"}]' || '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"},{"name":"No AVX2","suffix":"noavx2","cmake_flags":"-DENABLE_AVX2=OFF"}]') }} steps: - name: Checkout repository From dc4fbb56f4493427d9e21145f4e08b0fe111cd45 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Fri, 20 Nov 2026 18:33:03 +0100 Subject: [PATCH 3/8] ci: skip the coverage build for documentation-only pull requests --- .github/workflows/coverage.yml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index d2f00bccd..3a05010f2 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,8 +28,48 @@ concurrency: cancel-in-progress: true jobs: + # A pull request that changes only documentation doesn't need the coverage build. The check is a job-level + # condition, not `paths-ignore` on the trigger: a workflow that doesn't start leaves a required check "pending" + # for ever, while a skipped job (its name is fixed) counts as passed. A push, and anything this step can't + # decide, runs the build. + changes: + name: Which files changed + runs-on: ubuntu-24.04 + timeout-minutes: 5 + permissions: + pull-requests: read + outputs: + code: ${{ steps.files.outputs.code }} + steps: + - name: List the changed files + id: files + env: + GH_TOKEN: ${{ github.token }} + EVENT_NAME: ${{ github.event_name }} + REPO: ${{ github.repository }} + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + if [ "$EVENT_NAME" != pull_request ]; then + echo "code=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + if ! files="$(gh api --paginate "repos/$REPO/pulls/$PR_NUMBER/files" --jq '.[].filename')" || [ -z "$files" ]; then + echo "The list of changed files is not available, building." + echo "code=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + # what is not documentation: *.md, docs/ and LICENSE (not *.txt: CMakeLists.txt is code) + if printf '%s\n' "$files" | grep -Evq '(\.md$|^docs/|^LICENSE)'; then + echo "code=true" >> "$GITHUB_OUTPUT" + else + echo "Only documentation changed, the coverage build is skipped." + echo "code=false" >> "$GITHUB_OUTPUT" + fi + coverage: name: Unit test coverage (GCC) + needs: changes + if: needs.changes.outputs.code == 'true' runs-on: ubuntu-24.04 timeout-minutes: 60 permissions: From b9e5ec51a83f5fd5118db654544c245b7f498150 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Sun, 22 Nov 2026 19:17:59 +0100 Subject: [PATCH 4/8] ci: ccache through the precompiled header, both variants for forks, renamed files counted - ccache caches the files built with the precompiled header (stdafx.h) only with CCACHE_SLOPPINESS pch_defines,time_macros (plus the include file times); without it every such file was compiled in full while the cache was still restored and saved - a pull request from a fork has no push run here, so it builds the variant without AVX2 too; a branch of this repository still builds only the AVX2 one - the docs-only check also counts the old name of a renamed file, so moving code out to docs/ or a .md name doesn't skip the coverage build - no fallback to the cache of another GCC, which ccache can't use Review of maj00r on #434. --- .github/workflows/build_bin.yml | 24 ++++++++++++++++-------- .github/workflows/coverage.yml | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_bin.yml b/.github/workflows/build_bin.yml index a3cd2e5d1..f0aad4891 100644 --- a/.github/workflows/build_bin.yml +++ b/.github/workflows/build_bin.yml @@ -45,9 +45,10 @@ jobs: strategy: fail-fast: false matrix: - # a pull request builds the AVX2 variant only; the variant without AVX2 (the same sources, one compiler - # switch) is built by the pushes to the branches and by a manual run - variant: ${{ fromJSON(github.event_name == 'pull_request' && '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"}]' || '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"},{"name":"No AVX2","suffix":"noavx2","cmake_flags":"-DENABLE_AVX2=OFF"}]') }} + # a pull request from a branch of this repository builds the AVX2 variant only; the variant without AVX2 + # (the same sources, one compiler switch) is built by the push of that branch, by the pushes to staging + # and master and by a manual run. a pull request from a fork has no push run here, so it builds both + variant: ${{ fromJSON(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"}]' || '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"},{"name":"No AVX2","suffix":"noavx2","cmake_flags":"-DENABLE_AVX2=OFF"}]') }} steps: - name: Checkout repository @@ -211,9 +212,10 @@ jobs: strategy: fail-fast: false matrix: - # a pull request builds the AVX2 variant only; the variant without AVX2 (the same sources, one compiler - # switch) is built by the pushes to the branches and by a manual run - variant: ${{ fromJSON(github.event_name == 'pull_request' && '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"}]' || '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"},{"name":"No AVX2","suffix":"noavx2","cmake_flags":"-DENABLE_AVX2=OFF"}]') }} + # a pull request from a branch of this repository builds the AVX2 variant only; the variant without AVX2 + # (the same sources, one compiler switch) is built by the push of that branch, by the pushes to staging + # and master and by a manual run. a pull request from a fork has no push run here, so it builds both + variant: ${{ fromJSON(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"}]' || '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"},{"name":"No AVX2","suffix":"noavx2","cmake_flags":"-DENABLE_AVX2=OFF"}]') }} steps: - name: Checkout repository @@ -305,7 +307,8 @@ jobs: # The compiler cache (ccache), one per variant. Only the runs on staging and master save it (the step after the # build); a pull request takes the newest one of its variant, and so recompiles just what it changed. A pull # request can read the caches of its base branch and of the default branch, not those of other pull requests. - # The compiler version is in the key, so a new GCC of the runner image starts a cache of its own. + # The compiler version is in the key, so a new GCC of the runner image starts a cache of its own, with no + # fallback to the cache of the old one, which ccache couldn't use (the compiler is part of its hash). - name: Compiler cache key id: ccache-key run: echo "gcc=$(g++ -dumpfullversion)" >> "$GITHUB_OUTPUT" @@ -317,12 +320,14 @@ jobs: key: ccache-linux-${{ matrix.variant.suffix }}-gcc${{ steps.ccache-key.outputs.gcc }}-${{ github.sha }} restore-keys: | ccache-linux-${{ matrix.variant.suffix }}-gcc${{ steps.ccache-key.outputs.gcc }}- - ccache-linux-${{ matrix.variant.suffix }}- - name: Configure env: CCACHE_DIR: ${{ runner.temp }}/ccache CCACHE_MAXSIZE: 500M + # the game and eu07_core use a precompiled header (stdafx.h): ccache caches such compilations only with + # this sloppiness, else it compiles every file in full + CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime run: | ccache --zero-stats cmake \ @@ -345,6 +350,9 @@ jobs: CCACHE_DIR: ${{ runner.temp }}/ccache CCACHE_MAXSIZE: 500M CCACHE_BASEDIR: ${{ github.workspace }} + # the game and eu07_core use a precompiled header (stdafx.h): ccache caches such compilations only with + # this sloppiness, else it compiles every file in full + CCACHE_SLOPPINESS: pch_defines,time_macros,include_file_mtime,include_file_ctime run: | cmake \ --build build \ diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 3a05010f2..dbd79eee8 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -53,7 +53,7 @@ jobs: echo "code=true" >> "$GITHUB_OUTPUT" exit 0 fi - if ! files="$(gh api --paginate "repos/$REPO/pulls/$PR_NUMBER/files" --jq '.[].filename')" || [ -z "$files" ]; then + if ! files="$(gh api --paginate "repos/$REPO/pulls/$PR_NUMBER/files" --jq '.[] | .filename, (.previous_filename // empty)')" || [ -z "$files" ]; then echo "The list of changed files is not available, building." echo "code=true" >> "$GITHUB_OUTPUT" exit 0 From e6611341de196056aacd404bd75df9cda7ac7ae7 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Wed, 25 Nov 2026 02:21:38 +0100 Subject: [PATCH 5/8] ci: a saved compiler cache replaces the older ones of its branch Every push to staging or master saved a new cache key of up to 0.5 GB and nothing deleted the old ones, so master alone would pass the 10 GB of the repository in a week and push out the small caches. The Linux job now deletes the older ccache entries of its branch and variant right after a save (actions: write on that job). The comments say a feature branch push hits only master's cache, and that the No AVX2 jobs of a pull request never run, so they can't be a required check. --- .github/workflows/build_bin.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_bin.yml b/.github/workflows/build_bin.yml index f0aad4891..b44a71590 100644 --- a/.github/workflows/build_bin.yml +++ b/.github/workflows/build_bin.yml @@ -47,7 +47,8 @@ jobs: matrix: # a pull request from a branch of this repository builds the AVX2 variant only; the variant without AVX2 # (the same sources, one compiler switch) is built by the push of that branch, by the pushes to staging - # and master and by a manual run. a pull request from a fork has no push run here, so it builds both + # and master and by a manual run. a pull request from a fork has no push run here, so it builds both. + # so the "No AVX2" jobs of a pull request of this repository never run: don't make them a required check variant: ${{ fromJSON(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"}]' || '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"},{"name":"No AVX2","suffix":"noavx2","cmake_flags":"-DENABLE_AVX2=OFF"}]') }} steps: @@ -204,6 +205,10 @@ jobs: linux: name: Linux x64 / GCC / ${{ matrix.variant.name }} runs-on: ubuntu-24.04 + # actions: write only to delete the older compiler caches after a save (the step after "Save the compiler cache") + permissions: + contents: read + actions: write # see the notes above the windows job: two variants, each with a concurrency group of its own concurrency: group: ${{ github.workflow }}-linux-${{ matrix.variant.suffix }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} @@ -305,8 +310,10 @@ jobs: python --version # The compiler cache (ccache), one per variant. Only the runs on staging and master save it (the step after the - # build); a pull request takes the newest one of its variant, and so recompiles just what it changed. A pull - # request can read the caches of its base branch and of the default branch, not those of other pull requests. + # build) and delete their older ones; a pull request takes the newest one of its variant, and so recompiles just + # what it changed. A pull request can read the caches of its base branch and of the default branch, not those of + # other pull requests. A push of another branch can read only master's, so it hits only as far as the branch + # still matches master. # The compiler version is in the key, so a new GCC of the runner image starts a cache of its own, with no # fallback to the cache of the old one, which ccache couldn't use (the compiler is part of its hash). - name: Compiler cache key @@ -360,12 +367,29 @@ jobs: ccache --show-stats - name: Save the compiler cache + id: ccache-save if: ${{ !cancelled() && github.event_name == 'push' && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/master') }} uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: ${{ runner.temp }}/ccache key: ccache-linux-${{ matrix.variant.suffix }}-gcc${{ steps.ccache-key.outputs.gcc }}-${{ github.sha }} + # a cache can't be written over, so every save above is a new key of up to 0.5 GB. the older ones of this branch + # and variant (of any GCC) go right after it, or they'd fill the 10 GB of the repository and push out the small + # caches (audio-dlls-*, apt-*). a failed delete only leaves the old cache to the eviction + - name: Delete the older compiler caches + if: ${{ !cancelled() && steps.ccache-save.outcome == 'success' }} + env: + GH_TOKEN: ${{ github.token }} + PREFIX: ccache-linux-${{ matrix.variant.suffix }}- + KEEP: ccache-linux-${{ matrix.variant.suffix }}-gcc${{ steps.ccache-key.outputs.gcc }}-${{ github.sha }} + run: | + gh cache list --repo "$GITHUB_REPOSITORY" --ref "$GITHUB_REF" --key "$PREFIX" --limit 100 --json id,key \ + --jq ".[] | select(.key != env.KEEP) | .id" | + while read -r id; do + gh cache delete "$id" --repo "$GITHUB_REPOSITORY" || echo "::warning::cache $id not deleted" + done + # the build copies the shared libraries next to the game (CMake_modules/bundle_runtime_libs.cmake) and the # game looks for them there first ($ORIGIN): each one it loads from outside build/bin has to be one of the system - name: Check the bundled libraries From b47de97e550c2b3a0cf7546c3b488cef3cc4a0f4 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Thu, 26 Nov 2026 05:25:32 +0100 Subject: [PATCH 6/8] ci: keep the newest cache when two runs finish together; write permission only in the cleanup job --- .github/workflows/build_bin.yml | 66 ++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_bin.yml b/.github/workflows/build_bin.yml index b44a71590..dc612e0fd 100644 --- a/.github/workflows/build_bin.yml +++ b/.github/workflows/build_bin.yml @@ -205,10 +205,11 @@ jobs: linux: name: Linux x64 / GCC / ${{ matrix.variant.name }} runs-on: ubuntu-24.04 - # actions: write only to delete the older compiler caches after a save (the step after "Save the compiler cache") - permissions: - contents: read - actions: write + # the key of a compiler cache saved here, one output per variant (a matrix job's outputs are shared by its legs): + # the job linux-ccache-cleanup deletes the older ones, so this job needs no write access + outputs: + ccache-key-avx2: ${{ steps.ccache-saved.outputs.avx2 }} + ccache-key-noavx2: ${{ steps.ccache-saved.outputs.noavx2 }} # see the notes above the windows job: two variants, each with a concurrency group of its own concurrency: group: ${{ github.workflow }}-linux-${{ matrix.variant.suffix }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} @@ -219,7 +220,8 @@ jobs: matrix: # a pull request from a branch of this repository builds the AVX2 variant only; the variant without AVX2 # (the same sources, one compiler switch) is built by the push of that branch, by the pushes to staging - # and master and by a manual run. a pull request from a fork has no push run here, so it builds both + # and master and by a manual run. a pull request from a fork has no push run here, so it builds both. + # so the "No AVX2" jobs of a pull request of this repository never run: don't make them a required check variant: ${{ fromJSON(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"}]' || '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"},{"name":"No AVX2","suffix":"noavx2","cmake_flags":"-DENABLE_AVX2=OFF"}]') }} steps: @@ -374,21 +376,13 @@ jobs: path: ${{ runner.temp }}/ccache key: ccache-linux-${{ matrix.variant.suffix }}-gcc${{ steps.ccache-key.outputs.gcc }}-${{ github.sha }} - # a cache can't be written over, so every save above is a new key of up to 0.5 GB. the older ones of this branch - # and variant (of any GCC) go right after it, or they'd fill the 10 GB of the repository and push out the small - # caches (audio-dlls-*, apt-*). a failed delete only leaves the old cache to the eviction - - name: Delete the older compiler caches + # for the job linux-ccache-cleanup, which deletes the older caches of this branch and variant + - name: Pass on the saved compiler cache key + id: ccache-saved if: ${{ !cancelled() && steps.ccache-save.outcome == 'success' }} env: - GH_TOKEN: ${{ github.token }} - PREFIX: ccache-linux-${{ matrix.variant.suffix }}- - KEEP: ccache-linux-${{ matrix.variant.suffix }}-gcc${{ steps.ccache-key.outputs.gcc }}-${{ github.sha }} - run: | - gh cache list --repo "$GITHUB_REPOSITORY" --ref "$GITHUB_REF" --key "$PREFIX" --limit 100 --json id,key \ - --jq ".[] | select(.key != env.KEEP) | .id" | - while read -r id; do - gh cache delete "$id" --repo "$GITHUB_REPOSITORY" || echo "::warning::cache $id not deleted" - done + KEY: ccache-linux-${{ matrix.variant.suffix }}-gcc${{ steps.ccache-key.outputs.gcc }}-${{ github.sha }} + run: echo "${{ matrix.variant.suffix }}=$KEY" >> "$GITHUB_OUTPUT" # the build copies the shared libraries next to the game (CMake_modules/bundle_runtime_libs.cmake) and the # game looks for them there first ($ORIGIN): each one it loads from outside build/bin has to be one of the system @@ -453,6 +447,42 @@ jobs: retention-days: 14 + # a cache can't be written over, so every save of the linux job is a new key of up to 0.5 GB. the older ones of the + # branch and variant (of any GCC) go right after it, or they'd fill the 10 GB of the repository and push out the + # small caches (audio-dlls-*, apt-*). only the caches created before the one saved go: when two runs of a branch end + # together, the one which saved later keeps its cache. a failed delete only leaves the old cache to the eviction + linux-ccache-cleanup: + name: Linux / delete the older compiler caches + needs: linux + if: ${{ !cancelled() && (needs.linux.outputs.ccache-key-avx2 != '' || needs.linux.outputs.ccache-key-noavx2 != '') }} + runs-on: ubuntu-24.04 + permissions: + actions: write + + steps: + - name: Delete the older compiler caches + env: + GH_TOKEN: ${{ github.token }} + SAVED: ${{ needs.linux.outputs.ccache-key-avx2 }} ${{ needs.linux.outputs.ccache-key-noavx2 }} + run: | + # the ids of the caches created before the one saved (env.KEEP); none when it isn't listed. the times are + # compared as numbers, as their fractions of a second can have any number of digits + older=' + def t: capture("^(?[^.Z]+)(?[.][0-9]+)?Z$") | ((.s + "Z") | fromdateiso8601) + (("0" + (.f // "")) | tonumber); + (map(select(.key == env.KEEP)) | first | .createdAt) as $saved + | if $saved == null then empty else ($saved | t) as $at | .[] | select((.createdAt | t) < $at) | .id end' + for KEEP in $SAVED; do + export KEEP + # the key without its GCC version and commit: ccache-linux-- + prefix="${KEEP%%-gcc*}-" + gh cache list --repo "$GITHUB_REPOSITORY" --ref "$GITHUB_REF" --key "$prefix" --limit 100 \ + --json id,key,createdAt --jq "$older" | + while read -r id; do + gh cache delete "$id" --repo "$GITHUB_REPOSITORY" || echo "::warning::cache $id not deleted" + done + done + + # ============================================================ # Public download: release assets need no GitHub account # ============================================================ From fe6d3a1d187e4e234abdd5325fd9265362bbe383 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Sun, 29 Nov 2026 10:23:04 +0100 Subject: [PATCH 7/8] ci: build the binaries once per commit, and not for docs or scenario tests A pull request from a branch of this repository no longer builds the binaries: the push run of that branch builds the same commit and publishes its download, and the merge with the base is compiled by the Build and Coverage workflows. A pull request from a fork has no push run here and builds both variants as before. A push that changes only *.md, docs/, LICENSE or tests/scenarios/ builds nothing either (new branches are compared with staging, then master); pushes to staging and master and manual runs always build, and so does anything the check can't decide. The decision is a job (`changes`) the build jobs need, so a skipped build counts as passed. With the pull request builds gone, the AVX2-only matrix of a same-repository pull request is no longer needed and both jobs list their two variants again. Coverage skips tests/scenarios/ as well. --- .github/workflows/build_bin.yml | 102 ++++++++++++++++++++++++++++---- .github/workflows/coverage.yml | 9 +-- 2 files changed, 97 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_bin.yml b/.github/workflows/build_bin.yml index dc612e0fd..c2bfe2e64 100644 --- a/.github/workflows/build_bin.yml +++ b/.github/workflows/build_bin.yml @@ -23,6 +23,80 @@ env: jobs: + # ============================================================ + # Whether the binaries are built at all + # ============================================================ + + # Every push to a branch of this repository runs this workflow, and a pull request from such a branch would run it + # once more for the same commit. The push run builds and publishes the download of the branch, so the pull request + # run of a branch of this repository builds nothing (the merge with the base is compiled by the Build and Coverage + # workflows); a pull request from a fork has no push run here and builds as before. A push that changes only + # documentation or the data of the scenario tests (which the binaries don't contain) builds nothing either: the + # download of the branch stays at its last build, of the same binaries. Pushes to staging and master and manual runs + # always build. The checks are job-level conditions, not `paths-ignore` or `branches-ignore` on the trigger: a skipped + # job counts as passed, a workflow that doesn't start would leave a required check pending for ever (none is + # required today). Anything this job can't decide builds. + changes: + name: Whether to build + runs-on: ubuntu-24.04 + timeout-minutes: 5 + permissions: + contents: read + pull-requests: read + outputs: + build: ${{ steps.decide.outputs.build }} + steps: + - name: Decide from the event and the changed files + id: decide + env: + GH_TOKEN: ${{ github.token }} + EVENT_NAME: ${{ github.event_name }} + REPO: ${{ github.repository }} + REF: ${{ github.ref }} + SHA: ${{ github.sha }} + BEFORE: ${{ github.event.before }} + PR_NUMBER: ${{ github.event.pull_request.number }} + PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} + run: | + build() { echo "$1"; echo "build=true" >> "$GITHUB_OUTPUT"; exit 0; } + case "$EVENT_NAME" in + pull_request) + if [ "$PR_HEAD_REPO" = "$REPO" ]; then + echo "A branch of this repository: its push run builds this commit." + echo "build=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + files="$(gh api --paginate "repos/$REPO/pulls/$PR_NUMBER/files" --jq '.[] | .filename, (.previous_filename // empty)')" \ + || build "The files of the pull request are not available, building." ;; + push) + case "$REF" in + refs/heads/staging|refs/heads/master) build "A push to staging or master, building." ;; + esac + # a new branch (before = zeros) against staging, then master; a later push against the commit before it + if [ -n "$BEFORE" ] && [ "$BEFORE" != 0000000000000000000000000000000000000000 ]; then + bases="$BEFORE" + else + bases="staging master" + fi + files="" + for base in $bases; do + # the compare lists at most 300 files: more than that, or no list, builds + if out="$(gh api "repos/$REPO/compare/$base...$SHA" --jq 'if (.files | length) < 300 then (.files[] | .filename, (.previous_filename // empty)) else error("too many files") end')"; then + files="$out" + break + fi + done ;; + *) build "A manual run, building." ;; + esac + [ -n "$files" ] || build "The list of changed files is not available or empty, building." + # what the binaries don't contain: *.md, docs/, LICENSE and the scenario tests (cases and their runner) + # (not *.txt: CMakeLists.txt is code; tests/unit is built into the binaries' test run) + if printf '%s\n' "$files" | grep -Evq '(\.md$|^docs/|^LICENSE|^tests/scenarios/)'; then + build "Code changed, building." + fi + echo "Only documentation or scenario test data changed, the binaries are not built." + echo "build=false" >> "$GITHUB_OUTPUT" + # ============================================================ # Windows / MSVC # ============================================================ @@ -37,6 +111,8 @@ jobs: windows: name: Windows x64 / MSVC / ${{ matrix.variant.name }} + needs: changes + if: needs.changes.outputs.build == 'true' runs-on: windows-2022 concurrency: group: ${{ github.workflow }}-windows-${{ matrix.variant.suffix }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} @@ -45,11 +121,13 @@ jobs: strategy: fail-fast: false matrix: - # a pull request from a branch of this repository builds the AVX2 variant only; the variant without AVX2 - # (the same sources, one compiler switch) is built by the push of that branch, by the pushes to staging - # and master and by a manual run. a pull request from a fork has no push run here, so it builds both. - # so the "No AVX2" jobs of a pull request of this repository never run: don't make them a required check - variant: ${{ fromJSON(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"}]' || '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"},{"name":"No AVX2","suffix":"noavx2","cmake_flags":"-DENABLE_AVX2=OFF"}]') }} + variant: + - name: "AVX2" + suffix: "avx2" + cmake_flags: "-DENABLE_AVX2=ON" + - name: "No AVX2" + suffix: "noavx2" + cmake_flags: "-DENABLE_AVX2=OFF" steps: - name: Checkout repository @@ -204,6 +282,8 @@ jobs: linux: name: Linux x64 / GCC / ${{ matrix.variant.name }} + needs: changes + if: needs.changes.outputs.build == 'true' runs-on: ubuntu-24.04 # the key of a compiler cache saved here, one output per variant (a matrix job's outputs are shared by its legs): # the job linux-ccache-cleanup deletes the older ones, so this job needs no write access @@ -218,11 +298,13 @@ jobs: strategy: fail-fast: false matrix: - # a pull request from a branch of this repository builds the AVX2 variant only; the variant without AVX2 - # (the same sources, one compiler switch) is built by the push of that branch, by the pushes to staging - # and master and by a manual run. a pull request from a fork has no push run here, so it builds both. - # so the "No AVX2" jobs of a pull request of this repository never run: don't make them a required check - variant: ${{ fromJSON(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"}]' || '[{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON"},{"name":"No AVX2","suffix":"noavx2","cmake_flags":"-DENABLE_AVX2=OFF"}]') }} + variant: + - name: "AVX2" + suffix: "avx2" + cmake_flags: "-DENABLE_AVX2=ON" + - name: "No AVX2" + suffix: "noavx2" + cmake_flags: "-DENABLE_AVX2=OFF" steps: - name: Checkout repository diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index dbd79eee8..92fa748cd 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,7 +28,8 @@ concurrency: cancel-in-progress: true jobs: - # A pull request that changes only documentation doesn't need the coverage build. The check is a job-level + # A pull request that changes only documentation or the scenario tests (cases and their runner, which aren't built) + # doesn't need the coverage build. The check is a job-level # condition, not `paths-ignore` on the trigger: a workflow that doesn't start leaves a required check "pending" # for ever, while a skipped job (its name is fixed) counts as passed. A push, and anything this step can't # decide, runs the build. @@ -58,11 +59,11 @@ jobs: echo "code=true" >> "$GITHUB_OUTPUT" exit 0 fi - # what is not documentation: *.md, docs/ and LICENSE (not *.txt: CMakeLists.txt is code) - if printf '%s\n' "$files" | grep -Evq '(\.md$|^docs/|^LICENSE)'; then + # what is not built: *.md, docs/, LICENSE and tests/scenarios/ (not *.txt: CMakeLists.txt is code) + if printf '%s\n' "$files" | grep -Evq '(\.md$|^docs/|^LICENSE|^tests/scenarios/)'; then echo "code=true" >> "$GITHUB_OUTPUT" else - echo "Only documentation changed, the coverage build is skipped." + echo "Only documentation or scenario tests changed, the coverage build is skipped." echo "code=false" >> "$GITHUB_OUTPUT" fi From 6aa6b077bfc12fee17ddcd8bf6839d97421cee00 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Sun, 29 Nov 2026 10:48:12 +0100 Subject: [PATCH 8/8] ci: Sonar input without compiling; no AVX2 for master only; unit tests in the AVX2 build Build (the input of the SonarQube Cloud analysis): the analyzer needs the compile commands and the headers, not the objects, so the job no longer compiles under the Build Wrapper. CMake writes compile_commands.json at configure time (CMAKE_EXPORT_COMPILE_COMMANDS), together with the headers the project generates; glslang's build_info.h is made by its own small target. The database goes where sonar.yml reads it (bw-output/), so the trusted workflow is unchanged. build/CMakeFiles is packed now: it holds cmake_pch.hxx, which the commands include. Build binaries: the variant without AVX2 is built for master only (pushes to master, pull requests into master, i.e. staging into master) and by a manual run; branch downloads have the AVX2 build and point to build-master for the other one. A pull request into master from this repository builds again (both variants, the merge), as the check before a release. The variant without AVX2 builds no unit tests (-DWITH_TESTS=OFF, no lua51.dll): they run in the AVX2 build of the same commit. The matrix comes from the `changes` job. --- .github/workflows/build.yml | 29 +++++++------ .github/workflows/build_bin.yml | 75 +++++++++++++++++++++------------ 2 files changed, 65 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 758b4c8d5..8ce3f1569 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ concurrency: jobs: build: - name: Build under Build Wrapper + name: Compilation database for SonarQube Cloud runs-on: ubuntu-24.04 permissions: contents: read @@ -76,23 +76,27 @@ jobs: ref/glm/glm/gtx/string_cast.inl grep -n "std::string format(const char\* message" ref/glm/glm/gtx/string_cast.inl - - name: Install SonarQube Cloud Build Wrapper - uses: SonarSource/sonarqube-scan-action/install-build-wrapper@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6.0.0 - + # The analyzer needs the compile command of every file and the headers they include, not the objects: the + # compilation database CMake writes at configure time is enough, so nothing is compiled here. The headers the + # project generates (version_info.h, the editor icons) are written by the configure step too. - name: Configure (CMake) run: | cmake -S . -B build \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DWITH_BETTER_RENDERER=OFF \ -DWITH_ZMQ=OFF -DWITH_OPENVR=OFF -DUSE_LTO=OFF \ -DCMAKE_CXX_FLAGS="-Wno-attributes -fno-inline-functions-called-once" \ -DPython3_EXECUTABLE="$(which python3)" - - name: Build under Build Wrapper + # glslang writes its build_info.h at build time; its sources are excluded from the analysis, but the target + # is cheap and makes the include available should a header of ours reach it + - name: Compilation database run: | - build-wrapper-linux-x86-64 \ - --out-dir "${BUILD_WRAPPER_OUT_DIR}" \ - cmake --build build --config Release -j"$(nproc)" + cmake --build build --target glslang-build-info || echo "no glslang-build-info target, nothing generated" + mkdir -p "${BUILD_WRAPPER_OUT_DIR}" + cp build/compile_commands.json "${BUILD_WRAPPER_OUT_DIR}/compile_commands.json" + echo "$(grep -c '"file"' "${BUILD_WRAPPER_OUT_DIR}/compile_commands.json") compile commands" # Metadata the trusted workflow needs to identify the PR. # Treated as UNVERIFIED input there and re-checked against the API. @@ -109,13 +113,14 @@ jobs: printf '%s\n' "$PR_HEAD_SHA" > .sonar-meta/head_sha printf '%s\n' "$COMMIT_SHA" > .sonar-meta/sha - # The C/C++ analyzer needs the sources AND the build-wrapper output. - # compile_commands.json holds absolute paths, so the trusted workflow must - # unpack this at the same $GITHUB_WORKSPACE path — same repo, so it matches. + # The C/C++ analyzer needs the sources AND the compilation database (kept in bw-output/, where the + # trusted workflow reads it). compile_commands.json holds absolute paths, so the trusted workflow must + # unpack this at the same $GITHUB_WORKSPACE path — same repo, so it matches. build/CMakeFiles stays in: + # with nothing compiled it is small, and it holds cmake_pch.hxx, which every command of the targets with + # the precompiled header includes (-include). - name: Pack analysis input run: | tar -czf /tmp/workspace.tar.gz \ - --exclude='./build/CMakeFiles' \ --exclude='*.o' \ --exclude='*.a' \ --exclude='*.so' \ diff --git a/.github/workflows/build_bin.yml b/.github/workflows/build_bin.yml index c2bfe2e64..ca6087363 100644 --- a/.github/workflows/build_bin.yml +++ b/.github/workflows/build_bin.yml @@ -30,12 +30,18 @@ jobs: # Every push to a branch of this repository runs this workflow, and a pull request from such a branch would run it # once more for the same commit. The push run builds and publishes the download of the branch, so the pull request # run of a branch of this repository builds nothing (the merge with the base is compiled by the Build and Coverage - # workflows); a pull request from a fork has no push run here and builds as before. A push that changes only + # workflows), except a pull request into master (staging into master): that is the check before a release, of the + # merge, with both variants. A pull request from a fork has no push run here and builds as before. A push that changes only # documentation or the data of the scenario tests (which the binaries don't contain) builds nothing either: the # download of the branch stays at its last build, of the same binaries. Pushes to staging and master and manual runs # always build. The checks are job-level conditions, not `paths-ignore` or `branches-ignore` on the trigger: a skipped # job counts as passed, a workflow that doesn't start would leave a required check pending for ever (none is - # required today). Anything this job can't decide builds. + # required today; a skipped matrix job shows under its unexpanded name, `${{ matrix.variant.name }}`). Anything + # this job can't decide builds. + # + # The variant without AVX2 (CPUs older than Haswell, 2013) is the same sources with one compiler switch: it is built + # for master only (pushes to master, pull requests into master, so every staging into master) and by a manual run. + # It builds no unit tests: they run in the AVX2 build of the same commit. changes: name: Whether to build runs-on: ubuntu-24.04 @@ -45,6 +51,8 @@ jobs: pull-requests: read outputs: build: ${{ steps.decide.outputs.build }} + variants: ${{ steps.decide.outputs.variants }} + noavx2: ${{ steps.decide.outputs.noavx2 }} steps: - name: Decide from the event and the changed files id: decide @@ -57,10 +65,23 @@ jobs: BEFORE: ${{ github.event.before }} PR_NUMBER: ${{ github.event.pull_request.number }} PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} + BASE_REF: ${{ github.base_ref }} run: | + avx2='{"name":"AVX2","suffix":"avx2","cmake_flags":"-DENABLE_AVX2=ON","tests":true}' + noavx2='{"name":"No AVX2","suffix":"noavx2","cmake_flags":"-DENABLE_AVX2=OFF -DWITH_TESTS=OFF","tests":false}' + if [ "$EVENT_NAME" = workflow_dispatch ] \ + || { [ "$EVENT_NAME" = push ] && [ "$REF" = refs/heads/master ]; } \ + || { [ "$EVENT_NAME" = pull_request ] && [ "$BASE_REF" = master ]; }; then + echo "variants=[$avx2,$noavx2]" >> "$GITHUB_OUTPUT" + echo "noavx2=true" >> "$GITHUB_OUTPUT" + else + echo "variants=[$avx2]" >> "$GITHUB_OUTPUT" + echo "noavx2=false" >> "$GITHUB_OUTPUT" + fi build() { echo "$1"; echo "build=true" >> "$GITHUB_OUTPUT"; exit 0; } case "$EVENT_NAME" in pull_request) + [ "$BASE_REF" != master ] || build "A pull request into master, building the merge." if [ "$PR_HEAD_REPO" = "$REPO" ]; then echo "A branch of this repository: its push run builds this commit." echo "build=false" >> "$GITHUB_OUTPUT" @@ -121,13 +142,8 @@ jobs: strategy: fail-fast: false matrix: - variant: - - name: "AVX2" - suffix: "avx2" - cmake_flags: "-DENABLE_AVX2=ON" - - name: "No AVX2" - suffix: "noavx2" - cmake_flags: "-DENABLE_AVX2=OFF" + # AVX2 always, without AVX2 for master only: see the job `changes` + variant: ${{ fromJSON(needs.changes.outputs.variants) }} steps: - name: Checkout repository @@ -177,6 +193,7 @@ jobs: # the unit tests run at the end of the build and load lua51.dll (the Lua screens), but ref/luajit has only its import # library. LuaJIT of the same 2.0 line is built here and put on PATH for them; it doesn't go into the uploaded build - name: Build lua51.dll for the unit tests + if: matrix.variant.tests shell: cmd run: | for /f "usebackq delims=" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set "VSDIR=%%i" @@ -298,13 +315,8 @@ jobs: strategy: fail-fast: false matrix: - variant: - - name: "AVX2" - suffix: "avx2" - cmake_flags: "-DENABLE_AVX2=ON" - - name: "No AVX2" - suffix: "noavx2" - cmake_flags: "-DENABLE_AVX2=OFF" + # AVX2 always, without AVX2 for master only: see the job `changes` + variant: ${{ fromJSON(needs.changes.outputs.variants) }} steps: - name: Checkout repository @@ -571,7 +583,7 @@ jobs: publish: name: Publish public download - needs: [windows, linux] + needs: [changes, windows, linux] if: github.event_name != 'pull_request' runs-on: ubuntu-24.04 permissions: @@ -589,6 +601,7 @@ jobs: path: dist/maszyna-windows-x64 - name: Download Windows build (no AVX2) + if: needs.changes.outputs.noavx2 == 'true' uses: actions/download-artifact@v4 with: name: maszyna-windows-x64-noavx2-${{ env.CONFIG_WIN }} @@ -601,6 +614,7 @@ jobs: path: dist/maszyna-linux-x64 - name: Download Linux build (no AVX2) + if: needs.changes.outputs.noavx2 == 'true' uses: actions/download-artifact@v4 with: name: maszyna-linux-x64-noavx2-${{ env.CONFIG_LINUX }} @@ -612,6 +626,7 @@ jobs: # the artifacts lose the executable bit for dir in maszyna-linux-x64 maszyna-linux-x64-noavx2; do + [ -d "$dir" ] || continue find "$dir" -type f -exec sh -c 'file -b "$1" | grep -q "^ELF" && chmod +x "$1"' _ {} \; if [ -d "$dir/linuxpython64/bin" ]; then chmod +x "$dir"/linuxpython64/bin/* @@ -619,9 +634,12 @@ jobs: done (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 . - tar -czf maszyna-linux-x64-noavx2.tar.gz -C maszyna-linux-x64-noavx2 . + # without AVX2: master only + if [ -d maszyna-windows-x64-noavx2 ]; then + (cd maszyna-windows-x64-noavx2 && zip -qr9 ../maszyna-windows-x64-noavx2.zip .) + tar -czf maszyna-linux-x64-noavx2.tar.gz -C maszyna-linux-x64-noavx2 . + fi ls -la - name: Publish rolling release of the branch @@ -636,23 +654,26 @@ jobs: tag="build-$slug" base="${{ github.server_url }}/${{ github.repository }}/releases/download/$tag" + assets=(dist/maszyna-windows-x64.zip dist/maszyna-linux-x64.tar.gz) + links=("- Windows: $base/maszyna-windows-x64.zip" "- Linux: $base/maszyna-linux-x64.tar.gz") + if [ -f dist/maszyna-windows-x64-noavx2.zip ]; then + assets+=(dist/maszyna-windows-x64-noavx2.zip dist/maszyna-linux-x64-noavx2.tar.gz) + links+=("- Windows, CPUs without AVX2 (older than Haswell, 2013): $base/maszyna-windows-x64-noavx2.zip" + "- Linux, CPUs without AVX2: $base/maszyna-linux-x64-noavx2.tar.gz") + else + links+=("- CPUs without AVX2 (older than Haswell, 2013): built for master only, see the release build-master") + fi notes="$(printf '%s\n' \ "Automatic build of branch \`$BRANCH\`, commit $SHA, replaced by every push to the branch." \ "" \ "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" \ - "- Linux, CPUs without AVX2: $base/maszyna-linux-x64-noavx2.tar.gz" \ + "${links[@]}" \ "" \ "Unpack over a MaSzyna installation (the game data isn't included). Build log: $RUN_URL")" 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 \ - dist/maszyna-linux-x64-noavx2.tar.gz \ + "${assets[@]}" \ --target "$SHA" \ --prerelease \ --latest=false \