Matrix server build jobs (#7257)

This commit is contained in:
2026-06-15 10:14:18 -07:00
committed by GitHub
parent 88a224c093
commit 55ad961f19
+23 -37
View File
@@ -39,6 +39,7 @@ jobs:
outputs:
eagle: ${{ steps.filter.outputs.eagle }}
shardok: ${{ steps.filter.outputs.shardok }}
build_matrix: ${{ steps.filter.outputs.build_matrix }}
steps:
- name: Detect changed server areas
id: filter
@@ -97,11 +98,29 @@ jobs:
core.info(`Run Shardok build: ${shardok}`);
core.setOutput('eagle', String(eagle));
core.setOutput('shardok', String(shardok));
const include = [];
if (eagle) {
include.push({
name: 'Eagle server',
command: './scripts/build_eagle_ci.sh',
});
}
if (shardok) {
include.push({
name: 'Shardok server',
command: './scripts/build_shardok_ci.sh',
});
}
core.setOutput('build_matrix', JSON.stringify({include}));
eagle-build:
server-build:
name: Build ${{ matrix.name }}
needs: changes
if: needs.changes.outputs.eagle == 'true'
if: needs.changes.outputs.build_matrix != '{"include":[]}'
runs-on: [self-hosted, bazel]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.changes.outputs.build_matrix) }}
steps:
- name: Ensure Git LFS available for checkout
@@ -128,38 +147,5 @@ jobs:
lfs: false
- name: Setup Bazel
uses: ./.github/actions/setup-bazel
- name: Build Eagle server
run: ./scripts/build_eagle_ci.sh
shardok-build:
needs: changes
if: needs.changes.outputs.shardok == 'true'
runs-on: [self-hosted, bazel]
steps:
- name: Ensure Git LFS available for checkout
run: |
COMMON_PATHS=(/opt/homebrew/bin /usr/local/bin)
for path in "${COMMON_PATHS[@]}"; do
if [ -d "$path" ]; then
echo "$path" >> "$GITHUB_PATH"
export PATH="$path:$PATH"
fi
done
if command -v git-lfs >/dev/null 2>&1; then
git-lfs version
exit 0
fi
brew install git-lfs
git-lfs version
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
lfs: false
- name: Setup Bazel
uses: ./.github/actions/setup-bazel
- name: Build Shardok server
run: ./scripts/build_shardok_ci.sh
- name: Build server
run: ${{ matrix.command }}