Skip to content

Commit c3a674b

Browse files
Update build configuration of non-macos builds
1 parent 0b806c7 commit c3a674b

File tree

1 file changed

+2
-58
lines changed

1 file changed

+2
-58
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -28,64 +28,16 @@ jobs:
2828
restore-keys: |
2929
repo-cache-${{ runner.os }}-nixpkgs-${{ env.cache-version }}-
3030
31-
- name: Prefetch Stackage snapshot
32-
shell: bash
33-
run: |
34-
set -e -o pipefail
35-
nix-shell --pure --run "cmd='bazel fetch @stackage//... $BAZEL_ARGS'; \$cmd || \$cmd || \$cmd"
36-
37-
- name: run gazelle_cabal
38-
run: |
39-
nix-shell --pure --run "bazel run $BAZEL_ARGS //:gazelle"
40-
- name: Build and test
31+
- name: Build
4132
run: |
42-
nix-shell --pure --run "bazel test --test_output=all //... $BAZEL_ARGS"
33+
nix-shell --pure --run "bazel build //... $BAZEL_ARGS"
4334
- uses: actions/cache/save@v4
4435
if: github.ref == 'refs/heads/master'
4536
with:
4637
path: |
4738
~/repo-cache
4839
~/disk-cache
4940
key: repo-cache-${{ runner.os }}-nixpkgs-${{ env.cache-version }}-${{ github.run_id }}-${{ github.run_attempt }}
50-
- name: gazelle check
51-
run: |
52-
if ! git diff --exit-code
53-
then
54-
echo Repository files have changed
55-
echo You might need to run: nix-shell --run "\"bazel run //:gazelle\""
56-
echo and commit the resulting changes.
57-
exit 1
58-
fi
59-
60-
run-tests-with-stack:
61-
name: with stack
62-
runs-on: ubuntu-latest
63-
steps:
64-
- uses: actions/checkout@v4
65-
- uses: cachix/install-nix-action@v31
66-
- name: Configure
67-
run: |
68-
mkdir -p ~/repo-cache ~/disk-cache
69-
echo build --host_platform=@io_tweag_rules_nixpkgs//nixpkgs/platforms:host > .bazelrc.local
70-
- name: Get Stack snapshot install directory
71-
id: stack-snapshot
72-
# NOTE: `stack path` must run at least once prior to caching to ensure the directory
73-
# exists and is populated.
74-
run: |
75-
stack --nix path --snapshot-install-root
76-
echo "dir=$(stack --nix path --snapshot-install-root)" > "${GITHUB_OUTPUT}"
77-
- uses: actions/cache@v4
78-
with:
79-
path: ${{ steps.stack-snapshot.outputs.dir }}
80-
key: ${{ runner.os }}-stack-${{ hashFiles('**/*.cabal') }}
81-
restore-keys: ${{ runner.os }}-stack-
82-
- name: Build
83-
run: |
84-
stack --nix build
85-
- name: Test
86-
if: ${{ runner.os == 'Linux' }}
87-
run: |
88-
stack --nix test
8941

9042
run-tests-with-darwin:
9143
name: with bazel in darwin
@@ -130,14 +82,6 @@ jobs:
13082
set -e -o pipefail
13183
nix-shell --pure --run 'bazel build //... $BAZEL_ARGS'
13284
133-
- name: Run tests
134-
shell: bash
135-
run: |
136-
set -e -o pipefail
137-
# Keep CI awake
138-
while true; do echo "."; sleep 60; done &
139-
nix-shell --pure --run 'bazel test //... $BAZEL_ARGS'
140-
14185
- uses: actions/cache/save@v4
14286
if: github.ref == 'refs/heads/master'
14387
with:

0 commit comments

Comments
 (0)