@@ -41,29 +41,41 @@ jobs:
41
41
export PATH=$PATH:$(go env GOPATH)/bin
42
42
addlicense -check .
43
43
44
- audit :
44
+ bazel :
45
45
runs-on : ubuntu-latest
46
46
47
47
steps :
48
48
- uses : actions/checkout@v2
49
49
50
- - name : Run cargo audit
51
- run : |
52
- cp -p cargo/Cargo.lock .
53
- cargo audit
54
-
55
- outdated :
56
- runs-on : ubuntu-latest
50
+ - name : Cache
51
+ uses : actions/cache@v2
52
+ with :
53
+ path : |
54
+ ~/.cache/bazel
55
+ ~/.cache/bazelisk
56
+ ~/.cargo/.crates.toml
57
+ ~/.cargo/.crates2.json
58
+ ~/.cargo/bin
59
+ ~/.cargo/registry
60
+ key : ${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'cargo/Cargo.lock') }}
57
61
58
- steps :
59
- - uses : actions/checkout@v2
62
+ - name : Build
63
+ run : bazelisk build //...
60
64
61
- - name : Run cargo outdated
62
- run : cargo outdated --exit-code 1
65
+ - name : Format (buildifier)
66
+ run : |
67
+ GO111MODULE=on go get -u github.com/bazelbuild/buildtools/[email protected]
68
+ export PATH=$PATH:$(go env GOPATH)/bin
69
+ buildifier -mode=check WORKSPACE
70
+ buildifier -mode=check BUILD
71
+ buildifier -mode=check examples/BUILD
63
72
64
- - name : Check freshness of cargo/Cargo.lock
73
+ - name : Format ( cargo raze)
65
74
run : |
66
- cargo generate-lockfile
75
+ cargo install cargo-raze --version 0.3.8
76
+ cp -p cargo/Cargo.lock .
77
+ rm -rf cargo/
78
+ cargo raze --output=cargo
67
79
mv Cargo.lock cargo/
68
80
git diff --exit-code
69
81
@@ -80,13 +92,13 @@ jobs:
80
92
81
93
- name : Build
82
94
env :
83
- RUSTFLAGS : -C link-args=-S -D warnings
84
- run : cargo build --target=wasm32-unknown-unknown -- release --all-targets
95
+ RUSTFLAGS : -D warnings - C link-args=-S
96
+ run : cargo build --release --all-targets --target=wasm32-unknown-unknown
85
97
86
98
- name : Format (clippy)
87
99
env :
88
- RUSTFLAGS : -C link-args=-S -D warnings
89
- run : cargo clippy --target=wasm32-unknown-unknown -- release --all-targets
100
+ RUSTFLAGS : -D warnings - C link-args=-S
101
+ run : cargo clippy --release --all-targets --target=wasm32-unknown-unknown
90
102
91
103
- name : Format (rustfmt)
92
104
run : cargo fmt -- --check
@@ -110,64 +122,52 @@ jobs:
110
122
run : |
111
123
rustup toolchain install nightly --component clippy --component rustfmt
112
124
rustup +nightly target add wasm32-unknown-unknown
125
+ rustup default nightly
113
126
114
127
- name : Build
115
128
env :
116
- RUSTFLAGS : -C link-args=-S -D warnings
117
- run : cargo +nightly build --target=wasm32-unknown-unknown -- release --all-targets
129
+ RUSTFLAGS : -D warnings - C link-args=-S
130
+ run : cargo build --release --all-targets --target=wasm32-unknown-unknown
118
131
119
132
- name : Format (clippy)
120
133
env :
121
- RUSTFLAGS : -C link-args=-S -D warnings
122
- run : cargo +nightly clippy --target=wasm32-unknown-unknown -- release --all-targets
134
+ RUSTFLAGS : -D warnings - C link-args=-S
135
+ run : cargo clippy --release --all-targets --target=wasm32-unknown-unknown
123
136
124
137
- name : Format (rustfmt)
125
- run : cargo +nightly fmt -- --check
138
+ run : cargo fmt -- --check
126
139
127
140
- name : Format (manifest)
128
- run : cargo +nightly verify-project
141
+ run : cargo verify-project
129
142
130
143
- name : Package (docs)
131
- run : cargo +nightly doc --no-deps --target=wasm32-unknown-unknown
144
+ run : cargo doc --no-deps --target=wasm32-unknown-unknown
132
145
133
146
- name : Package (publish)
134
- run : cargo +nightly publish --dry-run --target=wasm32-unknown-unknown
147
+ run : cargo publish --dry-run --target=wasm32-unknown-unknown
135
148
136
- bazel :
149
+ outdated :
137
150
runs-on : ubuntu-latest
138
151
139
152
steps :
140
153
- uses : actions/checkout@v2
141
154
142
- - name : Cache
143
- uses : actions/cache@v2
144
- with :
145
- path : |
146
- ~/.cache/bazel
147
- ~/.cache/bazelisk
148
- ~/.cargo/.crates.toml
149
- ~/.cargo/.crates2.json
150
- ~/.cargo/bin
151
- ~/.cargo/registry
152
- key : ${{ hashFiles('WORKSPACE', '.bazelrc', '.bazelversion', 'cargo/Cargo.lock') }}
155
+ - name : Run cargo outdated
156
+ run : cargo outdated --exit-code 1
153
157
154
- - name : Build
158
+ - name : Check freshness of cargo/Cargo.lock
155
159
run : |
156
- bazelisk build //...
160
+ cargo generate-lockfile
161
+ mv Cargo.lock cargo/
162
+ git diff --exit-code
157
163
158
- - name : Format (buildifier)
159
- run : |
160
- GO111MODULE=on go get -u github.com/bazelbuild/buildtools/[email protected]
161
- export PATH=$PATH:$(go env GOPATH)/bin
162
- buildifier -mode=check WORKSPACE
163
- buildifier -mode=check BUILD
164
- buildifier -mode=check examples/BUILD
164
+ audit :
165
+ runs-on : ubuntu-latest
165
166
166
- - name : Format (cargo raze)
167
+ steps :
168
+ - uses : actions/checkout@v2
169
+
170
+ - name : Run cargo audit
167
171
run : |
168
- cargo install cargo-raze --version 0.3.8
169
172
cp -p cargo/Cargo.lock .
170
- rm -rf cargo/
171
- cargo raze --output=cargo
172
- mv Cargo.lock cargo/
173
- git diff --exit-code
173
+ cargo audit
0 commit comments