-
Notifications
You must be signed in to change notification settings - Fork 35
127 lines (110 loc) · 3.65 KB
/
Copy pathrust.yml
File metadata and controls
127 lines (110 loc) · 3.65 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
120
121
122
123
124
125
126
127
on: # yamllint disable-line rule:truthy
pull_request:
push:
branches:
- master
- 'test-ci/**'
name: Continuous integration
jobs:
Test:
name: Test - ${{ matrix.toolchain }} toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly, msrv]
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Setup cargo-rbmt"
uses: ./.github/actions/setup-rbmt
- name: "Run tests"
run: cargo rbmt --lock-file existing test --toolchain ${{ matrix.toolchain }}
Windows:
name: Test - Windows stable toolchain
runs-on: windows-latest
strategy:
fail-fast: false
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Select toolchain"
uses: dtolnay/rust-toolchain@stable
- name: "Run tests"
run: cargo test
Check:
name: Check - ${{ matrix.task }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
task: [lint, docs, docsrs]
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Setup cargo-rbmt"
uses: ./.github/actions/setup-rbmt
- name: "Run ${{ matrix.task }}"
run: cargo rbmt --lock-file existing ${{ matrix.task }}
Format:
name: Format
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Setup cargo-rbmt"
uses: ./.github/actions/setup-rbmt
- name: "Check formatting"
run: cargo rbmt fmt --check
Wasm:
name: Check WASM
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout Crate
uses: actions/checkout@v3
- name: Checkout Toolchain
uses: dtolnay/rust-toolchain@stable
- run: rustup target add wasm32-unknown-unknown
- run: cargo check --target wasm32-unknown-unknown
Fuzz:
name: Check Fuzz
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Setup cargo-rbmt"
uses: ./.github/actions/setup-rbmt
- name: "Install cargo-fuzz"
run: cargo rbmt tools cargo-fuzz
- name: "Check fuzz crate"
run: cargo rbmt --lock-file existing run --toolchain nightly -- check --manifest-path fuzz/Cargo.toml
- name: "Run fuzz target unit tests"
run: cargo rbmt --lock-file existing run --toolchain nightly -- test --manifest-path fuzz/Cargo.toml --bins
- name: "Run cargo-fuzz smoke tests"
run: |
set -euo pipefail
export RUSTUP_TOOLCHAIN="$(cargo rbmt toolchains --nightly)"
cargo fuzz list --fuzz-dir fuzz | while read -r target; do
echo "fuzzing $target"
cargo fuzz run --fuzz-dir fuzz "$target" -- -runs=1
done
ExternalJetLib:
name: External Jet Library
runs-on: ubuntu-latest
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Setup cargo-rbmt"
uses: ./.github/actions/setup-rbmt
- name: "Build external jet dylib"
run: cargo rbmt --lock-file existing run --toolchain stable -- build --manifest-path external-jet-lib-example/Cargo.toml --lib
- name: "Build external-lib-consumer binary"
run: cargo rbmt --lock-file existing run --toolchain stable -- build --manifest-path external-jet-lib-example/Cargo.toml --bin external-lib-consumer
- name: "Run external-lib-consumer with compiled dylib"
run: ./target/debug/external-lib-consumer ./target/debug/libexternal_jet_lib_example.so