Skip to content

Commit e287c4d

Browse files
committed
ci: Test with gnu and musl targets
Then we can ensure we don't end up with a similar issue that happend with containerd-shim-protos not being buildable with musl on 0.9.0. Signed-off-by: Fabiano Fidêncio <[email protected]>
1 parent e08126e commit e287c4d

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,37 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
os: [ubuntu-latest, macos-latest]
17+
include:
18+
- os: ubuntu-latest
19+
target: x86_64-unknown-linux-gnu
20+
- os: ubuntu-latest
21+
target: x86_64-unknown-linux-musl
22+
- os: macos-latest
23+
target: aarch64-apple-darwin
1824

1925
steps:
2026
- uses: actions/checkout@v5
2127

2228
- run: ./scripts/install-protobuf.sh
2329
shell: bash
2430

25-
- run: rustup toolchain install nightly --component rustfmt
31+
- if: matrix.target == 'x86_64-unknown-linux-musl'
32+
run: sudo apt-get update && sudo apt-get install -y musl-tools && rustup target add x86_64-unknown-linux-musl
33+
34+
- run: rustup toolchain install nightly --component rustfmt --target ${{ matrix.target }}
2635
- run: cargo +nightly fmt --all -- --check
2736

2837
# the "runc" and "containerd-shim" crates have `sync` code that is not covered by the workspace
29-
- run: cargo check -p runc --all-targets
30-
- run: cargo clippy -p runc --all-targets -- -D warnings
31-
- run: cargo check -p containerd-shim --all-targets
32-
- run: cargo clippy -p containerd-shim --all-targets -- -D warnings
38+
- run: cargo check -p runc --all-targets --target ${{ matrix.target }}
39+
- run: cargo clippy -p runc --all-targets --target ${{ matrix.target }} -- -D warnings
40+
- run: cargo check -p containerd-shim --all-targets --target ${{ matrix.target }}
41+
- run: cargo clippy -p containerd-shim --all-targets --target ${{ matrix.target }} -- -D warnings
3342

3443
# check the workspace
35-
- run: cargo check --examples --tests --all-targets
36-
- run: cargo check --examples --tests --all-targets --all-features
37-
- run: cargo clippy --all-targets -- -D warnings
38-
- run: cargo clippy --all-targets --all-features -- -D warnings
44+
- run: cargo check --examples --tests --all-targets --target ${{ matrix.target }}
45+
- run: cargo check --examples --tests --all-targets --all-features --target ${{ matrix.target }}
46+
- run: cargo clippy --all-targets --target ${{ matrix.target }} -- -D warnings
47+
- run: cargo clippy --all-targets --all-features --target ${{ matrix.target }} -- -D warnings
3948

4049
- run: cargo doc --no-deps --features docs
4150
env:

0 commit comments

Comments
 (0)