round-build.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: Round build
  2. # Windows build of a work tree, so development builds don't wait for a slot on the local machine.
  3. # tools/ci-round-build.sh pushes the tree to ci/<name>, waits for this run, downloads the artifact and deletes the branch.
  4. on:
  5. push:
  6. branches: ['ci/**']
  7. env:
  8. JUCE_VERSION: 8.0.4
  9. JUCE_SHA256: 0effe9823a6fd8a4f98e5c08be7d308350e417b2d15dcf34011e778fefbbf005
  10. ZIG_VERSION: 0.14.1
  11. ZIG_SHA256: 24aeeec8af16c381934a6cd7d95c807a8cb2cf7df9fa40d359aa884195c4716c
  12. jobs:
  13. windows:
  14. name: Windows (zig)
  15. runs-on: ubuntu-24.04
  16. timeout-minutes: 120
  17. steps:
  18. - uses: actions/checkout@v5
  19. - name: Zig and JUCE (checksums verified)
  20. run: |
  21. curl -fsSL -o zig.tar.xz "https://ziglang.org/download/$ZIG_VERSION/zig-x86_64-linux-$ZIG_VERSION.tar.xz"
  22. echo "$ZIG_SHA256 zig.tar.xz" | sha256sum -c -
  23. mkdir -p "$RUNNER_TEMP/zig" && tar xJf zig.tar.xz -C "$RUNNER_TEMP/zig" --strip-components 1 && rm zig.tar.xz
  24. curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
  25. echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
  26. mkdir -p "$RUNNER_TEMP/juce" && tar xzf juce.tar.gz -C "$RUNNER_TEMP/juce" --strip-components 1 && rm juce.tar.gz
  27. # Every run restores the newest cache and saves its own: unchanged sources are copied, not compiled
  28. - uses: actions/cache@v4
  29. with:
  30. path: ~/.cache/lynx-objcache
  31. key: round-objcache-${{ github.run_id }}
  32. restore-keys: round-objcache-
  33. # Round builds keep the fast default (-O2, no LTO). "[release-opt]" in the commit message (tools/ci-round-build.sh
  34. # with LYNX_CI_RELEASE_OPT=1) builds with the release's code generation instead (round 190kz: real -O3 + ThinLTO).
  35. - name: Build
  36. env:
  37. RELEASE_OPT: ${{ contains(github.event.head_commit.message, '[release-opt]') }}
  38. run: |
  39. ulimit -s 1048576 || true
  40. if [[ "$RELEASE_OPT" == true ]]; then export LYNX_WIN_OPT="-O2 -Xclang -O3" LYNX_WIN_LTO=thin; fi
  41. # JOBS=2 (rollup 0.1.31 step 4; round 190of): with one compile per core the hosted runner kept losing
  42. # communication at ~50 min; two compiles at a time passed
  43. ZIG="$RUNNER_TEMP/zig/zig" JUCE_DIR="$RUNNER_TEMP/juce" OUT=build-win JOBS=2 scripts/build-windows-zig.sh
  44. - uses: actions/upload-artifact@v4
  45. with:
  46. name: build-win
  47. retention-days: 2
  48. compression-level: 6
  49. if-no-files-found: error
  50. path: |
  51. build-win/*.exe
  52. build-win/*.dll
  53. build-win/*.pdb