Skip to content

Commit 300963d

Browse files
authored
Merge pull request #2095 from tweag/cb/use-bazelisk
Add a .bazelversion file and use bazelisk
2 parents 7115aad + 3d2228c commit 300963d

17 files changed

+16
-128
lines changed
File renamed without changes.

.ci/bazel-6.4.0-darwin-x86_64.sha256

Lines changed: 0 additions & 1 deletion
This file was deleted.

.ci/bazel-6.4.0-linux-x86_64.sha256

Lines changed: 0 additions & 1 deletion
This file was deleted.

.ci/bazel-6.4.0-windows-x86_64.exe.sha256

Lines changed: 0 additions & 1 deletion
This file was deleted.

.ci/check-bazel-version

Lines changed: 0 additions & 14 deletions
This file was deleted.

.ci/fetch-bazel-bindist

Lines changed: 0 additions & 30 deletions
This file was deleted.

.ci/update-bazel-version

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/patch-test.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ jobs:
4646
with:
4747
path: ~/repo-cache
4848
key: repo-cache-${{ runner.os }}-bindist-${{ env.cache-version }}
49-
- name: Install Bazel
50-
shell: bash
51-
run: |
52-
BAZEL_DIR="$(.ci/fetch-bazel-bindist)"
53-
mv $BAZEL_DIR $HOME/bazel
5449
- name: Configure
5550
env:
5651
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}

.github/workflows/workflow.yaml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,6 @@ jobs:
9999
EOF
100100
cp .bazelrc.local rules_haskell_nix
101101
cp .bazelrc.local rules_haskell_tests
102-
- name: Check Bazel version
103-
uses: tweag/run-nix-shell@v0
104-
with:
105-
options: ${{ env.NIX_SHELL_ARGS }}
106-
run: .ci/check-bazel-version
107102
- name: Build & test - rules_haskell
108103
if: matrix.module == 'rules_haskell'
109104
uses: tweag/run-nix-shell@v0
@@ -178,12 +173,6 @@ jobs:
178173
with:
179174
path: ~/repo-cache
180175
key: repo-cache-${{ runner.os }}-bindist-${{ env.cache-version }}
181-
- name: Install Bazel
182-
shell: bash
183-
run: |
184-
BAZEL_DIR="$(.ci/fetch-bazel-bindist)"
185-
mv $BAZEL_DIR $HOME/bazel
186-
echo "$HOME/bazel" >> "$GITHUB_PATH"
187176
- uses: tweag/configure-bazel-remote-cache-auth@v0
188177
with:
189178
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
@@ -228,7 +217,7 @@ jobs:
228217
shell: bash
229218
run: |
230219
# Quote the package specifier so that it works on Windows
231-
bazel test "//..."
220+
bazelisk test "//..."
232221
233222
- name: Build & test - rules_haskell_tests
234223
if: matrix.module == 'rules_haskell_tests'
@@ -237,11 +226,11 @@ jobs:
237226
cd rules_haskell_tests
238227
./tests/run-start-script.sh --use-bindists --with-bzlmod=${{ matrix.bzlmod }}
239228
# Quote the package specifier so that it works on Windows
240-
bazel test "//..."
229+
bazelisk test "//..."
241230
# Test stack_snapshot pinning
242231
# NOTE keep in sync with tests/RunTests.hs
243-
bazel run @stackage-pinning-test-unpinned//:pin
244-
bazel build @stackage-pinning-test//:hspec
232+
bazelisk run @stackage-pinning-test-unpinned//:pin
233+
bazelisk build @stackage-pinning-test//:hspec
245234
246235
- name: Collect Logs
247236
id: collect_logs
@@ -254,7 +243,7 @@ jobs:
254243
else
255244
dir=.
256245
fi
257-
base=$( cd "$dir" ; bazel info output_base )
246+
base=$( cd "$dir" ; bazelisk info output_base )
258247
find "$base" -mindepth 1 -maxdepth 1 -name "java*.log.*" -print0 | xargs -0rI % cp % logs/
259248
260249
- name: Upload Logs

.netlify/build.sh

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,7 @@
22

33
set -eux
44

5-
export PATH="$HOME/bin:$PATH"
6-
7-
# XXX We don't want to be using the Nixpkgs CC toolchain, because
8-
# Nixpkgs is not available. But currently we can only override the
9-
# autoconfigured CC toolchain, not have several (which we would then
10-
# select via --extra_toolchains). So here's a gross hack that simply
11-
# patches out the nixpkgs_cc_configure() line.
12-
#
13-
# See https://github.com/bazelbuild/bazel/issues/6696.
14-
awk '
15-
BEGIN {del=0}
16-
/^nixpkgs_cc_configure\(/ {del=1}
17-
del==0 {print}
18-
/\)/ {del=0}' WORKSPACE > WORKSPACE.tmp
19-
# Note: awk -i inplace not available
20-
mv WORKSPACE.tmp WORKSPACE
21-
22-
bazel build //docs:api_html
5+
npx @bazel/bazelisk build //docs:api_html
236
mkdir -p public
247
unzip -d public bazel-bin/docs/api_html-stardoc.zip
258
cp start public

0 commit comments

Comments
 (0)