|
1 | 1 | name: CI |
| 2 | + |
2 | 3 | on: |
3 | 4 | push: |
4 | 5 | branches: |
5 | | - - main |
| 6 | + - master |
6 | 7 | pull_request: |
7 | | - types: |
8 | | - - opened |
9 | | - - synchronize |
| 8 | + merge_group: |
| 9 | + workflow_dispatch: |
| 10 | + |
10 | 11 | jobs: |
11 | 12 | formatting: |
12 | | - runs-on: ubuntu-latest |
| 13 | + runs-on: ubuntu-24.04 |
13 | 14 | steps: |
14 | 15 | - uses: actions/checkout@v5 |
15 | 16 | - uses: haskell-actions/run-ormolu@v17 |
16 | 17 | - uses: tfausak/cabal-gild-setup-action@v2 |
17 | 18 | with: |
18 | 19 | version: 1.6.0.2 |
| 20 | + |
19 | 21 | ci-wasm: |
20 | | - runs-on: ubuntu-latest |
| 22 | + runs-on: ubuntu-24.04 |
| 23 | + continue-on-error: ${{ matrix.experimental }} |
21 | 24 | strategy: |
22 | 25 | fail-fast: false |
23 | 26 | matrix: |
24 | | - ghc: ['9_10', '9_12'] |
| 27 | + flavour: |
| 28 | + - "9.14" |
| 29 | + - "9.12" |
| 30 | + - "9.10" |
| 31 | + experimental: |
| 32 | + - false |
| 33 | + include: |
| 34 | + - flavour: "gmp" |
| 35 | + experimental: true |
25 | 36 | steps: |
26 | 37 | - uses: actions/checkout@v5 |
27 | | - - uses: cachix/install-nix-action@v31 |
| 38 | + |
| 39 | + - run: | |
| 40 | + cabal update --ignore-project |
| 41 | + cabal install --ignore-project -O2 hscolour |
| 42 | +
|
| 43 | + - run: | |
| 44 | + pushd "$(mktemp -d)" |
| 45 | + curl -L https://gitlab.haskell.org/haskell-wasm/ghc-wasm-meta/-/archive/master/ghc-wasm-meta-master.tar.gz | tar xz --strip-components=1 |
| 46 | + ./setup.sh |
| 47 | + ~/.ghc-wasm/add_to_github_path.sh |
| 48 | + cp cabal.project.local ${{ github.workspace }} |
| 49 | + popd |
| 50 | + env: |
| 51 | + FLAVOUR: ${{ matrix.flavour }} |
| 52 | +
|
| 53 | + - run: | |
| 54 | + wasm32-wasi-cabal build jsaddle-wasm --dry-run |
| 55 | +
|
28 | 56 | - uses: actions/cache@v4 |
29 | 57 | with: |
| 58 | + key: ci-wasm-${{ matrix.flavour }}-${{ hashFiles('dist-newstyle/cache/plan.json') }} |
| 59 | + restore-keys: ci-wasm-${{ matrix.flavour }}- |
30 | 60 | path: | |
31 | 61 | ~/.ghc-wasm/.cabal/store |
32 | | - key: wasm-${{ github.run_id }} |
33 | | - restore-keys: | |
34 | | - wasm-${{ matrix.ghc }}-${{ github.run_id }} |
35 | | - wasm-${{ matrix.ghc }}- |
36 | | - - uses: nicknovitski/nix-develop@v1 |
37 | | - with: |
38 | | - arguments: '.#"${{ matrix.ghc }}"' |
39 | | - - name: Build |
40 | | - run: | |
41 | | - mv cabal.project.ci cabal.project.local |
42 | | - wasm32-wasi-cabal update |
43 | | - wasm32-wasi-cabal build |
| 62 | +
|
| 63 | + - run: | |
| 64 | + wasm32-wasi-cabal build jsaddle-wasm |
| 65 | +
|
44 | 66 | ci-native: |
45 | | - runs-on: ubuntu-latest |
| 67 | + runs-on: ubuntu-24.04 |
46 | 68 | strategy: |
47 | 69 | fail-fast: false |
48 | 70 | matrix: |
49 | | - ghc: ['9.10', '9.12'] |
| 71 | + flavour: |
| 72 | + - "9.12" |
| 73 | + - "9.10" |
50 | 74 | steps: |
51 | 75 | - uses: actions/checkout@v5 |
| 76 | + |
| 77 | + - run: | |
| 78 | + cabal update --ignore-project |
| 79 | + cabal install --ignore-project -O2 hscolour |
| 80 | +
|
52 | 81 | - uses: haskell-actions/setup@v2 |
53 | 82 | id: setup-haskell |
54 | 83 | with: |
55 | | - ghc-version: ${{ matrix.ghc }} |
| 84 | + ghc-version: ${{ matrix.flavour }} |
| 85 | + |
| 86 | + - run: | |
| 87 | + cabal build jsaddle-wasm --dry-run |
| 88 | +
|
56 | 89 | - uses: actions/cache@v4 |
57 | 90 | with: |
58 | | - path: ${{ steps.setup-haskell.outputs.cabal-store }} |
59 | | - key: ci-native-${{ github.run_id }} |
60 | | - restore-keys: | |
61 | | - ci-native-${{ matrix.ghc }}-${{ github.run_id }} |
62 | | - ci-native-${{ matrix.ghc }}- |
63 | | - - run: cabal build |
| 91 | + key: ci-native-${{ matrix.flavour }}-${{ hashFiles('dist-newstyle/cache/plan.json') }} |
| 92 | + restore-keys: ci-native-${{ matrix.flavour }}- |
| 93 | + path: | |
| 94 | + ${{ steps.setup-haskell.outputs.cabal-store }} |
| 95 | +
|
| 96 | + - run: | |
| 97 | + cabal build jsaddle-wasm |
0 commit comments