File tree Expand file tree Collapse file tree 2 files changed +17
-25
lines changed Expand file tree Collapse file tree 2 files changed +17
-25
lines changed Original file line number Diff line number Diff line change 1
1
on : [ pull_request ]
2
2
3
- env :
4
- rust_version : 1.53.0
5
-
6
3
name : CI
7
4
8
5
jobs :
9
6
test :
10
7
runs-on : ubuntu-latest
11
8
name : Compile & Test SDK
9
+ strategy :
10
+ matrix :
11
+ rust_version : [1.53.0, 1.56.1]
12
12
steps :
13
13
- uses : actions/checkout@v2
14
- - uses : actions/cache@v2
15
- name : Cargo Cache
16
- with :
17
- path : |
18
- ~/.cargo/registry
19
- ~/.cargo/git
20
- sdk/target
21
- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
22
- restore-keys : |
23
- ${{ runner.os }}-cargo-
24
14
- uses : actions-rs/toolchain@v1
25
15
with :
26
- toolchain : ${{ env .rust_version }}
16
+ toolchain : ${{ matrix .rust_version }}
27
17
default : true
18
+ # Pinned to the commit hash of v1.3.0
19
+ - uses : Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641
20
+ with :
21
+ sharedKey : test
22
+ working-directory : sdk
28
23
- name : Cargo Test
29
24
run : cargo test
30
25
env :
Original file line number Diff line number Diff line change 3
3
paths : ' tools/**'
4
4
5
5
env :
6
- rust_version : 1.53.0
6
+ # The publisher tool can use the latest Rust since it isn't published.
7
+ # Build with a minimum of Rust 1.56.1 to check for CVE-2021-42574.
8
+ rust_version : 1.56.1
7
9
rust_toolchain_components : clippy,rustfmt
8
10
9
11
name : Tools CI
@@ -14,21 +16,16 @@ jobs:
14
16
name : Compile, Test, and Lint the `tools/` path
15
17
steps :
16
18
- uses : actions/checkout@v2
17
- - uses : actions/cache@v2
18
- name : Cargo Cache
19
- with :
20
- path : |
21
- ~/.cargo/registry
22
- ~/.cargo/git
23
- tools/publisher/target
24
- key : tools-${{ runner.os }}-cargo-${{ hashFiles('tools/**/Cargo.toml') }}
25
- restore-keys : |
26
- tools-${{ runner.os }}-cargo-
27
19
- uses : actions-rs/toolchain@v1
28
20
with :
29
21
toolchain : ${{ env.rust_version }}
30
22
components : ${{ env.rust_toolchain_components }}
31
23
default : true
24
+ # Pinned to the commit hash of v1.3.0
25
+ - uses : Swatinem/rust-cache@842ef286fff290e445b90b4002cc9807c3669641
26
+ with :
27
+ sharedKey : tools-test
28
+ working-directory : tools/publisher
32
29
- name : Format Check
33
30
run : rustfmt --check --edition 2018 $(find tools -name '*.rs' -print | grep -v /target/)
34
31
- name : Cargo Test
You can’t perform that action at this time.
0 commit comments