Skip to content

Commit

Permalink
Add GHC 9.12 to CI (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen authored Dec 30, 2024
1 parent 6f7270d commit 6253678
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 22 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
version: 1.5.0.1
ci-wasm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc: ['9_10', '9_12']
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
Expand All @@ -27,26 +31,33 @@ jobs:
~/.ghc-wasm/.cabal/store
key: wasm-${{ github.run_id }}
restore-keys: |
wasm-${{ github.run_id }}
wasm-
wasm-${{ matrix.ghc }}-${{ github.run_id }}
wasm-${{ matrix.ghc }}-
- uses: nicknovitski/nix-develop@v1
with:
arguments: '.#"${{ matrix.ghc }}"'
- name: Build
run: |
mv cabal.project.ci cabal.project.local
nix develop --command bash -c \
'wasm32-wasi-cabal update && wasm32-wasi-cabal build'
wasm32-wasi-cabal update
wasm32-wasi-cabal build
ci-native:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc: ['9.10', '9.12']
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: '9.10'
ghc-version: ${{ matrix.ghc }}
- uses: actions/cache@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ci-native-${{ github.run_id }}
restore-keys: |
ci-native-${{ github.run_id }}
ci-native-
ci-native-${{ matrix.ghc }}-${{ github.run_id }}
ci-native-${{ matrix.ghc }}-
- run: cabal build
7 changes: 4 additions & 3 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ packages: .
tests: True

if arch(wasm32)
allow-newer: time-compat:time

-- https://github.com/haskellari/splitmix/pull/73
source-repository-package
type: git
location: https://github.com/amesgen/splitmix
tag: 5f5b766d97dc735ac228215d240a3bb90bc2ff75
tag: cea9e31bdd849eb0c17611bb99e33d590e126164

if impl(ghc >=9.12)
allow-newer: base, ghc-prim, template-haskell
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
ghc-wasm-meta.url = "gitlab:haskell-wasm/ghc-wasm-meta?host=gitlab.haskell.org";
};
outputs = inputs: inputs.flake-utils.lib.eachDefaultSystem (system:
let pkgs = inputs.nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
let
pkgs = inputs.nixpkgs.legacyPackages.${system};
inherit (pkgs) lib;
devShells = lib.genAttrs [ "9_10" "9_12" ] (ghc: pkgs.mkShell {
packages = [
inputs.ghc-wasm-meta.packages.${system}.all_9_10
inputs.ghc-wasm-meta.packages.${system}."all_${ghc}"
];
};
});
in
{
devShells = devShells // { default = devShells."9_10"; };
});
}
2 changes: 1 addition & 1 deletion jsaddle-wasm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ library
build-depends:
aeson >=2 && <2.3,
bytestring >=0.11 && <0.13,
ghc-experimental ^>=0.1,
ghc-experimental ^>=0.1 || >=9.1200 && <9.1300,
stm ^>=2.5,

hs-source-dirs: src-wasm
Expand Down

0 comments on commit 6253678

Please sign in to comment.