ci: install protoc from repositories where possible (#3258)

With the addition of more CI jobs, we are constantly running into API limits on setting up protoc. For all jobs that run on ubuntu, we can install it from `apt` instead.

On ubuntu 22.04, which is what `ubuntu-latest` points to, this installs `protoc v3.12.4`.
This commit is contained in:
Thomas Eizinger 2022-12-30 23:58:28 +11:00 committed by GitHub
parent 72e52f43fc
commit 68d0f882bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 17 deletions

View File

@ -34,7 +34,7 @@ jobs:
rust: ${{ fromJSON(needs.gather_msrv_versions.outputs.versions) }}
steps:
- name: Install Protoc
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
run: sudo apt-get install protobuf-compiler
- uses: actions/checkout@v3
@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
run: sudo apt-get install protobuf-compiler
- uses: actions/checkout@v3

View File

@ -21,9 +21,7 @@ jobs:
crate: ${{ fromJSON(needs.gather_published_crates.outputs.members) }}
steps:
- name: Install Protoc
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
run: sudo apt-get install protobuf-compiler
- uses: actions/checkout@v3
@ -101,10 +99,15 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Install Protoc
if: ${{ matrix.os != 'ubuntu-latest' }}
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Protoc
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt-get install protobuf-compiler
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
@ -131,9 +134,7 @@ jobs:
- features: "mdns tcp dns async-std"
steps:
- name: Install Protoc
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
run: sudo apt-get install protobuf-compiler
- uses: actions/checkout@v3
@ -155,9 +156,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
run: sudo apt-get install protobuf-compiler
- uses: actions/checkout@v3
@ -185,9 +184,7 @@ jobs:
]
steps:
- name: Install Protoc
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
run: sudo apt-get install protobuf-compiler
- uses: actions/checkout@v3
@ -212,9 +209,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
run: sudo apt-get install protobuf-compiler
- uses: actions/checkout@v3