chore: now testing on Aspect Workflows RBE (#920)
This commit is contained in:
parent
cf03a14551
commit
edaafd2ca5
|
@ -32,20 +32,6 @@ jobs:
|
||||||
)
|
)
|
||||||
printf -v j '{%s},' "${a[@]}"
|
printf -v j '{%s},' "${a[@]}"
|
||||||
echo "res=[${j%,}]" | tee -a $GITHUB_OUTPUT
|
echo "res=[${j%,}]" | tee -a $GITHUB_OUTPUT
|
||||||
- id: config
|
|
||||||
name: Prepare 'config' matrix axis
|
|
||||||
# Don't run RBE if there is no API key which is the case on forks.
|
|
||||||
run: |
|
|
||||||
a=( local )
|
|
||||||
if [[ "${{ github.ref_name }}" == "main" ]] || [[ "$HEAD_REF" == *"rbe"* ]]; then
|
|
||||||
if [[ "${{ env.BUILDBUDDY_API_KEY }}" ]]; then
|
|
||||||
a+=( rbe )
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
printf -v j '"%s",' "${a[@]}"
|
|
||||||
echo "res=[${j%,}]" | tee -a $GITHUB_OUTPUT
|
|
||||||
env:
|
|
||||||
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
|
|
||||||
- id: os
|
- id: os
|
||||||
name: Prepare 'os' matrix axis
|
name: Prepare 'os' matrix axis
|
||||||
# Only run MacOS and Windows on main branch (not PRs) to minimize minutes (billed at 10X and 2X respectively)
|
# Only run MacOS and Windows on main branch (not PRs) to minimize minutes (billed at 10X and 2X respectively)
|
||||||
|
@ -95,20 +81,10 @@ jobs:
|
||||||
- os: windows
|
- os: windows
|
||||||
bazel-version:
|
bazel-version:
|
||||||
major: 6
|
major: 6
|
||||||
# Don't run RBE tests with Bazel 6 to reduce the size of the test matrix
|
|
||||||
- bazel-version:
|
|
||||||
major: 6
|
|
||||||
config: rbe
|
|
||||||
# Don't run bzlmod tests with Bazel 6 to reduce the size of the test matrix
|
# Don't run bzlmod tests with Bazel 6 to reduce the size of the test matrix
|
||||||
- bazel-version:
|
- bazel-version:
|
||||||
major: 6
|
major: 6
|
||||||
bzlmod: 1
|
bzlmod: 1
|
||||||
# Don't test RBE with on MacOS (not configured)
|
|
||||||
- os: macos
|
|
||||||
config: rbe
|
|
||||||
# Don't test RBE with on Windows (not configured)
|
|
||||||
- os: windows
|
|
||||||
config: rbe
|
|
||||||
# Root workspace is bzlmod-only
|
# Root workspace is bzlmod-only
|
||||||
- folder: .
|
- folder: .
|
||||||
bzlmod: 0
|
bzlmod: 0
|
||||||
|
@ -140,15 +116,6 @@ jobs:
|
||||||
# root .bazelrc brings these in with try-imports. In this CI workflows, we explicitly
|
# root .bazelrc brings these in with try-imports. In this CI workflows, we explicitly
|
||||||
# bring in the version specific bazelrc file with --bazelrc when we invoke bazel.
|
# bring in the version specific bazelrc file with --bazelrc when we invoke bazel.
|
||||||
rm ${GITHUB_WORKSPACE//\\/\/}/.aspect/bazelrc/local/*.bazelrc
|
rm ${GITHUB_WORKSPACE//\\/\/}/.aspect/bazelrc/local/*.bazelrc
|
||||||
- name: Write rbe credentials
|
|
||||||
if: ${{ matrix.config == 'rbe' }}
|
|
||||||
working-directory: ${{ matrix.folder }}
|
|
||||||
run: |
|
|
||||||
touch $HOME/.bazelrc
|
|
||||||
chmod 0600 $HOME/.bazelrc
|
|
||||||
echo "build --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY" > $HOME/.bazelrc
|
|
||||||
env:
|
|
||||||
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
|
|
||||||
# TODO: remove this block once we have Aspect CLI Windows releases
|
# TODO: remove this block once we have Aspect CLI Windows releases
|
||||||
- name: Don't use Aspect CLI on Windows
|
- name: Don't use Aspect CLI on Windows
|
||||||
if: matrix.os == 'windows'
|
if: matrix.os == 'windows'
|
||||||
|
|
Loading…
Reference in New Issue