Extract shared Bazel runner setup action (#7242)

* Extract shared Bazel runner setup action

* Keep Git LFS setup before checkout
This commit is contained in:
2026-06-15 08:22:05 -07:00
committed by GitHub
parent b097e0c9ff
commit 6e56176d4c
4 changed files with 23 additions and 8 deletions
+9
View File
@@ -0,0 +1,9 @@
name: Setup Bazel
description: Ensure Bazel is installed on a self-hosted runner.
runs:
using: composite
steps:
- name: Ensure Bazel installed
shell: bash
run: ./ci/github_actions/ensure_bazel_installed.sh
+4 -2
View File
@@ -12,6 +12,7 @@ on:
- '.bazelrc'
- 'ci/github_actions/ensure_bazel_installed.sh'
- 'ci/github_actions/summarize_bazel_bep.py'
- '.github/actions/setup-bazel/**'
- '.github/workflows/bazel_test.yml'
- '!src/main/csharp/**'
- '!src/test/csharp/**'
@@ -25,6 +26,7 @@ on:
- '.bazelrc'
- 'ci/github_actions/ensure_bazel_installed.sh'
- 'ci/github_actions/summarize_bazel_bep.py'
- '.github/actions/setup-bazel/**'
- '.github/workflows/bazel_test.yml'
- '!src/main/csharp/**'
- '!src/test/csharp/**'
@@ -108,8 +110,8 @@ jobs:
with:
persist-credentials: false
lfs: false
- name: Ensure Bazel installed
run: ./ci/github_actions/ensure_bazel_installed.sh
- name: Setup Bazel
uses: ./.github/actions/setup-bazel
- name: Run tests
run: bazel test --build_event_json_file=test.json //src/test/... //src/main/go/...
- name: Summarize Bazel build metrics
+4 -2
View File
@@ -5,12 +5,14 @@ on:
branches: [ "main" ]
paths:
- ".github/workflows/installer_build.yml"
- ".github/actions/setup-bazel/**"
- "ci/github_actions/ensure_bazel_installed.sh"
- ".bazelrc"
- "src/main/go/net/eagle0/clients/win/installer/**"
pull_request:
paths:
- ".github/workflows/installer_build.yml"
- ".github/actions/setup-bazel/**"
- "ci/github_actions/ensure_bazel_installed.sh"
- ".bazelrc"
- "src/main/go/net/eagle0/clients/win/installer/**"
@@ -48,8 +50,8 @@ jobs:
lfs: false
clean: false
- name: Ensure Bazel installed
run: ./ci/github_actions/ensure_bazel_installed.sh
- name: Setup Bazel
uses: ./.github/actions/setup-bazel
- name: Build Go installer for Windows
env:
+6 -4
View File
@@ -20,6 +20,7 @@ on:
- 'ci/github_actions/ensure_bazel_installed.sh'
- 'scripts/build_eagle_ci.sh'
- 'scripts/build_shardok_ci.sh'
- '.github/actions/setup-bazel/**'
- '.github/workflows/eagle_build.yml'
- '.github/workflows/shardok_build.yml'
- '.github/workflows/server_build.yml'
@@ -69,6 +70,7 @@ jobs:
'BUILD.bazel',
'.bazelrc',
'ci/github_actions/ensure_bazel_installed.sh',
'.github/actions/setup-bazel/',
'.github/workflows/eagle_build.yml',
'.github/workflows/shardok_build.yml',
'.github/workflows/server_build.yml',
@@ -124,8 +126,8 @@ jobs:
with:
persist-credentials: false
lfs: false
- name: Ensure Bazel installed
run: ./ci/github_actions/ensure_bazel_installed.sh
- name: Setup Bazel
uses: ./.github/actions/setup-bazel
- name: Build Eagle server
run: ./scripts/build_eagle_ci.sh
@@ -157,7 +159,7 @@ jobs:
with:
persist-credentials: false
lfs: false
- name: Ensure Bazel installed
run: ./ci/github_actions/ensure_bazel_installed.sh
- name: Setup Bazel
uses: ./.github/actions/setup-bazel
- name: Build Shardok server
run: ./scripts/build_shardok_ci.sh