-
Notifications
You must be signed in to change notification settings - Fork 9
64 lines (54 loc) · 1.95 KB
/
ci.yaml
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
name: CI
on: [push, pull_request]
jobs:
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- run: rustup toolchain add 1.31 1.45 stable nightly
- run: cargo +1.31 test --lib # MSRV (examples don't compile)
- run: cargo +1.45 test # First version where all examples compile
- run: cargo +stable test
- run: cargo +nightly test
test_wasm:
name: Test (WASM)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup toolchain add 1.31 stable nightly
- run: rustup target add wasm32-unknown-unknown --toolchain 1.31
- run: rustup target add wasm32-unknown-unknown --toolchain stable
- run: rustup target add wasm32-unknown-unknown --toolchain nightly
- run: ./test_wasm.js 1.31
- run: ./test_wasm.js stable
- run: ./test_wasm.js nightly
fuzz:
name: Fuzz
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup toolchain add nightly
- run: cargo install cargo-fuzz
# Two minutes is a very short time to fuzz, but we have a very small state space.
# I sometimes fuzz locally for an hour or so.
- run: cargo +nightly fuzz run fuzz_target_1 -- -max_len=100000 -timeout=1 -max_total_time=120
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup target add x86_64-pc-windows-msvc wasm32-wasi wasm32-unknown-unknown
- name: rustfmt
run: cargo fmt -- --check
- name: clippy (Linux)
run: cargo clippy -- -D warnings
- name: clippy (Windows)
run: cargo clippy --target x86_64-pc-windows-msvc -- -D warnings
- name: clippy (WASI)
run: cargo clippy --target wasm32-wasi -- -D warnings
- name: clippy (WASM)
run: cargo clippy --target wasm32-unknown-unknown -- -D warnings