Skip to content

Commit eaba9ce

Browse files
authored
Merge branch 'master' into cg/use_write_bazelrc
2 parents 282f324 + 300963d commit eaba9ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+203
-349
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: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,12 @@ 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
110105
with:
111106
options: ${{ env.NIX_SHELL_ARGS }}
112107
run: |
113-
set -euo pipefail
114108
bazel test //...
115109
bazel build //docs:api_html
116110
bazel build //docs:guide_html
@@ -119,23 +113,23 @@ jobs:
119113
uses: tweag/run-nix-shell@v0
120114
with:
121115
options: ${{ env.NIX_SHELL_ARGS }}
122-
run: |
123-
set -euo pipefail
124-
cd rules_haskell_nix
125-
bazel test //...
116+
working-directory: rules_haskell_nix
117+
run: bazel test //...
126118
- name: Build & test - rules_haskell_tests
127119
if: matrix.module == 'rules_haskell_tests'
128120
uses: tweag/run-nix-shell@v0
129121
with:
130122
options: ${{ env.NIX_SHELL_ARGS }}
123+
working-directory: rules_haskell_tests
131124
run: |
132-
set -euo pipefail
133-
cd rules_haskell_tests
134125
# XXX run start script `--with-bzlmod=true` when supported
135126
if ! ${{ matrix.bzlmod }}; then
136127
./tests/run-start-script.sh --use-nix --with-bzlmod=${{ matrix.bzlmod }}
137128
fi
138129
bazel build //tests:run-tests
130+
# Shutdown Bazel to free up memory
131+
# https://github.com/tweag/rules_haskell/issues/2089.
132+
bazel shutdown
139133
./bazel-ci-bin/tests/run-tests
140134
bazel coverage //...
141135
@@ -179,12 +173,6 @@ jobs:
179173
with:
180174
path: ~/repo-cache
181175
key: repo-cache-${{ runner.os }}-bindist-${{ env.cache-version }}
182-
- name: Install Bazel
183-
shell: bash
184-
run: |
185-
BAZEL_DIR="$(.ci/fetch-bazel-bindist)"
186-
mv $BAZEL_DIR $HOME/bazel
187-
echo "$HOME/bazel" >> "$GITHUB_PATH"
188176
- uses: tweag/configure-bazel-remote-cache-auth@v0
189177
with:
190178
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
@@ -229,7 +217,7 @@ jobs:
229217
shell: bash
230218
run: |
231219
# Quote the package specifier so that it works on Windows
232-
bazel test "//..."
220+
bazelisk test "//..."
233221
234222
- name: Build & test - rules_haskell_tests
235223
if: matrix.module == 'rules_haskell_tests'
@@ -238,11 +226,11 @@ jobs:
238226
cd rules_haskell_tests
239227
./tests/run-start-script.sh --use-bindists --with-bzlmod=${{ matrix.bzlmod }}
240228
# Quote the package specifier so that it works on Windows
241-
bazel test "//..."
229+
bazelisk test "//..."
242230
# Test stack_snapshot pinning
243231
# NOTE keep in sync with tests/RunTests.hs
244-
bazel run @stackage-pinning-test-unpinned//:pin
245-
bazel build @stackage-pinning-test//:hspec
232+
bazelisk run @stackage-pinning-test-unpinned//:pin
233+
bazelisk build @stackage-pinning-test//:hspec
246234
247235
- name: Collect Logs
248236
id: collect_logs
@@ -255,7 +243,7 @@ jobs:
255243
else
256244
dir=.
257245
fi
258-
base=$( cd "$dir" ; bazel info output_base )
246+
base=$( cd "$dir" ; bazelisk info output_base )
259247
find "$base" -mindepth 1 -maxdepth 1 -name "java*.log.*" -print0 | xargs -0rI % cp % logs/
260248
261249
- 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)