13
13
jobs :
14
14
check :
15
15
name : check dubbo-rust project
16
- runs-on : ${{ matrix.os }}
17
- strategy :
18
- matrix :
19
- os : [ubuntu-latest, macOS-latest, windows-latest]
20
- rust : [stable]
16
+ runs-on : ubuntu-latest
21
17
22
18
env :
23
19
RUSTFLAGS : " -D warnings"
@@ -26,26 +22,27 @@ jobs:
26
22
- uses : actions/checkout@main
27
23
- uses : actions-rs/toolchain@v1
28
24
with :
29
- toolchain : ${{ matrix.rust }}
30
- - name : Install Protoc
31
- uses : arduino/setup-protoc@v1
32
- with :
33
- repo-token : ${{ secrets.GITHUB_TOKEN }}
25
+ toolchain : stable
26
+ - name : setup protoc
27
+ run : |
28
+ mkdir $HOME/protoc/ -p &&
29
+ cd $HOME/protoc/ &&
30
+ curl --location --silent --output /tmp/protoc-21.9-linux-x86_64.zip \
31
+ https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip &&
32
+ unzip /tmp/protoc-21.9-linux-x86_64.zip &&
33
+ echo "$HOME/protoc/bin" >> $GITHUB_PATH
34
+ shell : bash
34
35
- run : cargo check
35
36
36
37
fmt :
37
38
name : Rustfmt
38
- runs-on : ${{ matrix.os }}
39
- strategy :
40
- matrix :
41
- os : [ubuntu-latest, macOS-latest, windows-latest]
42
- rust : [stable]
39
+ runs-on : ubuntu-latest
43
40
44
41
steps :
45
42
- uses : actions/checkout@main
46
43
- uses : actions-rs/toolchain@v1
47
44
with :
48
- toolchain : ${{ matrix.rust }}
45
+ toolchain : stable
49
46
- run : rustup component add rustfmt
50
47
- run : cargo fmt --all -- --check
51
48
@@ -57,10 +54,15 @@ jobs:
57
54
- uses : actions-rs/toolchain@v1
58
55
with :
59
56
toolchain : stable
60
- - name : Install Protoc
61
- uses : arduino/setup-protoc@v1
62
- with :
63
- repo-token : ${{ secrets.GITHUB_TOKEN }}
57
+ - name : setup protoc
58
+ run : |
59
+ mkdir $HOME/protoc/ -p &&
60
+ cd $HOME/protoc/ &&
61
+ curl --location --silent --output /tmp/protoc-21.9-linux-x86_64.zip \
62
+ https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip &&
63
+ unzip /tmp/protoc-21.9-linux-x86_64.zip &&
64
+ echo "$HOME/protoc/bin" >> $GITHUB_PATH
65
+ shell : bash
64
66
- name : Set up cargo cache
65
67
uses : actions/cache@v3
66
68
continue-on-error : false
0 commit comments