Skip to content

Commit

Permalink
ci: install protoc from repositories where possible (#3258)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
thomaseizinger authored Dec 30, 2022
1 parent 72e52f4 commit 68d0f88
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cache-factory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 68d0f88

Please sign in to comment.