@@ -28,64 +28,16 @@ jobs:
28
28
restore-keys : |
29
29
repo-cache-${{ runner.os }}-nixpkgs-${{ env.cache-version }}-
30
30
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
41
32
run : |
42
- nix-shell --pure --run "bazel test --test_output=all //... $BAZEL_ARGS"
33
+ nix-shell --pure --run "bazel build //... $BAZEL_ARGS"
43
34
- uses : actions/cache/save@v4
44
35
if : github.ref == 'refs/heads/master'
45
36
with :
46
37
path : |
47
38
~/repo-cache
48
39
~/disk-cache
49
40
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
89
41
90
42
run-tests-with-darwin :
91
43
name : with bazel in darwin
@@ -130,14 +82,6 @@ jobs:
130
82
set -e -o pipefail
131
83
nix-shell --pure --run 'bazel build //... $BAZEL_ARGS'
132
84
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
-
141
85
- uses : actions/cache/save@v4
142
86
if : github.ref == 'refs/heads/master'
143
87
with :
0 commit comments