-
Notifications
You must be signed in to change notification settings - Fork 756
119 lines (102 loc) · 3.5 KB
/
cargo-hack-check.yml
File metadata and controls
119 lines (102 loc) · 3.5 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Cargo Hack Check
on:
workflow_call:
env:
RUST_BACKTRACE: full
concurrency:
group: cargo-hack-check-${{ github.head_ref || github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# Native targets (Windows/Linux)
native-targets:
name: All Crates (Windows/Linux)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
target: x86_64-pc-windows-gnu,x86_64-unknown-linux-gnu
cache: false
- name: Install cargo-hack
uses: taiki-e/install-action@2383334cf567d78771fc7d89b6b3802ef1412cf6 # v2.56.8
with:
tool: cargo-hack
- name: Install Windows cross-compilation tools
run: |
sudo apt-get update
sudo apt-get install -y gcc-mingw-w64-x86-64
- name: Run cargo hack check
run: |
cargo hack check \
--all \
--each-feature \
--no-dev-deps \
--exclude-features=wasm-deterministic,wasm-web \
--target x86_64-pc-windows-gnu \
--target x86_64-unknown-linux-gnu
# WASM targets - No caching needed as it runs in parallel with longer jobs
wasm-targets:
name: WASM targets
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
target: wasm32-unknown-unknown
cache: false
- name: Install cargo-hack
uses: taiki-e/install-action@2383334cf567d78771fc7d89b6b3802ef1412cf6 # v2.56.8
with:
tool: cargo-hack
- name: Run cargo hack check (WASM Web)
run: |
cargo hack check \
-p clarity \
-p clarity-types \
-p stacks-common \
--each-feature \
--no-dev-deps \
--exclude-features=default,rusqlite,ctrlc-handler,wasm-deterministic,testing \
--features=wasm-web
- name: Run cargo hack check (WASM Deterministic)
run: |
cargo hack check \
-p clarity-types \
-p stacks-common \
--each-feature \
--no-dev-deps \
--include-features=wasm-deterministic,slog_json \
--features=wasm-deterministic
fuzz-targets:
name: Fuzz targets (nightly)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install Rust nightly toolchain
uses: actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48 # v1.13.0
with:
toolchain: nightly
cache: false
- name: Check fuzz targets (clarity)
run: |
cargo +nightly check \
--manifest-path clarity/fuzz/Cargo.toml \
--bins \
--locked
- name: Check fuzz targets (stackslib)
run: |
cargo +nightly check \
--manifest-path stackslib/fuzz/Cargo.toml \
--bins \
--locked