ci: expand test matrix to include musl and aarch64 targets
Consolidate check and test jobs into a matrix strategy to verify compatibility across x86_64 and aarch64 architectures for both glibc and musl toolchains.
This commit is contained in:
1 file changed
+58
-27
+58
-27
@@ -72,32 +72,53 @@ jobs:
|
|||||||
--locked \
|
--locked \
|
||||||
-- -D warnings
|
-- -D warnings
|
||||||
|
|
||||||
check:
|
verify:
|
||||||
name: cargo check
|
name: cargo ${{ matrix.task }} (${{ matrix.target }})
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
timeout-minutes: 20
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- task: check
|
||||||
|
runner: ubuntu-24.04
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
musl: false
|
||||||
|
|
||||||
steps:
|
- task: test
|
||||||
- name: Checkout
|
runner: ubuntu-24.04
|
||||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
target: x86_64-unknown-linux-gnu
|
||||||
with:
|
musl: false
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- task: check
|
||||||
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
|
runner: ubuntu-24.04
|
||||||
with:
|
target: x86_64-unknown-linux-musl
|
||||||
cache-key: check
|
musl: true
|
||||||
|
|
||||||
- name: Run check without default features
|
- task: test
|
||||||
run: |
|
runner: ubuntu-24.04
|
||||||
cargo check \
|
target: x86_64-unknown-linux-musl
|
||||||
--workspace \
|
musl: true
|
||||||
--no-default-features \
|
|
||||||
--locked
|
|
||||||
|
|
||||||
test:
|
- task: check
|
||||||
name: cargo test
|
runner: ubuntu-24.04-arm
|
||||||
runs-on: ubuntu-latest
|
target: aarch64-unknown-linux-gnu
|
||||||
|
musl: false
|
||||||
|
|
||||||
|
- task: test
|
||||||
|
runner: ubuntu-24.04-arm
|
||||||
|
target: aarch64-unknown-linux-gnu
|
||||||
|
musl: false
|
||||||
|
|
||||||
|
- task: check
|
||||||
|
runner: ubuntu-24.04-arm
|
||||||
|
target: aarch64-unknown-linux-musl
|
||||||
|
musl: true
|
||||||
|
|
||||||
|
- task: test
|
||||||
|
runner: ubuntu-24.04-arm
|
||||||
|
target: aarch64-unknown-linux-musl
|
||||||
|
musl: true
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.runner }}
|
||||||
timeout-minutes: 25
|
timeout-minutes: 25
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -106,24 +127,34 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Install musl toolchain
|
||||||
|
if: matrix.musl
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install --no-install-recommends musl-tools
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
|
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
|
||||||
with:
|
with:
|
||||||
cache-key: test
|
target: ${{ matrix.target }}
|
||||||
|
cache-key: ${{ matrix.task }}-${{ matrix.target }}
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run ${{ matrix.task }} with all features
|
||||||
run: |
|
run: |
|
||||||
cargo test \
|
cargo ${{ matrix.task }} \
|
||||||
--workspace \
|
--workspace \
|
||||||
--all-targets \
|
--all-targets \
|
||||||
--all-features \
|
--all-features \
|
||||||
|
--target ${{ matrix.target }} \
|
||||||
--locked
|
--locked
|
||||||
|
|
||||||
- name: Run tests without default features
|
- name: Run ${{ matrix.task }} without default features
|
||||||
run: |
|
run: |
|
||||||
cargo test \
|
cargo ${{ matrix.task }} \
|
||||||
--workspace \
|
--workspace \
|
||||||
|
--all-targets \
|
||||||
--no-default-features \
|
--no-default-features \
|
||||||
|
--target ${{ matrix.target }} \
|
||||||
--locked
|
--locked
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
|
|||||||
Reference in new issue
Block a user