@@ -10,25 +10,40 @@ permissions:
1010jobs :
1111 build :
1212 name : Build ${{ matrix.target }}
13- runs-on : ${{ matrix.runs-on }}
13+ runs-on : >-
14+ ${{ github.repository == 'vortex-data/vortex'
15+ && matrix.runner
16+ || matrix.fallback_runner }}
1417 timeout-minutes : 120
1518 strategy :
1619 fail-fast : false
1720 matrix :
1821 include :
1922 - target : aarch64-apple-darwin
20- runs-on : macos-latest
23+ runner : macos-latest
24+ fallback_runner : macos-latest
2125 archive : tgz
2226 - target : x86_64-apple-darwin
23- runs-on : macos-15-intel
27+ runner : macos-15-intel
28+ fallback_runner : macos-15-intel
2429 archive : tgz
30+ # Linux targets cross-compile from an amd64 runs-on runner via
31+ # cargo-zigbuild with glibc 2.31 pinning, matching the Python wheel
32+ # and JNI builds.
2533 - target : aarch64-unknown-linux-gnu
26- runs-on : ubuntu-24.04-arm
34+ runner : runs-on=${{ github.run_id }}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=release-vx-aarch64-linux
35+ fallback_runner : ubuntu-24.04
2736 archive : tgz
2837 - target : x86_64-unknown-linux-gnu
29- runs-on : ubuntu-24.04
38+ runner : runs-on=${{ github.run_id }}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=release-vx-amd64-linux
39+ fallback_runner : ubuntu-24.04
3040 archive : tgz
3141 steps :
42+ - uses : runs-on/action@v2
43+ if : github.repository == 'vortex-data/vortex' && contains(matrix.target, 'linux')
44+ with :
45+ sccache : s3
46+
3247 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3348 with :
3449 fetch-depth : 0
3752 with :
3853 repo-token : ${{ secrets.GITHUB_TOKEN }}
3954 targets : ${{ matrix.target }}
40- enable-sccache : " false"
55+ enable-sccache : ${{ contains(matrix.target, 'linux') && 'true' || 'false' }}
56+
57+ - name : Setup Zig
58+ if : contains(matrix.target, 'linux')
59+ uses : mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
60+
61+ - name : Install cargo-zigbuild
62+ if : contains(matrix.target, 'linux')
63+ uses : taiki-e/cache-cargo-install-action@66c9585ef5ca780ee69399975a5e911f47905995
64+ with :
65+ tool : cargo-zigbuild
66+
67+ - name : Build release binary (Linux, zigbuild)
68+ if : contains(matrix.target, 'linux')
69+ run : cargo zigbuild --release --package vortex-tui --bin vx --target ${{ matrix.target }}.2.31
4170
42- - name : Build release binary
71+ - name : Build release binary (macOS)
72+ if : contains(matrix.target, 'apple-darwin')
4373 run : cargo build --release --package vortex-tui --bin vx --target ${{ matrix.target }}
4474
4575 - name : Create archive (tgz)
0 commit comments