Skip to content

Commit c73cd33

Browse files
authored
fix ci, set protoc (apache#56)
1 parent 0a22c75 commit c73cd33

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

.github/workflows/github-actions.yml

+22-20
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ on:
1313
jobs:
1414
check:
1515
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
2117

2218
env:
2319
RUSTFLAGS: "-D warnings"
@@ -26,26 +22,27 @@ jobs:
2622
- uses: actions/checkout@main
2723
- uses: actions-rs/toolchain@v1
2824
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
3435
- run: cargo check
3536

3637
fmt:
3738
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
4340

4441
steps:
4542
- uses: actions/checkout@main
4643
- uses: actions-rs/toolchain@v1
4744
with:
48-
toolchain: ${{ matrix.rust }}
45+
toolchain: stable
4946
- run: rustup component add rustfmt
5047
- run: cargo fmt --all -- --check
5148

@@ -57,10 +54,15 @@ jobs:
5754
- uses: actions-rs/toolchain@v1
5855
with:
5956
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
6466
- name: Set up cargo cache
6567
uses: actions/cache@v3
6668
continue-on-error: false

0 commit comments

Comments
 (0)