File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -177,10 +177,10 @@ jobs:
177177 # Cache key includes the target
178178 key : ${{ runner.os }}-${{ matrix.job.target }}
179179
180- # Install cross for Linux builds if needed (currently only linux-gnu target)
180+ # Install cross for Linux builds
181181 - name : Install cross
182- if : runner.os == 'Linux' && matrix.job.target == 'x86_64-unknown-linux-gnu'
183- run : cargo install cross
182+ if : runner.os == 'Linux'
183+ run : cargo install cross --locked # Using --locked for potentially more deterministic installs
184184
185185 # Apple M1/iOS setup
186186 - name : Apple Setup
@@ -199,15 +199,11 @@ jobs:
199199 shell : bash
200200 run : |
201201 BUILD_CMD="cargo build"
202- if [[ "${{ runner.os }}" == "Linux" && "${{ matrix.job.target }}" == "x86_64-unknown-linux-gnu" ]]; then
203- # Cross is mainly for *to* Linux/Windows from Linux, or other complex cases.
204- # If building Linux on Linux, regular cargo might be fine unless specific linkers needed.
205- # Use cross if encountering issues. Build directly for now.
206- # BUILD_CMD="cross build"
207- echo "Using cargo build for Linux on Linux"
208- elif [[ "${{ runner.os }}" == "Linux" ]]; then
209- # If other targets run on Linux in future (e.g., cross-compiling Windows)
202+ if [[ "${{ runner.os }}" == "Linux" ]]; then
203+ echo "Using cross build for Linux runner"
210204 BUILD_CMD="cross build"
205+ else
206+ echo "Using cargo build for non-Linux runner"
211207 fi
212208
213209 # Build
You can’t perform that action at this time.
0 commit comments