From 65432baf6f4540e68f4e8d8efd6b4d886d740406 Mon Sep 17 00:00:00 2001 From: Marcel Ebert Date: Wed, 11 Nov 2026 17:05:24 +0100 Subject: [PATCH] ci: Install protoc from GitHub releases in the shared action The shared action installed protobuf with apt after an apt upgrade, so clippy and test runs failed whenever the Ubuntu package mirror was unreachable from the runners. Install protoc with setup-protoc there instead, which also covers the clippy job, and drop the duplicate step from the test workflow. --- .github/actions/shared/action.yml | 16 +++++----------- .github/workflows/test-code.yml | 5 ----- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/actions/shared/action.yml b/.github/actions/shared/action.yml index b8a82abdc..89625aee7 100644 --- a/.github/actions/shared/action.yml +++ b/.github/actions/shared/action.yml @@ -33,17 +33,11 @@ runs: tool-cache: false large-packages: false - # Steps taken from https://github.com/actions/runner-images/issues/7192#issuecomment-1446766800 - - name: Disable Phase Updates - shell: bash - run: | - echo 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates - - - name: Update, Upgrade, and Install Protobuf - shell: bash - run: | - sudo apt-get update && sudo apt-get upgrade -y - sudo apt-get install -y protobuf-compiler libprotobuf-dev + # From GitHub releases, so CI does not depend on the Ubuntu package mirror. + - name: Install Protoc + uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 + with: + repo-token: ${{ github.token }} # Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo - name: Cache cargo registry diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index 1be7cfe21..11a7d59a8 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -24,11 +24,6 @@ jobs: - name: Free up Space and Installation uses: ./.github/actions/shared - - name: Install Protoc - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Test run: cargo test --release