From 68d0f882bd7fc0b4a83a11d0d034ae9f085f3e62 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 30 Dec 2022 23:58:28 +1100 Subject: [PATCH] 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`. --- .github/workflows/cache-factory.yml | 4 ++-- .github/workflows/ci.yml | 25 ++++++++++--------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cache-factory.yml b/.github/workflows/cache-factory.yml index d332a547d62..2ee2b1883fa 100644 --- a/.github/workflows/cache-factory.yml +++ b/.github/workflows/cache-factory.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cedee4f7254..9ce4fc5fdea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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