Skip to content

Commit

Permalink
Enable bzlmod on CI
Browse files Browse the repository at this point in the history
On for GHC version 9.4.5 and only for the example test for now.

The alternative-deps tests and the root module are not yet ready to be
tested with bzlmod enabled.
  • Loading branch information
aherrmann committed Sep 26, 2023
1 parent 9101cd6 commit daea226
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
matrix:
os: [ubuntu-latest]
ghc-version: [ghc_8_10_7, ghc_9_0_2, ghc_9_2_7, ghc_9_4_5]
enable-bzlmod: [false]
include:
- ghc-version: ghc_9_4_5
enable-bzlmod: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -48,10 +52,16 @@ jobs:
build --keep_backend_build_event_connections_alive=false
build --repository_cache=~/repo-cache/
EOF
if [[ ${{ matrix.enable-bzlmod }} ]]
echo "common --config=bzlmod" >>.bazelrc.local
fi
ln -s ../.bazelrc.local example/.bazelrc.local
ln -s ../../.bazelrc.local tests/alternative-deps/.bazelrc.local
- name: Build & test
run: nix-shell --pure --run 'bazel test --config=${{ matrix.ghc-version }} --test_output=all //...'
if: ${{ !matrix.enable-bzlmod }}
- name: Test the example
run: |
cd example
Expand Down Expand Up @@ -113,5 +123,7 @@ jobs:
nix-shell --pure --run 'bazel run //:gazelle --config=${{ matrix.ghc-version }}'
nix-shell --pure --run 'bazel run //:gazelle-update-repos --config=${{ matrix.ghc-version }}'
nix-shell --pure --run 'bazel test //... --config=${{ matrix.ghc-version }}'
if: ${{ !matrix.enable-bzlmod }}
- name: Test for buildifier suggestions
run: nix-shell --pure --run 'bazel run //:buildifier-diff'
if: ${{ !matrix.enable-bzlmod }}

0 comments on commit daea226

Please sign in to comment.