|
20 | 20 | - name: install-nix |
21 | 21 | uses: DeterminateSystems/nix-installer-action@v16 |
22 | 22 |
|
| 23 | + - name: gen-plan-json |
| 24 | + id: gen-plan-json |
| 25 | + run: | |
| 26 | + nix develop --command bash -c 'cd frontend && wasm32-wasi-cabal update && wasm32-wasi-cabal build ghc-wasm-miso-examples --dry-run && echo WASM32_WASI_GHC=$(which wasm32-wasi-ghc) >> $GITHUB_OUTPUT' |
| 27 | +
|
| 28 | + - name: cabal-cache |
| 29 | + uses: actions/cache@v4 |
| 30 | + with: |
| 31 | + key: nix-${{ hashFiles('dist-newstyle/cache/plan.json') }} |
| 32 | + restore-keys: nix- |
| 33 | + path: | |
| 34 | + ~/.ghc-wasm/.cabal/store |
| 35 | + dist-newstyle |
| 36 | +
|
23 | 37 | - name: build-frontend |
24 | 38 | run: | |
25 | | - nix develop --command bash -c "cd frontend && wasm32-wasi-cabal update && exec ./build.sh --low-memory-unused --converge --gufa --flatten --rereloop -Oz" |
| 39 | + nix develop --command bash -c "cd frontend && exec ./build.sh --low-memory-unused --converge --gufa --flatten --rereloop -Oz" |
26 | 40 |
|
27 | 41 | ghcup-build: |
28 | 42 | name: ghcup-build |
@@ -56,14 +70,32 @@ jobs: |
56 | 70 | ghcup config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/develop/ghcup-cross-0.0.8.yaml |
57 | 71 | ghcup install ghc --set wasm32-wasi-9.10.1.20241021 -- $CONFIGURE_ARGS |
58 | 72 |
|
59 | | - - name: build-frontend |
| 73 | + - name: gen-plan-json |
60 | 74 | run: | |
61 | 75 | cd frontend |
62 | 76 | cabal \ |
63 | 77 | --with-compiler=wasm32-wasi-ghc \ |
64 | 78 | --with-hc-pkg=wasm32-wasi-ghc-pkg \ |
65 | 79 | --with-hsc2hs=wasm32-wasi-hsc2hs \ |
66 | 80 | update |
| 81 | + cabal \ |
| 82 | + --with-compiler=wasm32-wasi-ghc \ |
| 83 | + --with-hc-pkg=wasm32-wasi-ghc-pkg \ |
| 84 | + --with-hsc2hs=wasm32-wasi-hsc2hs \ |
| 85 | + build ghc-wasm-miso-examples --dry-run |
| 86 | +
|
| 87 | + - name: cabal-cache |
| 88 | + uses: actions/cache@v4 |
| 89 | + with: |
| 90 | + key: ghcup-${{ hashFiles('dist-newstyle/cache/plan.json') }} |
| 91 | + restore-keys: ghcup- |
| 92 | + path: | |
| 93 | + ~/.local/state/cabal/store |
| 94 | + dist-newstyle |
| 95 | +
|
| 96 | + - name: build-frontend |
| 97 | + run: | |
| 98 | + cd frontend |
67 | 99 | ./build.sh --low-memory-unused --converge --gufa --flatten --rereloop -Oz |
68 | 100 |
|
69 | 101 | non-nix-build: |
@@ -93,6 +125,20 @@ jobs: |
93 | 125 | env: |
94 | 126 | FLAVOUR: '9.10' |
95 | 127 |
|
| 128 | + - name: gen-plan-json |
| 129 | + run: | |
| 130 | + cd frontend |
| 131 | + wasm32-wasi-cabal build ghc-wasm-miso-examples --dry-run |
| 132 | +
|
| 133 | + - name: cabal-cache |
| 134 | + uses: actions/cache@v4 |
| 135 | + with: |
| 136 | + key: vanilla-${{ hashFiles('dist-newstyle/cache/plan.json') }} |
| 137 | + restore-keys: vanilla- |
| 138 | + path: | |
| 139 | + ~/.ghc-wasm/.cabal/store |
| 140 | + dist-newstyle |
| 141 | +
|
96 | 142 | - name: build-frontend |
97 | 143 | run: | |
98 | 144 | cd frontend |
|
0 commit comments