From 864dd5b754641c72074fe6e6d89c8072b7a34b25 Mon Sep 17 00:00:00 2001 From: Amit Kumar-Hermosillo Date: Mon, 30 Nov 2026 20:05:12 +0000 Subject: [PATCH 1/2] DO NOT SUBMIT: test GCP staging CI runners (openprot-ci-runner-staging) --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ec70bffd..918a313ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ env: jobs: presubmit: name: Presubmit Checks - runs-on: openprot-ci-runner + runs-on: openprot-ci-runner-staging steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 @@ -38,7 +38,7 @@ jobs: test: name: Test needs: presubmit - runs-on: openprot-ci-runner + runs-on: openprot-ci-runner-staging steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 @@ -56,7 +56,7 @@ jobs: build: name: Build Targets needs: test - runs-on: openprot-ci-runner + runs-on: openprot-ci-runner-staging steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 From 13e0d9849ecfa4b23fe14c25671012ad37f8542e Mon Sep 17 00:00:00 2001 From: Amit Kumar-Hermosillo Date: Tue, 1 Dec 2026 22:06:31 +0000 Subject: [PATCH 2/2] DO NOT SUBMIT: wire up staging GCS Bazel remote cache via WIF --- .github/workflows/ci.yml | 54 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 918a313ad..875d99461 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,12 +4,13 @@ name: CI on: push: - branches: [ main, develop ] + branches: [ main, develop, test/gcp-staging-ci ] pull_request: branches: [ main, earlgrey-hwe ] permissions: contents: read + id-token: write env: CARGO_TERM_COLOR: always @@ -29,6 +30,23 @@ jobs: disk-cache: false repository-cache: false + - name: Authenticate to GCP (WIF) + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 + with: + workload_identity_provider: projects/205490233253/locations/global/workloadIdentityPools/github-actions-pool/providers/github-oidc + service_account: ${{ github.event_name == 'push' && github.ref == 'refs/heads/test/gcp-staging-ci' && 'bazel-cache-writer@openprot-ci-staging.iam.gserviceaccount.com' || 'bazel-cache-reader@openprot-ci-staging.iam.gserviceaccount.com' }} + + - name: Configure Bazel remote cache + run: | + cat < .bazelrc-site + build --remote_cache=https://storage.googleapis.com/openprot-ci-staging-bazel-cache + build --google_default_credentials=true + build --remote_upload_local_results=${{ github.event_name == 'push' && github.ref == 'refs/heads/test/gcp-staging-ci' }} + build --experimental_remote_cache_eviction_retries=5 + build --experimental_remote_cache_async + build --experimental_inprocess_symlink_creation=false + EOF + - name: Presubmit Checks # The presubmit workflow performs formatting checks, a MODULE.bazel.lock # up-to-date check, license checks, C/C++ include checks and clippy lints. @@ -49,6 +67,23 @@ jobs: disk-cache: false repository-cache: false + - name: Authenticate to GCP (WIF) + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 + with: + workload_identity_provider: projects/205490233253/locations/global/workloadIdentityPools/github-actions-pool/providers/github-oidc + service_account: ${{ github.event_name == 'push' && github.ref == 'refs/heads/test/gcp-staging-ci' && 'bazel-cache-writer@openprot-ci-staging.iam.gserviceaccount.com' || 'bazel-cache-reader@openprot-ci-staging.iam.gserviceaccount.com' }} + + - name: Configure Bazel remote cache + run: | + cat < .bazelrc-site + build --remote_cache=https://storage.googleapis.com/openprot-ci-staging-bazel-cache + build --google_default_credentials=true + build --remote_upload_local_results=${{ github.event_name == 'push' && github.ref == 'refs/heads/test/gcp-staging-ci' }} + build --experimental_remote_cache_eviction_retries=5 + build --experimental_remote_cache_async + build --experimental_inprocess_symlink_creation=false + EOF + - name: Run tests # See workflows.json for the `ci` definition. run: ./pw ci @@ -68,6 +103,23 @@ jobs: disk-cache: false repository-cache: false + - name: Authenticate to GCP (WIF) + uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3 + with: + workload_identity_provider: projects/205490233253/locations/global/workloadIdentityPools/github-actions-pool/providers/github-oidc + service_account: ${{ github.event_name == 'push' && github.ref == 'refs/heads/test/gcp-staging-ci' && 'bazel-cache-writer@openprot-ci-staging.iam.gserviceaccount.com' || 'bazel-cache-reader@openprot-ci-staging.iam.gserviceaccount.com' }} + + - name: Configure Bazel remote cache + run: | + cat < .bazelrc-site + build --remote_cache=https://storage.googleapis.com/openprot-ci-staging-bazel-cache + build --google_default_credentials=true + build --remote_upload_local_results=${{ github.event_name == 'push' && github.ref == 'refs/heads/test/gcp-staging-ci' }} + build --experimental_remote_cache_eviction_retries=5 + build --experimental_remote_cache_async + build --experimental_inprocess_symlink_creation=false + EOF + - name: Build # See workflows.json for the `default` definition. run: ./pw default