Skip to content

ci: Test with gnu and musl targets #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,37 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: macos-latest
target: aarch64-apple-darwin

steps:
- uses: actions/checkout@v5

- run: ./scripts/install-protobuf.sh
shell: bash

- run: rustup toolchain install nightly --component rustfmt
- if: matrix.target == 'x86_64-unknown-linux-musl'
run: sudo apt-get update && sudo apt-get install -y musl-tools && rustup target add x86_64-unknown-linux-musl

- run: rustup toolchain install nightly --component rustfmt --target ${{ matrix.target }}
- run: cargo +nightly fmt --all -- --check

# the "runc" and "containerd-shim" crates have `sync` code that is not covered by the workspace
- run: cargo check -p runc --all-targets
- run: cargo clippy -p runc --all-targets -- -D warnings
- run: cargo check -p containerd-shim --all-targets
- run: cargo clippy -p containerd-shim --all-targets -- -D warnings
- run: cargo check -p runc --all-targets --target ${{ matrix.target }}
- run: cargo clippy -p runc --all-targets --target ${{ matrix.target }} -- -D warnings
- run: cargo check -p containerd-shim --all-targets --target ${{ matrix.target }}
- run: cargo clippy -p containerd-shim --all-targets --target ${{ matrix.target }} -- -D warnings

# check the workspace
- run: cargo check --examples --tests --all-targets
- run: cargo check --examples --tests --all-targets --all-features
- run: cargo clippy --all-targets -- -D warnings
- run: cargo clippy --all-targets --all-features -- -D warnings
- run: cargo check --examples --tests --all-targets --target ${{ matrix.target }}
- run: cargo check --examples --tests --all-targets --all-features --target ${{ matrix.target }}
- run: cargo clippy --all-targets --target ${{ matrix.target }} -- -D warnings
- run: cargo clippy --all-targets --all-features --target ${{ matrix.target }} -- -D warnings

- run: cargo doc --no-deps --features docs
env:
Expand Down
Loading