|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | Formatting: |
11 | | - runs-on: ubuntu-latest |
| 11 | + runs-on: ubuntu-22.04 |
12 | 12 | steps: |
13 | 13 | - name: Checkout repository |
14 | | - uses: actions/checkout@v2 |
| 14 | + uses: actions/checkout@v4 |
15 | 15 |
|
16 | 16 | - name: Install stable toolchain |
17 | | - uses: actions-rs/toolchain@v1.0.6 |
| 17 | + uses: dtolnay/rust-toolchain@stable |
18 | 18 | with: |
19 | 19 | toolchain: stable |
20 | | - override: true |
21 | 20 | components: rustfmt |
22 | 21 |
|
23 | 22 | - name: Check format |
24 | 23 | run: cargo fmt -- --check |
25 | 24 |
|
26 | 25 | Linting: |
27 | | - runs-on: ubuntu-latest |
| 26 | + runs-on: ubuntu-22.04 |
28 | 27 | steps: |
29 | 28 | - name: Checkout repository |
30 | | - uses: actions/checkout@v2 |
| 29 | + uses: actions/checkout@v4 |
31 | 30 | with: |
32 | 31 | submodules: recursive |
33 | 32 |
|
34 | 33 | - name: Install stable toolchain |
35 | | - uses: actions-rs/toolchain@v1.0.6 |
| 34 | + uses: dtolnay/rust-toolchain@stable |
36 | 35 | with: |
37 | 36 | toolchain: stable |
38 | | - override: true |
39 | 37 | components: clippy |
40 | 38 |
|
41 | 39 | - name: Lint with clippy |
42 | | - uses: actions-rs/clippy-check@v1 |
43 | | - with: |
44 | | - token: ${{ secrets.GITHUB_TOKEN }} |
| 40 | + run: RUSTFLAGS="-Dwarnings" cargo clippy --all-features --all-targets -- -Dclippy::all -Dunused_imports |
45 | 41 |
|
46 | 42 | Testing: |
47 | 43 | needs: Formatting |
48 | | - runs-on: ubuntu-latest |
| 44 | + strategy: |
| 45 | + matrix: |
| 46 | + os: [ubuntu-22.04, ubuntu-22.04-arm] |
| 47 | + runs-on: ${{ matrix.os }} |
49 | 48 | steps: |
50 | 49 | - name: Checkout repository |
51 | | - uses: actions/checkout@v2 |
| 50 | + uses: actions/checkout@v4 |
52 | 51 | with: |
53 | 52 | submodules: recursive |
54 | 53 |
|
55 | 54 | - name: Install nightly toolchain |
56 | | - uses: actions-rs/toolchain@v1.0.6 |
| 55 | + uses: dtolnay/rust-toolchain@stable |
57 | 56 | with: |
58 | 57 | toolchain: nightly |
59 | | - override: true |
60 | 58 |
|
61 | 59 | - name: Install system dependencies |
62 | 60 | run: | |
63 | 61 | sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev |
64 | 62 |
|
65 | | - - uses: Swatinem/rust-cache@v1.3.0 |
| 63 | + - uses: Swatinem/rust-cache@v2 |
66 | 64 |
|
67 | 65 | - name: Run cargo-tarpaulin |
68 | | - uses: actions-rs/[email protected] |
69 | | - with: |
70 | | - # TODO: update to latest tarpaulin once artefact download is fixed: https://github.com/actions-rs/tarpaulin/pull/23 |
71 | | - version: "0.22.0" |
72 | | - args: "--all-features --run-types Tests,Doctests --out Lcov -- --test-threads 1" |
| 66 | + run: | |
| 67 | + set -x |
| 68 | + cargo install cargo-tarpaulin |
| 69 | + cargo tarpaulin --all-features --tests --doc --out Lcov -- --test-threads 1 |
73 | 70 |
|
74 | 71 | - name: Upload coverage |
75 | | - uses: coverallsapp/github-action@v1 |
| 72 | + uses: coverallsapp/github-action@v2 |
76 | 73 | with: |
77 | 74 | github-token: ${{ secrets.GITHUB_TOKEN }} |
78 | 75 | path-to-lcov: ./lcov.info |
79 | 76 |
|
80 | 77 | Testing-Features: |
81 | 78 | needs: Formatting |
82 | | - runs-on: ubuntu-latest |
83 | 79 | strategy: |
84 | 80 | matrix: |
| 81 | + os: [ubuntu-22.04, ubuntu-22.04-arm] |
85 | 82 | target: |
86 | 83 | - no-default-features |
87 | 84 | - all-features |
88 | 85 | include: |
89 | 86 | - target: no-default-features |
90 | 87 | args: --no-default-features |
91 | | - use_cross: false |
92 | 88 | - target: all-features |
| 89 | + os: ubuntu-22.04 |
93 | 90 | args: --all-features |
94 | 91 | toolchain_target: x86_64-unknown-linux-musl |
95 | | - use_cross: false |
| 92 | + - target: all-features |
| 93 | + os: ubuntu-22.04-arm |
| 94 | + args: --all-features |
| 95 | + toolchain_target: aarch64-unknown-linux-musl |
| 96 | + runs-on: ${{ matrix.os }} |
96 | 97 |
|
97 | 98 | steps: |
98 | 99 | - name: Checkout repository |
99 | | - uses: actions/checkout@v2 |
| 100 | + uses: actions/checkout@v4 |
100 | 101 | with: |
101 | 102 | submodules: recursive |
102 | 103 |
|
103 | 104 | - name: Install stable toolchain |
104 | | - uses: actions-rs/toolchain@v1.0.6 |
| 105 | + uses: dtolnay/rust-toolchain@stable |
105 | 106 | with: |
106 | 107 | toolchain: stable |
107 | | - override: true |
108 | 108 |
|
109 | 109 | - name: Install system dependencies |
110 | 110 | run: | |
111 | 111 | sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev |
112 | 112 |
|
113 | | - - uses: Swatinem/rust-cache@v1.3.0 |
| 113 | + - uses: Swatinem/rust-cache@v2 |
114 | 114 |
|
115 | 115 | - name: Test |
116 | | - uses: actions-rs/cargo@v1 |
117 | | - with: |
118 | | - command: test |
119 | | - args: ${{ matrix.args }} |
120 | | - use-cross: ${{ matrix.use_cross }} |
| 116 | + run: | |
| 117 | + cargo test ${{ matrix.args }} |
121 | 118 |
|
122 | 119 | Testing-MacOS: |
123 | 120 | needs: Formatting |
@@ -150,27 +147,23 @@ jobs: |
150 | 147 |
|
151 | 148 | steps: |
152 | 149 | - name: Checkout repository |
153 | | - uses: actions/checkout@v2 |
| 150 | + uses: actions/checkout@v4 |
154 | 151 | with: |
155 | 152 | submodules: recursive |
156 | 153 |
|
157 | 154 | - name: Install stable toolchain |
158 | | - uses: actions-rs/toolchain@v1.0.6 |
| 155 | + uses: dtolnay/rust-toolchain@stable |
159 | 156 | with: |
160 | 157 | toolchain: ${{ matrix.toolchain }} |
161 | | - target: ${{ matrix.toolchain_target }} |
| 158 | + targets: ${{ matrix.toolchain_target }} |
162 | 159 | override: true |
163 | | - default: ${{ matrix.default }} |
164 | 160 |
|
165 | 161 | - name: Install htslib dependencies |
166 | 162 | run: brew install bzip2 zlib xz curl-openssl |
167 | 163 |
|
168 | 164 | - name: Test |
169 | | - uses: actions-rs/[email protected] |
170 | | - with: |
171 | | - use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017 |
172 | | - command: test |
173 | | - args: --release --all-features --verbose ${{ matrix.aux_args }} |
| 165 | + run: | |
| 166 | + cargo test --release --all-features --verbose ${{ matrix.aux_args }} |
174 | 167 | # Testing-OSX-MUSL-BigSur: |
175 | 168 | # needs: Formatting |
176 | 169 | # runs-on: macOS-11.0 |
|
0 commit comments