Skip to content

Commit 1a9a4da

Browse files
committed
fix: Revert configurebb.sh, use straight flags for bzlmod
1 parent 2b91ee2 commit 1a9a4da

2 files changed

Lines changed: 30 additions & 31 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
#!/bin/bash
22
set -o errexit -o nounset -o pipefail
33

4-
touch "$HOME/.bazelrc"
5-
chmod 0600 "$HOME/.bazelrc"
6-
7-
# Configure flags for bzlmod
8-
echo "common:bzlmod --enable_bzlmod" >> "$HOME/.bazelrc"
9-
echo "common:workspace --noenable_bzlmod" >> "$HOME/.bazelrc"
10-
114
if [ "${BUILDBUDDY_API_KEY:-}" ]; then
5+
touch "$HOME/.bazelrc"
6+
chmod 0600 "$HOME/.bazelrc"
127
echo "build --bes_backend=grpcs://remote.buildbuddy.io"
138
echo "build --bes_results_url=https://app.buildbuddy.io/invocation/"
149
echo "build --remote_cache=grpcs://remote.buildbuddy.io"
15-
echo "build --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY" >> "$HOME/.bazelrc"
10+
echo "build --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY" > "$HOME/.bazelrc"
1611
fi
17-

.github/workflows/default.yaml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
os:
2323
- ubuntu-22.04
2424
- ubuntu-24.04
25-
bzlmod_config:
26-
- bzlmod
27-
- workspace
25+
bzlmod:
26+
- enabled: True
27+
- enabled: False
2828
runs-on: ${{ matrix.os }}
2929
steps:
3030
- uses: actions/checkout@v4
@@ -37,8 +37,8 @@ jobs:
3737
repository-cache: true
3838
- name: Test
3939
run: |
40-
./.github/workflows/configure_bazelrc.sh
41-
bazel test --config ci --config ${{ matrix.bzlmod_config }} //...
40+
./.github/workflows/configurebb.sh
41+
bazel test --config ci --enable_bzlmod=${{ matrix.bzlmod.enabled }} //...
4242
env:
4343
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
4444
compilation_modes:
@@ -48,9 +48,9 @@ jobs:
4848
- fastbuild
4949
- dbg
5050
- opt
51-
bzlmod_config:
52-
- bzlmod
53-
- workspace
51+
bzlmod:
52+
- enabled: True
53+
- enabled: False
5454
runs-on: ubuntu-22.04
5555
steps:
5656
- uses: actions/checkout@v4
@@ -63,8 +63,8 @@ jobs:
6363
repository-cache: true
6464
- name: Test
6565
run: |
66-
./.github/workflows/configure_bazelrc.sh
67-
bazel test --config ci --config ${{ matrix.bzlmod_config }} --compilation_mode ${{ matrix.compilation_mode }} //...
66+
./.github/workflows/configurebb.sh
67+
bazel test --config ci --enable_bzlmod=${{ matrix.bzlmod.enabled }} --compilation_mode ${{ matrix.compilation_mode }} //...
6868
env:
6969
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
7070
sanitizers:
@@ -75,9 +75,9 @@ jobs:
7575
- lsan
7676
- tsan
7777
- ubsan
78-
bzlmod_config:
79-
- bzlmod
80-
- workspace
78+
bzlmod:
79+
- enabled: True
80+
- enabled: False
8181
runs-on: ubuntu-22.04
8282
steps:
8383
- uses: actions/checkout@v4
@@ -90,11 +90,16 @@ jobs:
9090
repository-cache: true
9191
- name: Test ${{ matrix.sanitizer }}
9292
run: |
93-
./.github/workflows/configure_bazelrc.sh
94-
bazel test --config ci --config ${{ matrix.sanitizer }} --config ${{ matrix.bzlmod_config }} //tests/sanitizers:${{ matrix.sanitizer }}_test
93+
./.github/workflows/configurebb.sh
94+
bazel test --config ci --config ${{ matrix.sanitizer }} --enable_bzlmod=${{ matrix.bzlmod.enabled }} //tests/sanitizers:${{ matrix.sanitizer }}_test
9595
env:
9696
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
9797
coverage:
98+
strategy:
99+
matrix:
100+
bzlmod:
101+
- enabled: True
102+
- enabled: False
98103
runs-on: ubuntu-22.04
99104
steps:
100105
- uses: actions/checkout@v4
@@ -107,8 +112,8 @@ jobs:
107112
repository-cache: true
108113
- name: Test Coverage
109114
run: |
110-
./.github/workflows/configure_bazelrc.sh
111-
bazel coverage --config ci //examples/hello_world_cpp:hello_world_cpp_test
115+
./.github/workflows/configurebb.sh
116+
bazel coverage --config ci --enable_bzlmod=${{ matrix.bzlmod.enabled }} //examples/hello_world_cpp:hello_world_cpp_test
112117
env:
113118
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
114119
rbe:
@@ -117,9 +122,9 @@ jobs:
117122
os:
118123
- ubuntu-22.04
119124
- macos-14
120-
bzlmod_config:
121-
- bzlmod
122-
- workspace
125+
bzlmod:
126+
- enabled: True
127+
- enabled: False
123128
runs-on: ${{ matrix.os }}
124129
steps:
125130
- uses: actions/checkout@v4
@@ -132,7 +137,7 @@ jobs:
132137
repository-cache: true
133138
- name: Test with RBE
134139
run: |
135-
./.github/workflows/configure_bazelrc.sh
136-
bazel test --config ci --config rbe --config ${{ matrix.bzlmod_config }} //...
140+
./.github/workflows/configurebb.sh
141+
bazel test --config ci --config rbe --enable_bzlmod=${{ matrix.bzlmod.enabled }} //...
137142
env:
138143
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}

0 commit comments

Comments
 (0)