@@ -68,11 +68,83 @@ jobs:
6868 with :
6969 lfs : " true"
7070
71- - name : Setup Xcode 16
71+ - name : Setup Rust & Cargo
72+ uses : ./.github/actions/setup_rust_cargo
73+
74+ - name : Build darwin target
75+ uses : ./.github/actions/build_cli_macos_target
7276 if : contains(matrix.platform.os-name, 'darwin')
73- uses : maxim-lobanov/setup-xcode@v1
7477 with :
75- xcode-version : 16
78+ target : ${{ matrix.platform.target }}
79+ profile : release
80+ force-sentry-dev : true
81+
82+ - name : Build unix/Windows target
83+ uses : ./.github/actions/build_cli_linux_windows_target
84+ if : ${{ !contains(matrix.platform.os-name, 'darwin') }}
85+ with :
86+ target : ${{ matrix.platform.target }}
87+ profile : release
88+ force-sentry-dev : true
89+
90+ - name : Upload built binary
91+ uses : actions/upload-artifact@v4
92+ if : always()
93+ with :
94+ name : binary-${{ matrix.platform.target }}
95+ path : target/${{ matrix.platform.target }}/release/trunk-analytics-cli*
96+ retention-days : 1
97+
98+ test :
99+ name : Test for ${{ matrix.platform.target }}
100+ needs : [build_release]
101+ strategy :
102+ matrix :
103+ platform :
104+ - os-name : linux-x86_64
105+ runs-on : ubuntu-latest
106+ target : x86_64-unknown-linux-musl
107+
108+ - os-name : linux-aarch64
109+ runs-on : ubuntu-24.04-arm
110+ target : aarch64-unknown-linux-musl
111+
112+ - os-name : x86_64-darwin
113+ runs-on : macos-latest
114+ target : x86_64-apple-darwin
115+
116+ - os-name : aarch64-darwin
117+ runs-on : macos-latest
118+ target : aarch64-apple-darwin
119+
120+ - os-name : windows-x86_64
121+ runs-on : public-amd64-4xlarge-dind-germany
122+ target : x86_64-pc-windows-gnu
123+
124+ runs-on : ${{ matrix.platform.runs-on }}
125+ steps :
126+ # we've been hitting out of free space issues
127+ - name : Delete unnecessary tools folder
128+ run : rm -rf /opt/hostedtoolcache
129+
130+ - name : Install build tools (Windows and Linux build)
131+ shell : bash
132+ if : ${{ !contains(matrix.platform.os-name, 'darwin') }}
133+ run : |
134+ sudo bash -c 'cat << EOF > /etc/apt/sources.list
135+ deb http://mirror.hetzner.com/ubuntu/packages jammy main restricted universe multiverse
136+ deb http://mirror.hetzner.com/ubuntu/packages jammy-updates main restricted universe multiverse
137+ deb http://mirror.hetzner.com/ubuntu/packages jammy-backports main restricted universe multiverse
138+ deb http://mirror.hetzner.com/ubuntu/packages jammy-security main restricted universe multiverse
139+ EOF'
140+ sudo apt-get update
141+ sudo apt-get install -y git-lfs build-essential
142+ git lfs install
143+
144+ - name : Checkout
145+ uses : actions/checkout@v4
146+ with :
147+ lfs : " true"
76148
77149 - name : Setup Rust & Cargo
78150 uses : ./.github/actions/setup_rust_cargo
@@ -99,21 +171,16 @@ jobs:
99171 target : ${{ matrix.platform.target }}
100172 codecov-token : ${{ secrets.CODECOV_TOKEN }}
101173
102- - name : Build darwin target
103- uses : ./.github/actions/build_cli_macos_target
104- if : contains(matrix.platform.os-name, 'darwin')
174+ - name : Download built binary
175+ uses : actions/download-artifact@v4
105176 with :
106- target : ${{ matrix.platform.target }}
107- profile : release
108- force-sentry-dev : true
177+ name : binary-${{ matrix.platform.target }}
178+ path : target/${{ matrix.platform.target }}/release/
109179
110- - name : Build unix/Windows target
111- uses : ./.github/actions/build_cli_linux_windows_target
112- if : ${{ !contains(matrix.platform.os-name, 'darwin') }}
113- with :
114- target : ${{ matrix.platform.target }}
115- profile : release
116- force-sentry-dev : true
180+ - name : Make binary executable
181+ shell : bash
182+ if : ${{ !contains(matrix.platform.os-name, 'windows') }}
183+ run : chmod +x target/${{ matrix.platform.target }}/release/trunk-analytics-cli
117184
118185 - name : Extract step outcome
119186 shell : bash
@@ -169,13 +236,33 @@ jobs:
169236 - name : Build workspace
170237 run : cargo build --all
171238
239+ - name : Trunk Check
240+ uses : trunk-io/trunk-action@v1
241+ with :
242+ cache : false
243+
244+ build_pyo3 :
245+ name : Build context-py
246+ runs-on : ubuntu-latest
247+
248+ steps :
249+ - uses : actions/checkout@v4
250+
251+ - name : Delete huge unnecessary tools folder
252+ run : rm -rf /opt/hostedtoolcache
253+
172254 - name : Setup and build pyo3
173255 uses : ./.github/actions/setup_build_pyo3
174256
257+ build_wasm :
258+ name : Build context-js (WASM)
259+ runs-on : ubuntu-latest
260+
261+ steps :
262+ - uses : actions/checkout@v4
263+
264+ - name : Delete huge unnecessary tools folder
265+ run : rm -rf /opt/hostedtoolcache
266+
175267 - name : Setup and build wasm
176268 uses : ./.github/actions/setup_build_wasm
177-
178- - name : Trunk Check
179- uses : trunk-io/trunk-action@v1
180- with :
181- cache : false
0 commit comments