|
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-native |
| 29 | + uses: andreabedini/cabal-cache-native |
| 30 | + with: |
| 31 | + store-path: /home/runner/.ghc-wasm/.cabal/store |
| 32 | + cache-key-prefix: nix |
| 33 | + ghc: ${{ steps.gen-plan-json.outputs.WASM32_WASI_GHC }} |
| 34 | + |
23 | 35 | - name: build-frontend |
24 | 36 | run: | |
25 | | - nix develop --command bash -c "cd frontend && wasm32-wasi-cabal update && exec ./build.sh --low-memory-unused --converge --gufa --flatten --rereloop -Oz" |
| 37 | + nix develop --command bash -c "cd frontend && exec ./build.sh --low-memory-unused --converge --gufa --flatten --rereloop -Oz" |
26 | 38 |
|
27 | 39 | ghcup-build: |
28 | 40 | name: ghcup-build |
|
52 | 64 |
|
53 | 65 | - uses: dw-labs-org/dart-sass-gha@v1 |
54 | 66 |
|
| 67 | + - name: gen-plan-json |
| 68 | + run: | |
| 69 | + cabal \ |
| 70 | + --with-compiler=wasm32-wasi-ghc \ |
| 71 | + --with-hc-pkg=wasm32-wasi-ghc-pkg \ |
| 72 | + --with-hsc2hs=wasm32-wasi-hsc2hs \ |
| 73 | + build ghc-wasm-miso-examples --dry-run |
| 74 | +
|
| 75 | + - name: cabal-cache-native |
| 76 | + uses: andreabedini/cabal-cache-native |
| 77 | + with: |
| 78 | + store-path: /home/runner/.local/state/cabal/store |
| 79 | + cache-key-prefix: ghcup |
| 80 | + ghc: wasm32-wasi-ghc |
| 81 | + |
55 | 82 | - name: build-frontend |
56 | 83 | run: | |
57 | 84 | cd frontend |
@@ -85,6 +112,17 @@ jobs: |
85 | 112 |
|
86 | 113 | - uses: dw-labs-org/dart-sass-gha@v1 |
87 | 114 |
|
| 115 | + - name: gen-plan-json |
| 116 | + run: | |
| 117 | + wasm32-wasi-cabal build ghc-wasm-miso-examples --dry-run |
| 118 | +
|
| 119 | + - name: cabal-cache-native |
| 120 | + uses: andreabedini/cabal-cache-native |
| 121 | + with: |
| 122 | + store-path: /home/runner/.ghc-wasm/.cabal/store |
| 123 | + cache-key-prefix: vanilla |
| 124 | + ghc: wasm32-wasi-ghc |
| 125 | + |
88 | 126 | - name: build-frontend |
89 | 127 | run: | |
90 | 128 | cd frontend |
|
0 commit comments