-
Notifications
You must be signed in to change notification settings - Fork 107
97 lines (75 loc) · 2.73 KB
/
check.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Check
on:
workflow_call:
inputs:
cache:
type: string
required: true
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUST_BACKTRACE: short
TERM: xterm-256color
BINARYEN_VERSION: version_111
jobs:
linux:
runs-on: [kuberunner, github-runner-01]
env:
RUSTUP_HOME: /tmp/rustup_home
SCCACHE_DIR: ${{ inputs.cache }}
steps:
- name: "ACTIONS: Checkout"
uses: actions/checkout@v4
- name: "Install: Set cargo path"
run: echo "/tmp/cargo/bin" >> $GITHUB_PATH
- name: "Install: Rust toolchain"
uses: dsherret/rust-toolchain-file@v1
- name: "Check formatting: Gear"
run: ./scripts/gear.sh format gear --check
- name: "Check formatting: Doc"
run: ./scripts/gear.sh format doc --check
- name: "Check clippy: Gear"
run: ./scripts/gear.sh clippy gear --all-targets --all-features --locked
- name: "Check clippy: Examples"
run: ./scripts/gear.sh clippy examples --all-targets --locked
- name: "Test: Doc tests"
run: ./scripts/gear.sh test docs
- name: "Test: Changes in gsdk generated code"
run: |
GENERATED_CODE="gsdk/src/metadata/generated.rs"
./scripts/update-gsdk-metadata.sh
if [[ $(git diff --stat $GENERATED_CODE) != '' ]]; then
echo "Changes found in the gsdk generated code ($GENERATED_CODE). Please update it following the instructions in \`gsdk/HOW-TO-UPDATE.md\`."
git --no-pager diff $GENERATED_CODE
exit 1
fi
- name: "Install: Rust stable toolchain"
uses: dtolnay/rust-toolchain@stable
- name: "Check: Compiling gstd on stable"
run: cargo +stable check -p gstd
- run: sccache --show-stats
fuzzer:
runs-on: [kuberunner, github-runner-01]
env:
RUSTUP_HOME: /tmp/rustup_home
SCCACHE_DIR: ${{ inputs.cache }}
steps:
- name: Cancel Previous Runs
if: ${{ github.event_name == 'pull_request' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: "ACTIONS: Checkout"
uses: actions/checkout@v4
- name: "Install: Set cargo path"
run: echo "/tmp/cargo/bin" >> $GITHUB_PATH
- name: "Install: Rust toolchain"
uses: dsherret/rust-toolchain-file@v1
- name: "Install: cargo-nextest"
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- name: Install cargo-fuzz
run: cargo install cargo-fuzz
- name: "Check fuzzer with mutation test"
run: ./scripts/check-fuzzer.sh
- name: "Check fuzzer reproduction"
run: ./scripts/gear.sh test fuzz-repr