Skip to content

Commit a9e0252

Browse files
Update github actions
Signed-off-by: Adam Cattermole <a.d.cattermole@gmail.com>
1 parent 33b318b commit a9e0252

1 file changed

Lines changed: 140 additions & 140 deletions

File tree

.github/workflows/rust.yml

Lines changed: 140 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -15,192 +15,192 @@
1515
name: Rust
1616

1717
on:
18-
1918
pull_request:
2019
branches:
21-
- master
20+
- master
21+
- kuadrant
2222

2323
push:
2424
branches:
25-
- master
25+
- master
26+
- kuadrant
2627

2728
schedule:
28-
- cron: '0 0 * * *'
29+
- cron: "0 0 * * *"
2930

3031
jobs:
31-
3232
licenses:
3333
runs-on: ubuntu-latest
3434

3535
steps:
36-
- uses: actions/checkout@v2
36+
- uses: actions/checkout@v6
3737

38-
- name: Check licenses
39-
run: |
40-
go get -u github.com/google/addlicense
41-
export PATH=$PATH:$(go env GOPATH)/bin
42-
addlicense -check .
38+
- name: Check licenses
39+
run: |
40+
go get -u github.com/google/addlicense
41+
export PATH=$PATH:$(go env GOPATH)/bin
42+
addlicense -check .
4343
4444
stable:
4545
runs-on: ubuntu-latest
4646

4747
steps:
48-
- uses: actions/checkout@v2
48+
- uses: actions/checkout@v6
4949

50-
- name: Update Rust
51-
run: rustup toolchain install stable --component clippy --component rustfmt
50+
- name: Update Rust
51+
run: rustup toolchain install stable --component clippy --component rustfmt
5252

53-
- name: Cache (generate keys)
54-
run: |
55-
cargo generate-lockfile
56-
rustc --version | cut -d " " -f2 - > rust-toolchain
53+
- name: Cache (generate keys)
54+
run: |
55+
cargo generate-lockfile
56+
rustc --version | cut -d " " -f2 - > rust-toolchain
5757
58-
- name: Cache
59-
uses: actions/cache@v2
60-
with:
61-
path: |
62-
~/.cargo/.crates.toml
63-
~/.cargo/.crates2.json
64-
~/.cargo/bin
65-
~/.cargo/registry
66-
target
67-
key: ${{ hashFiles('rust-toolchain', 'Cargo.lock') }}
58+
- name: Cache
59+
uses: actions/cache@v5
60+
with:
61+
path: |
62+
~/.cargo/.crates.toml
63+
~/.cargo/.crates2.json
64+
~/.cargo/bin
65+
~/.cargo/registry
66+
target
67+
key: ${{ hashFiles('rust-toolchain', 'Cargo.lock') }}
6868

69-
- name: Cache (cleanup)
70-
run: rm -f rust-toolchain
69+
- name: Cache (cleanup)
70+
run: rm -f rust-toolchain
7171

72-
- name: Build
73-
env:
74-
RUSTFLAGS: -D warnings
75-
run: cargo build --release --all-targets
72+
- name: Build
73+
env:
74+
RUSTFLAGS: -D warnings
75+
run: cargo build --release --all-targets
7676

77-
- name: Format (rustfmt)
78-
run: cargo fmt -- --check
77+
- name: Format (rustfmt)
78+
run: cargo fmt -- --check
7979

80-
- name: Format (manifest)
81-
run: cargo verify-project
80+
- name: Format (manifest)
81+
run: cargo verify-project
8282

83-
- name: Package (docs)
84-
run: cargo doc --no-deps
83+
- name: Package (docs)
84+
run: cargo doc --no-deps
8585

8686
nightly:
8787
runs-on: ubuntu-latest
8888

8989
steps:
90-
- uses: actions/checkout@v2
91-
92-
- name: Update Rust
93-
run: |
94-
rustup toolchain install nightly --component clippy --component rustfmt
95-
rustup default nightly
96-
97-
- name: Cache (generate keys)
98-
run: |
99-
cargo generate-lockfile
100-
rustc --version | tr " " "-" | cut -d "-" -f3,5-7 | cut -b1-18 > rust-toolchain
101-
102-
- name: Cache
103-
uses: actions/cache@v2
104-
with:
105-
path: |
106-
~/.cargo/.crates.toml
107-
~/.cargo/.crates2.json
108-
~/.cargo/bin
109-
~/.cargo/registry
110-
target
111-
key: ${{ hashFiles('rust-toolchain', 'Cargo.lock') }}
112-
113-
- name: Cache (cleanup)
114-
run: rm -f rust-toolchain
115-
116-
- name: Build
117-
env:
118-
RUSTFLAGS: -D warnings
119-
run: cargo build --release --all-targets
120-
121-
- name: Format (rustfmt)
122-
run: cargo fmt -- --check
123-
124-
- name: Format (manifest)
125-
run: cargo verify-project
126-
127-
- name: Package (docs)
128-
run: cargo doc --no-deps
90+
- uses: actions/checkout@v6
91+
92+
- name: Update Rust
93+
run: |
94+
rustup toolchain install nightly --component clippy --component rustfmt
95+
rustup default nightly
96+
97+
- name: Cache (generate keys)
98+
run: |
99+
cargo generate-lockfile
100+
rustc --version | tr " " "-" | cut -d "-" -f3,5-7 | cut -b1-18 > rust-toolchain
101+
102+
- name: Cache
103+
uses: actions/cache@v5
104+
with:
105+
path: |
106+
~/.cargo/.crates.toml
107+
~/.cargo/.crates2.json
108+
~/.cargo/bin
109+
~/.cargo/registry
110+
target
111+
key: ${{ hashFiles('rust-toolchain', 'Cargo.lock') }}
112+
113+
- name: Cache (cleanup)
114+
run: rm -f rust-toolchain
115+
116+
- name: Build
117+
env:
118+
RUSTFLAGS: -D warnings
119+
run: cargo build --release --all-targets
120+
121+
- name: Format (rustfmt)
122+
run: cargo fmt -- --check
123+
124+
- name: Format (manifest)
125+
run: cargo verify-project
126+
127+
- name: Package (docs)
128+
run: cargo doc --no-deps
129129

130130
examples:
131131
runs-on: ubuntu-latest
132132

133133
steps:
134-
- name: Checkout (test framework)
135-
uses: actions/checkout@v2
136-
137-
- name: Checkout (Rust SDK)
138-
uses: actions/checkout@v2
139-
with:
140-
repository: proxy-wasm/proxy-wasm-rust-sdk
141-
path: proxy-wasm-rust-sdk
142-
143-
- name: Update Rust
144-
run: |
145-
rustup toolchain install stable --component clippy --component rustfmt
146-
rustup target add wasm32-unknown-unknown
147-
148-
- name: Cache (generate keys)
149-
run: |
150-
cargo generate-lockfile
151-
cd proxy-wasm-rust-sdk && cargo generate-lockfile && cd ..
152-
rustc --version | cut -d " " -f2 - > rust-toolchain
153-
154-
- name: Cache
155-
uses: actions/cache@v2
156-
with:
157-
path: |
158-
~/.cargo/.crates.toml
159-
~/.cargo/.crates2.json
160-
~/.cargo/bin
161-
~/.cargo/registry
162-
target
163-
proxy-wasm-rust-sdk/target
164-
key: ${{ hashFiles('rust-toolchain', 'Cargo.lock', 'proxy-wasm-rust-sdk/Cargo.lock') }}
165-
166-
- name: Cache (cleanup)
167-
run: rm -f rust-toolchain
168-
169-
- name: Build (test framework)
170-
env:
171-
RUSTFLAGS: -D warnings
172-
run: cargo build --release --all-targets
173-
174-
- name: Build (Rust SDK examples)
175-
env:
176-
RUSTFLAGS: -C link-args=-S -D warnings
177-
run: cd proxy-wasm-rust-sdk && cargo build --release --examples --target=wasm32-unknown-unknown && cd ..
178-
179-
- name: Test (hello_world)
180-
run: target/release/examples/hello_world proxy-wasm-rust-sdk/target/wasm32-unknown-unknown/release/examples/hello_world.wasm
181-
182-
- name: Test (http_auth_random)
183-
run: target/release/examples/http_auth_random proxy-wasm-rust-sdk/target/wasm32-unknown-unknown/release/examples/http_auth_random.wasm -a
184-
185-
- name: Test (http_headers)
186-
run: target/release/examples/http_headers proxy-wasm-rust-sdk/target/wasm32-unknown-unknown/release/examples/http_headers.wasm -a
134+
- name: Checkout (test framework)
135+
uses: actions/checkout@v6
136+
137+
- name: Checkout (Rust SDK)
138+
uses: actions/checkout@v6
139+
with:
140+
repository: proxy-wasm/proxy-wasm-rust-sdk
141+
path: proxy-wasm-rust-sdk
142+
143+
- name: Update Rust
144+
run: |
145+
rustup toolchain install stable --component clippy --component rustfmt
146+
rustup target add wasm32-unknown-unknown
147+
148+
- name: Cache (generate keys)
149+
run: |
150+
cargo generate-lockfile
151+
cd proxy-wasm-rust-sdk && cargo generate-lockfile && cd ..
152+
rustc --version | cut -d " " -f2 - > rust-toolchain
153+
154+
- name: Cache
155+
uses: actions/cache@v5
156+
with:
157+
path: |
158+
~/.cargo/.crates.toml
159+
~/.cargo/.crates2.json
160+
~/.cargo/bin
161+
~/.cargo/registry
162+
target
163+
proxy-wasm-rust-sdk/target
164+
key: ${{ hashFiles('rust-toolchain', 'Cargo.lock', 'proxy-wasm-rust-sdk/Cargo.lock') }}
165+
166+
- name: Cache (cleanup)
167+
run: rm -f rust-toolchain
168+
169+
- name: Build (test framework)
170+
env:
171+
RUSTFLAGS: -D warnings
172+
run: cargo build --release --all-targets
173+
174+
- name: Build (Rust SDK examples)
175+
env:
176+
RUSTFLAGS: -C link-args=-S -D warnings
177+
run: cd proxy-wasm-rust-sdk && cargo build --release --examples --target=wasm32-unknown-unknown && cd ..
178+
179+
- name: Test (hello_world)
180+
run: target/release/examples/hello_world proxy-wasm-rust-sdk/target/wasm32-unknown-unknown/release/examples/hello_world.wasm
181+
182+
- name: Test (http_auth_random)
183+
run: target/release/examples/http_auth_random proxy-wasm-rust-sdk/target/wasm32-unknown-unknown/release/examples/http_auth_random.wasm -a
184+
185+
- name: Test (http_headers)
186+
run: target/release/examples/http_headers proxy-wasm-rust-sdk/target/wasm32-unknown-unknown/release/examples/http_headers.wasm -a
187187

188188
outdated:
189189
runs-on: ubuntu-latest
190190

191191
steps:
192-
- uses: actions/checkout@v2
192+
- uses: actions/checkout@v6
193193

194-
- name: Run cargo outdated
195-
run: cargo outdated --exit-code 1
194+
- name: Run cargo outdated
195+
run: cargo outdated --exit-code 1
196196

197197
audit:
198198
runs-on: ubuntu-latest
199199

200200
steps:
201-
- uses: actions/checkout@v2
201+
- uses: actions/checkout@v6
202202

203-
- name: Run cargo audit
204-
run: |
205-
cargo generate-lockfile
206-
cargo audit
203+
- name: Run cargo audit
204+
run: |
205+
cargo generate-lockfile
206+
cargo audit

0 commit comments

Comments
 (0)