Skip to content

Commit 58140e2

Browse files
committed
CI: Explicitly enable / disable bzlmod
1 parent 37bc3ed commit 58140e2

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

.github/workflows/workflow.yaml

+9-15
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
matrix:
2121
os: [ubuntu-latest, macos-11]
2222
module: [rules_haskell, rules_haskell_nix, rules_haskell_tests]
23-
bzlmod: [bzlmod, workspace]
23+
bzlmod: [true, false]
2424
ghc:
2525
- 9.2.5
2626
- 9.4.5
@@ -62,16 +62,11 @@ jobs:
6262
else
6363
cache_setting="--remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY"
6464
fi
65-
if [ ${{ matrix.bzlmod }} == bzlmod ]; then
66-
bzlmod_setting='common --config bzlmod'
67-
else
68-
bzlmod_setting=''
69-
fi
7065
cat >.bazelrc.local <<EOF
7166
common --config=ci
7267
build --config=$BUILD_CONFIG
7368
build $cache_setting
74-
$bzlmod_setting
69+
common --enable_bzlmod=${{ matrix.bzlmod }}
7570
EOF
7671
cp .bazelrc.local rules_haskell_nix
7772
cp .bazelrc.local rules_haskell_tests
@@ -121,7 +116,7 @@ jobs:
121116
matrix:
122117
os: [ubuntu-latest, macos-11, windows-latest]
123118
module: [rules_haskell, rules_haskell_tests]
124-
bzlmod: [bzlmod, workspace]
119+
bzlmod: [true, false]
125120
ghc:
126121
- 9.2.5
127122
- 9.4.5
@@ -168,16 +163,15 @@ jobs:
168163
else
169164
cache_setting="--remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY"
170165
fi
171-
if [ ${{ matrix.bzlmod }} == bzlmod ]; then
172-
bzlmod_setting='common --config bzlmod'
173-
else
174-
bzlmod_setting=''
175-
fi
176166
if [[ ${{ runner.os }} == Windows ]]; then
177167
output_root_setting="startup --output_user_root=C:/_bzl"
178168
# On windows, we use a separate remote cache for bzlmod,
179169
# because the c dependency analysis is leaking absolute paths which are different
180-
bzlmod_cache_silo_key="build --remote_default_exec_properties=bzlmod-cache-silo-key=${{ matrix.bzlmod }}"
170+
if ${{ matrix.bzlmod }}; then
171+
bzlmod_cache_silo_key='build --remote_default_exec_properties=bzlmod-cache-silo-key=bzlmod'
172+
else
173+
bzlmod_cache_silo_key='build --remote_default_exec_properties=bzlmod-cache-silo-key=workspace'
174+
fi
181175
else
182176
output_root_setting=""
183177
bzlmod_cache_silo_key=""
@@ -188,7 +182,7 @@ jobs:
188182
build $cache_setting
189183
$output_root_setting
190184
$bzlmod_cache_silo_key
191-
$bzlmod_setting
185+
common --enable_bzlmod=${{ matrix.bzlmod }}
192186
EOF
193187
cp .bazelrc.local rules_haskell_tests
194188
cat >~/.netrc <<EOF

0 commit comments

Comments
 (0)