Skip to content

Commit

Permalink
Add a .bazelversion file and use bazelisk
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed Dec 22, 2023
1 parent 7115aad commit e762cbd
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 88 deletions.
File renamed without changes.
1 change: 0 additions & 1 deletion .ci/bazel-6.4.0-darwin-x86_64.sha256

This file was deleted.

1 change: 0 additions & 1 deletion .ci/bazel-6.4.0-linux-x86_64.sha256

This file was deleted.

1 change: 0 additions & 1 deletion .ci/bazel-6.4.0-windows-x86_64.exe.sha256

This file was deleted.

14 changes: 0 additions & 14 deletions .ci/check-bazel-version

This file was deleted.

30 changes: 0 additions & 30 deletions .ci/fetch-bazel-bindist

This file was deleted.

25 changes: 0 additions & 25 deletions .ci/update-bazel-version

This file was deleted.

21 changes: 5 additions & 16 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ jobs:
EOF
cp .bazelrc.local rules_haskell_nix
cp .bazelrc.local rules_haskell_tests
- name: Check Bazel version
uses: tweag/run-nix-shell@v0
with:
options: ${{ env.NIX_SHELL_ARGS }}
run: .ci/check-bazel-version
- name: Build & test - rules_haskell
if: matrix.module == 'rules_haskell'
uses: tweag/run-nix-shell@v0
Expand Down Expand Up @@ -178,12 +173,6 @@ jobs:
with:
path: ~/repo-cache
key: repo-cache-${{ runner.os }}-bindist-${{ env.cache-version }}
- name: Install Bazel
shell: bash
run: |
BAZEL_DIR="$(.ci/fetch-bazel-bindist)"
mv $BAZEL_DIR $HOME/bazel
echo "$HOME/bazel" >> "$GITHUB_PATH"
- uses: tweag/configure-bazel-remote-cache-auth@v0
with:
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
Expand Down Expand Up @@ -228,7 +217,7 @@ jobs:
shell: bash
run: |
# Quote the package specifier so that it works on Windows
bazel test "//..."
bazelisk test "//..."
- name: Build & test - rules_haskell_tests
if: matrix.module == 'rules_haskell_tests'
Expand All @@ -237,11 +226,11 @@ jobs:
cd rules_haskell_tests
./tests/run-start-script.sh --use-bindists --with-bzlmod=${{ matrix.bzlmod }}
# Quote the package specifier so that it works on Windows
bazel test "//..."
bazelisk test "//..."
# Test stack_snapshot pinning
# NOTE keep in sync with tests/RunTests.hs
bazel run @stackage-pinning-test-unpinned//:pin
bazel build @stackage-pinning-test//:hspec
bazelisk run @stackage-pinning-test-unpinned//:pin
bazelisk build @stackage-pinning-test//:hspec
- name: Collect Logs
id: collect_logs
Expand All @@ -254,7 +243,7 @@ jobs:
else
dir=.
fi
base=$( cd "$dir" ; bazel info output_base )
base=$( cd "$dir" ; bazelisk info output_base )
find "$base" -mindepth 1 -maxdepth 1 -name "java*.log.*" -print0 | xargs -0rI % cp % logs/
- name: Upload Logs
Expand Down
1 change: 1 addition & 0 deletions rules_haskell_nix/.bazelversion
1 change: 1 addition & 0 deletions rules_haskell_tests/.bazelversion

0 comments on commit e762cbd

Please sign in to comment.