Skip to content

Commit 77f779d

Browse files
committed
Add targets to all cargo commands in CI
1 parent 05e001b commit 77f779d

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.github/workflows/test.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@ jobs:
1717
matrix:
1818
os: [ubuntu-latest, windows-latest, macos-latest]
1919
include:
20-
- java-arch: "x64"
20+
- os: ubuntu-latest
21+
rust-target: x86_64-unknown-linux-gnu
22+
java-arch: x64
23+
- os: windows-latest
24+
rust-target: x86_64-pc-windows-msvc
25+
java-arch: x64
2126
- os: macos-latest
22-
java-arch: "aarch64"
27+
rust-target: aarch64-apple-darwin
28+
java-arch: aarch64
2329
fail-fast: false
2430
runs-on: ${{ matrix.os }}
2531

@@ -45,10 +51,10 @@ jobs:
4551
run: cargo fmt -- --check
4652
- name: Clippy
4753
if: matrix.os == 'ubuntu-latest'
48-
run: cargo clippy --all-features
54+
run: cargo clippy --all-features --target ${{ matrix.rust-target }}
4955

5056
- name: Build test binary
51-
run: cargo test --no-run
57+
run: cargo test --no-run --target ${{ matrix.rust-target }}
5258

5359
- name: Install dependencies
5460
if: matrix.os == 'ubuntu-latest'
@@ -86,4 +92,4 @@ jobs:
8692
Rscript -e 'install.packages("crates/plugins/r/tests/tmcRtestrunner", repos=NULL, type="source")'
8793
8894
- name: Run tests
89-
run: cargo test --no-fail-fast
95+
run: cargo test --no-fail-fast --target ${{ matrix.rust-target }}

.github/workflows/upload-binaries.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
gsutil cp ./target/${{ matrix.target }}/release/tmc-langs-cli.exe gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-cli-${{ matrix.target }}-$Env:TAG.exe
102102
gsutil cp ./crates/bindings/tmc-langs-node/ts/functions.node gs://${{ secrets.GCP_BUCKET }}/tmc-langs-rust/tmc-langs-${{ matrix.target }}-$Env:TAG.node
103103
104-
macos-11:
104+
macos:
105105
runs-on: macos-11
106106
strategy:
107107
matrix:
@@ -127,7 +127,7 @@ jobs:
127127

128128
- name: Cargo build
129129
run: |
130-
cargo build -p tmc-langs-cli --release
130+
cargo build -p tmc-langs-cli --release --target ${{ matrix.target }}
131131
npm --prefix ./crates/bindings/tmc-langs-node install
132132
npm run --prefix ./crates/bindings/tmc-langs-node build -- --release
133133
- name: Sign

0 commit comments

Comments
 (0)