-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (48 loc) · 1.45 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
pull_request:
push:
branches:
- master
schedule:
- cron: "0 3 * * 2" # 2 = Tuesday
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.dylint_drivers/
~/.rustup/toolchains/
target/dylint/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install tools
run: |
rm -f "$HOME"/.cargo/bin/cargo-fmt
rm -f "$HOME"/.cargo/bin/rustfmt
rustup update
rustup install nightly
rustup component add clippy --toolchain nightly
rustup component add rustfmt
rustup component add rustfmt --toolchain nightly
cargo install cargo-dylint dylint-link || true
cargo install cargo-license || true
cargo install cargo-sort || true
cargo install cargo-supply-chain || true
cargo install cargo-udeps || true
- name: Test
run: cargo test --features=ci
- name: Test with checks
run: cargo test --features=rewriter/check-offsets,rewriter/check-rewrites