Skip to content

Commit 3d4fdb3

Browse files
committed
ci: update workflow logic
1 parent fee6902 commit 3d4fdb3

File tree

2 files changed

+63
-31
lines changed

2 files changed

+63
-31
lines changed

.github/workflows/ci.yml

Lines changed: 63 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,97 @@
11
name: CI
2+
23
on:
34
push:
45
branches:
5-
- main
6+
- master
67
pull_request:
7-
types:
8-
- opened
9-
- synchronize
8+
merge_group:
9+
workflow_dispatch:
10+
1011
jobs:
1112
formatting:
12-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1314
steps:
1415
- uses: actions/checkout@v5
1516
- uses: haskell-actions/run-ormolu@v17
1617
- uses: tfausak/cabal-gild-setup-action@v2
1718
with:
1819
version: 1.6.0.2
20+
1921
ci-wasm:
20-
runs-on: ubuntu-latest
22+
runs-on: ubuntu-24.04
23+
continue-on-error: ${{ matrix.experimental }}
2124
strategy:
2225
fail-fast: false
2326
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
2536
steps:
2637
- 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+
2856
- uses: actions/cache@v4
2957
with:
58+
key: ci-wasm-${{ matrix.flavour }}-${{ hashFiles('dist-newstyle/cache/plan.json') }}
59+
restore-keys: ci-wasm-${{ matrix.flavour }}-
3060
path: |
3161
~/.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+
4466
ci-native:
45-
runs-on: ubuntu-latest
67+
runs-on: ubuntu-24.04
4668
strategy:
4769
fail-fast: false
4870
matrix:
49-
ghc: ['9.10', '9.12']
71+
flavour:
72+
- "9.12"
73+
- "9.10"
5074
steps:
5175
- uses: actions/checkout@v5
76+
77+
- run: |
78+
cabal update --ignore-project
79+
cabal install --ignore-project -O2 hscolour
80+
5281
- uses: haskell-actions/setup@v2
5382
id: setup-haskell
5483
with:
55-
ghc-version: ${{ matrix.ghc }}
84+
ghc-version: ${{ matrix.flavour }}
85+
86+
- run: |
87+
cabal build jsaddle-wasm --dry-run
88+
5689
- uses: actions/cache@v4
5790
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

cabal.project.ci

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)