Debian Codegraph @

debian/rust-vendor/crc32fast/.github/workflows/ci.yml

raw
1 name: CI
2
3 on:
4 pull_request:
5 branches:
6 - master
7 push:
8 branches:
9 - master
10
11 jobs:
12 stable:
13 name: stable
14 strategy:
15 matrix:
16 os:
17 - ubuntu-latest
18 - macos-latest
19 - windows-latest
20 runs-on: ${{ matrix.os }}
21 steps:
22 - uses: actions/checkout@v4
23 - name: Install Rust
24 run: rustup update stable --no-self-update
25 - name: Test in debug mode
26 run: cargo test --no-fail-fast
27 - name: Test in release mode
28 run: cargo test --no-fail-fast --release
29 - name: Check with no default features
30 run: cargo check --no-default-features
31 nightly:
32 name: nightly
33 runs-on: ubuntu-latest
34 steps:
35 - uses: actions/checkout@v4
36 - name: Install Rust
37 run: rustup update nightly
38 - name: Test in debug mode
39 run: cargo +nightly test --no-fail-fast
40 - name: Test in release mode
41 run: cargo +nightly test --no-fail-fast --release
42 - name: Check with no default features
43 run: cargo +nightly check --no-default-features
44 - name: Build benches
45 run: cargo +nightly build --benches --all
46 msrv:
47 name: msrv
48 runs-on: ubuntu-latest
49 steps:
50 - uses: actions/checkout@v4
51 - name: Get MSRV from Cargo.toml
52 id: msrv
53 run: echo "version=$(grep '^rust-version' Cargo.toml | sed 's/rust-version = "\(.*\)"/\1/')" >> $GITHUB_OUTPUT
54 - name: Install Rust
55 run: rustup update ${{ steps.msrv.outputs.version }} && rustup default ${{ steps.msrv.outputs.version }}
56 # Dev-dependencies evolve more quickly than we'd like and don't keep to
57 # our MSRV, so we only build the library here rather than run the test
58 # suite (which would pull in dev-dependencies).
59 - name: Build
60 run: cargo build
61 - name: Build with no default features
62 run: cargo build --no-default-features
63 asan:
64 name: asan
65 runs-on: ubuntu-latest
66 steps:
67 - uses: actions/checkout@v4
68 - name: Install Rust
69 run: rustup update nightly --no-self-update
70 - name: Run address sanitizer
71 run: RUSTFLAGS="-Z sanitizer=address" cargo +nightly test --lib --target x86_64-unknown-linux-gnu
72 env:
73 ASAN_OPTIONS: "detect_odr_violation=0 detect_leaks=0"
74 RUST_BACKTRACE: "1"
75 cross-test:
76 name: cross-test
77 runs-on: ubuntu-latest
78 strategy:
79 matrix:
80 target:
81 - i686-unknown-linux-gnu
82 - aarch64-unknown-linux-gnu
83 steps:
84 - uses: actions/checkout@v4
85 - name: Install Rust
86 run: rustup update --no-self-update
87 - name: Install Cross
88 run: cargo install --force cross
89 - name: Test
90 run: cross test --target=${{ matrix.target }}
91 - name: Check with no default features
92 run: cross check --target=${{ matrix.target }} --no-default-features
93 cross-check:
94 name: cross-check
95 runs-on: ubuntu-latest
96 strategy:
97 matrix:
98 target:
99 - wasm32-unknown-unknown
100 steps:
101 - uses: actions/checkout@v4
102 - name: Install Rust
103 run: rustup update --no-self-update
104 - name: Add target
105 run: rustup target add ${{ matrix.target }}
106 - name: Check
107 run: cargo check --target=${{ matrix.target }}
108 - name: Check with no default features
109 run: cargo check --target=${{ matrix.target }} --no-default-features
110 cross-check-nightly-feature:
111 name: cross-check-nightly-features
112 runs-on: ubuntu-latest
113 strategy:
114 matrix:
115 target:
116 - aarch64-unknown-linux-gnu
117 steps:
118 - uses: actions/checkout@v4
119 - name: Install Rust
120 run: rustup update nightly --no-self-update && rustup default nightly
121 - name: Add target
122 run: rustup target add ${{ matrix.target }}
123 - name: Check
124 run: cargo check --target=${{ matrix.target }} --features=nightly
125 - name: Check with no default features
126 run: cargo check --target=${{ matrix.target }} --no-default-features --features=nightly