Skip to content

Commit f18730a

Browse files
snowmeadclaude
andcommitted
ci: Replace arduino/setup-protoc with direct download
Replace the arduino/setup-protoc GitHub Action with direct curl download from GitHub releases to avoid intermittent API timeout errors. The action queries GitHub's API to list releases, which can timeout due to rate limiting or API instability on shared runners. Direct download from a known release URL bypasses the API entirely. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 31560e5 commit f18730a

File tree

5 files changed

+50
-25
lines changed

5 files changed

+50
-25
lines changed

.github/workflows/api-augment-update.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,13 @@ jobs:
3333
- uses: ./.github/workflow-templates/setup-pnpm
3434
- name: Install libpq-dev
3535
run: sudo apt-get update && sudo apt-get install -y libpq-dev
36-
- uses: arduino/setup-protoc@v3
37-
with:
38-
repo-token: ${{ secrets.GITHUB_TOKEN }}
36+
- name: Install Protoc
37+
run: |
38+
PROTOC_VERSION=28.3
39+
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
40+
unzip -q "protoc-${PROTOC_VERSION}-linux-x86_64.zip" -d $HOME/.local
41+
echo "$HOME/.local/bin" >> $GITHUB_PATH
42+
rm "protoc-${PROTOC_VERSION}-linux-x86_64.zip"
3943
- name: Build All
4044
run: cargo build --release
4145
- name: Check Built By Mold

.github/workflows/lint.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ jobs:
3333
- name: Install libpq-dev
3434
run: sudo apt-get update && sudo apt-get install -y libpq-dev
3535
- name: Install Protoc
36-
uses: arduino/setup-protoc@v3
37-
with:
38-
repo-token: ${{ secrets.GITHUB_TOKEN }}
36+
run: |
37+
PROTOC_VERSION=28.3
38+
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
39+
unzip -q "protoc-${PROTOC_VERSION}-linux-x86_64.zip" -d $HOME/.local
40+
echo "$HOME/.local/bin" >> $GITHUB_PATH
41+
rm "protoc-${PROTOC_VERSION}-linux-x86_64.zip"
3942
- run: SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --features try-runtime,runtime-benchmarks --locked
4043
env:
4144
RUSTFLAGS: -D warnings

.github/workflows/network.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,12 @@ jobs:
147147
- name: Install build deps
148148
run: sudo apt-get update && sudo apt-get install -y libpq-dev libclang-dev binutils
149149
- name: Install Protoc
150-
uses: arduino/setup-protoc@v3
151-
with:
152-
repo-token: ${{ secrets.GITHUB_TOKEN }}
150+
run: |
151+
PROTOC_VERSION=28.3
152+
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
153+
unzip -q "protoc-${PROTOC_VERSION}-linux-x86_64.zip" -d $HOME/.local
154+
echo "$HOME/.local/bin" >> $GITHUB_PATH
155+
rm "protoc-${PROTOC_VERSION}-linux-x86_64.zip"
153156
- name: Build node binary
154157
if: needs.setup.outputs.node_changed == 'true' || needs.setup.outputs.force_node == 'true'
155158
run: cargo build -p storage-hub-node --release --locked
@@ -206,9 +209,12 @@ jobs:
206209
- name: Install libpq-dev
207210
run: sudo apt-get update && sudo apt-get install -y libpq-dev libclang-dev
208211
- name: Install Protoc
209-
uses: arduino/setup-protoc@v3
210-
with:
211-
repo-token: ${{ secrets.GITHUB_TOKEN }}
212+
run: |
213+
PROTOC_VERSION=28.3
214+
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
215+
unzip -q "protoc-${PROTOC_VERSION}-linux-x86_64.zip" -d $HOME/.local
216+
echo "$HOME/.local/bin" >> $GITHUB_PATH
217+
rm "protoc-${PROTOC_VERSION}-linux-x86_64.zip"
212218
- name: Build backend
213219
if: needs.setup.outputs.backend_changed == 'true' || needs.setup.outputs.force_backend == 'true'
214220
run: cargo build -p sh-msp-backend --release --locked
@@ -663,9 +669,12 @@ jobs:
663669
- name: Install libpq-dev
664670
run: sudo apt-get update && sudo apt-get install -y libpq-dev
665671
- name: Install Protoc
666-
uses: arduino/setup-protoc@v3
667-
with:
668-
repo-token: ${{ secrets.GITHUB_TOKEN }}
672+
run: |
673+
PROTOC_VERSION=28.3
674+
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
675+
unzip -q "protoc-${PROTOC_VERSION}-linux-x86_64.zip" -d $HOME/.local
676+
echo "$HOME/.local/bin" >> $GITHUB_PATH
677+
rm "protoc-${PROTOC_VERSION}-linux-x86_64.zip"
669678
- run: mkdir -p target/release/
670679
- name: Get backend binary from artefacts if changed
671680
if: needs.setup.outputs.backend_changed == 'true' || needs.setup.outputs.force_backend == 'true'
@@ -955,9 +964,12 @@ jobs:
955964
- name: Install libpq-dev
956965
run: sudo apt-get update && sudo apt-get install -y libpq-dev
957966
- name: Install Protoc
958-
uses: arduino/setup-protoc@v3
959-
with:
960-
repo-token: ${{ secrets.GITHUB_TOKEN }}
967+
run: |
968+
PROTOC_VERSION=28.3
969+
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
970+
unzip -q "protoc-${PROTOC_VERSION}-linux-x86_64.zip" -d $HOME/.local
971+
echo "$HOME/.local/bin" >> $GITHUB_PATH
972+
rm "protoc-${PROTOC_VERSION}-linux-x86_64.zip"
961973
- run: mkdir -p target/release/
962974
- name: Get backend binary from artefacts if changed
963975
if: needs.setup.outputs.backend_changed == 'true' || needs.setup.outputs.force_backend == 'true'

.github/workflows/rust-tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,12 @@ jobs:
8484
- name: Install libpq-dev
8585
run: sudo apt-get update && sudo apt-get install -y libpq-dev libclang-dev
8686
- name: Install Protoc
87-
uses: arduino/setup-protoc@v3
88-
with:
89-
repo-token: ${{ secrets.GITHUB_TOKEN }}
87+
run: |
88+
PROTOC_VERSION=28.3
89+
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
90+
unzip -q "protoc-${PROTOC_VERSION}-linux-x86_64.zip" -d $HOME/.local
91+
echo "$HOME/.local/bin" >> $GITHUB_PATH
92+
rm "protoc-${PROTOC_VERSION}-linux-x86_64.zip"
9093
- name: Build and archive tests
9194
run: cargo nextest archive --archive-file nextest-archive.tar.zst --workspace --features sh-msp-backend-lib/mocks
9295
- name: Build Stats

.github/workflows/sdk.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,13 @@ jobs:
195195
uses: ./.github/workflow-templates/setup-pnpm
196196
env:
197197
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
198-
- name: Setup Protobuf (protoc)
199-
uses: arduino/setup-protoc@v3
200-
with:
201-
repo-token: ${{ secrets.GITHUB_TOKEN }}
198+
- name: Install Protoc
199+
run: |
200+
PROTOC_VERSION=28.3
201+
curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
202+
unzip -q "protoc-${PROTOC_VERSION}-linux-x86_64.zip" -d $HOME/.local
203+
echo "$HOME/.local/bin" >> $GITHUB_PATH
204+
rm "protoc-${PROTOC_VERSION}-linux-x86_64.zip"
202205
- name: Setup Rust toolchain (for backend build)
203206
uses: actions-rust-lang/[email protected]
204207
with:

0 commit comments

Comments
 (0)