Skip to content

Commit e5854b1

Browse files
committed
cross fix
1 parent 9c8a36d commit e5854b1

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

.github/workflows/dojoc.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)