From daea22638d502ae6abd75a210fcaa94590d6ffcc Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Tue, 26 Sep 2023 11:42:35 +0200 Subject: [PATCH] Enable bzlmod on CI 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. --- .github/workflows/workflow.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 78e0fc7..32f51b4 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -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 @@ -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 @@ -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 }}