Skip to content

Commit b682ce7

Browse files
Workflow - Install protoc (#89)
* workflow - install protoc Signed-off-by: Roberto J Rojas <[email protected]> * pinning protoc version to 3.21.12 Signed-off-by: Roberto J Rojas <[email protected]> * trying a new version Signed-off-by: Roberto J Rojas <[email protected]> * workflow - fixes rust toolchain and protoc installs Signed-off-by: Roberto J Rojas <[email protected]> --------- Signed-off-by: Roberto J Rojas <[email protected]>
1 parent 5016f61 commit b682ce7

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,25 @@ on:
1515
env:
1616
CARGO_TERM_COLOR: always
1717
CARGO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
18+
PROTOC_VERSION: '3.x'
19+
RUST_TOOLCHAIN: '1.67.0'
1820

1921
jobs:
2022
lint:
2123
name: Lint
2224
runs-on: ubuntu-latest
2325

2426
steps:
27+
- name: Install Rust Toolchain
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
toolchain: ${{ env.RUST_TOOLCHAIN }}
31+
override: true
32+
components: rustfmt, clippy
33+
- name: Install Protoc
34+
uses: arduino/setup-protoc@v1
35+
with:
36+
version: ${{ env.PROTOC_VERSION }}
2537
- uses: actions/checkout@v2
2638
- name: cargo fmt
2739
run: cargo fmt -- --check --color ${{ env.CARGO_TERM_COLOR }}
@@ -34,8 +46,16 @@ jobs:
3446
runs-on: ubuntu-latest
3547

3648
steps:
49+
- name: Install Rust Toolchain
50+
uses: actions-rs/toolchain@v1
51+
with:
52+
toolchain: ${{ env.RUST_TOOLCHAIN }}
53+
override: true
54+
components: rustfmt, clippy
3755
- name: Install Protoc
3856
uses: arduino/setup-protoc@v1
57+
with:
58+
version: ${{ env.PROTOC_VERSION }}
3959
- uses: actions/checkout@v2
4060
- name: Build
4161
run: cargo build
@@ -51,6 +71,16 @@ jobs:
5171
if: startswith(github.ref, 'refs/tags/v')
5272

5373
steps:
74+
- name: Install Rust Toolchain
75+
uses: actions-rs/toolchain@v1
76+
with:
77+
toolchain: ${{ env.RUST_TOOLCHAIN }}
78+
override: true
79+
components: rustfmt, clippy
80+
- name: Install Protoc
81+
uses: arduino/setup-protoc@v1
82+
with:
83+
version: ${{ env.PROTOC_VERSION }}
5484
- uses: actions/checkout@v2
5585
- name: cargo publish
5686
run: cargo publish --token ${{ env.CARGO_TOKEN }}

0 commit comments

Comments
 (0)