1
1
name : Build and Test Spartan
2
2
3
+ permissions :
4
+ contents : read
5
+ pull-requests : write
6
+
3
7
on :
4
8
push :
5
9
branches : [ master ]
@@ -10,39 +14,112 @@ jobs:
10
14
build :
11
15
runs-on : ubuntu-latest
12
16
steps :
13
- - uses : actions/checkout@v2
14
- - name : Install
15
- run : rustup default stable
16
- - name : Install rustfmt Components
17
- run : rustup component add rustfmt
18
- - name : Install clippy
19
- run : rustup component add clippy
20
- - name : Build
21
- run : cargo build --verbose
22
- - name : Run tests
23
- run : cargo test --verbose
24
- - name : Build examples
25
- run : cargo build --examples --verbose
26
- - name : Check Rustfmt Code Style
27
- run : cargo fmt --all -- --check
28
- - name : Check clippy warnings
29
- run : cargo clippy --all-targets --all-features -- -D warnings
30
-
31
- build_wasm :
32
- runs-on : ubuntu-latest
33
- steps :
34
- - uses : actions/checkout@v2
35
- - name : Install
36
- run : rustup default stable
37
- - name : Build without std
38
- run : cargo build --no-default-features --verbose
39
- - name : Run tests without std
40
- run : cargo test --no-default-features --verbose
41
- - name : Build examples without std
42
- run : cargo build --examples --no-default-features --verbose
43
- - name : Install wasm32-wasi target
44
- run : rustup target add wasm32-wasi
45
- - name : Install wasm32-unknown-unknown target
46
- run : rustup target add wasm32-unknown-unknown
47
- - name : Build for target wasm-wasi
48
- run : RUSTFLAGS="" cargo build --target=wasm32-wasi --no-default-features --verbose
17
+ - uses : actions/checkout@v2
18
+ - name : Build
19
+ uses : actions-rs/toolchain@v1
20
+ with :
21
+ toolchain : stable
22
+ - uses : actions-rs/cargo@v1
23
+ with :
24
+ command : build
25
+ args : --examples --benches --verbose
26
+
27
+ build-no-default-features :
28
+ runs-on : ubuntu-latest
29
+ steps :
30
+ - uses : actions/checkout@v2
31
+ - name : Build
32
+ uses : actions-rs/toolchain@v1
33
+ with :
34
+ toolchain : stable
35
+ - uses : actions-rs/cargo@v1
36
+ with :
37
+ command : build
38
+ args : --no-default-features --examples --benches --verbose
39
+
40
+ build-wasm :
41
+ runs-on : ubuntu-latest
42
+ steps :
43
+ - uses : actions/checkout@v2
44
+ - name : Wasm build
45
+ uses : actions-rs/toolchain@v1
46
+ with :
47
+ toolchain : stable
48
+ target : wasm32-unknown-unknown
49
+ - uses : actions-rs/cargo@v1
50
+ with :
51
+ command : build
52
+ args : --no-default-features --target wasm32-unknown-unknown
53
+
54
+ build-wasi :
55
+ runs-on : ubuntu-latest
56
+ steps :
57
+ - uses : actions/checkout@v2
58
+ - name : Install wasm32-wasip1 target
59
+ run : rustup target add wasm32-wasip1
60
+ - uses : actions-rs/cargo@v1
61
+ with :
62
+ command : build
63
+ args : --no-default-features --target wasm32-wasip1
64
+
65
+ test :
66
+ runs-on : ubuntu-latest
67
+ steps :
68
+ - uses : actions/checkout@v2
69
+ - name : Run tests
70
+ uses : actions-rs/toolchain@v1
71
+ with :
72
+ toolchain : stable
73
+ - uses : actions-rs/cargo@v1
74
+ with :
75
+ command : test
76
+ args : --release --verbose
77
+
78
+ test-no-default-features :
79
+ runs-on : ubuntu-latest
80
+ steps :
81
+ - uses : actions/checkout@v2
82
+ - name : Run tests
83
+ uses : actions-rs/toolchain@v1
84
+ with :
85
+ toolchain : stable
86
+ - uses : actions-rs/cargo@v1
87
+ with :
88
+ command : test
89
+ args : --no-default-features --release --verbose
90
+
91
+ fmt :
92
+ runs-on : ubuntu-latest
93
+ steps :
94
+ - uses : actions/checkout@v2
95
+ - name : Check Rustfmt Code Style
96
+ uses : actions-rs/toolchain@v1
97
+ with :
98
+ toolchain : stable
99
+ components : rustfmt
100
+ - uses : actions-rs/cargo@v1
101
+ with :
102
+ command : fmt
103
+ args : --all -- --check
104
+
105
+ clippy :
106
+ runs-on : ubuntu-latest
107
+ steps :
108
+ - uses : actions/checkout@v2
109
+ - name : Check clippy warnings
110
+ uses : actions-rs/toolchain@v1
111
+ with :
112
+ toolchain : stable
113
+ components : clippy
114
+ - uses : actions-rs/cargo@v1
115
+ with :
116
+ command : clippy
117
+ args : --all-targets -- -D warnings
118
+
119
+ spelling :
120
+ runs-on : ubuntu-latest
121
+ steps :
122
+ - name : Checkout Actions Repository
123
+ uses : actions/checkout@v3
124
+ - name : Spell Check Repo
125
+ uses : crate-ci/typos@685eb3d55be2f85191e8c84acb9f44d7756f84ab
0 commit comments