Skip to content

Commit

Permalink
Add WASM CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim committed Sep 7, 2024
1 parent e1b967b commit 609b5f6
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,38 @@ jobs:
name: Run build (arm64v8 linux)
with:
args: sh -c "cabal update && cabal test"

wasi:
runs-on: ubuntu-latest
needs: build
env:
GHC_WASM_META_REV: a04cc1a2206d2030326e1d49be9c6a94ee4283a3
strategy:
matrix:
ghc: ['9.10']
fail-fast: false
steps:
- name: setup-ghc-wasm32-wasi
run: |
cd $(mktemp -d)
curl -L https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/archive/$GHC_WASM_META_REV/ghc-wasm-meta.tar.gz | tar xz --strip-components=1
./setup.sh
~/.ghc-wasm/add_to_github_path.sh
env:
FLAVOUR: ${{ matrix.ghc }}
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.ghc-wasm/.cabal/store
key: wasi-${{ runner.os }}-${{ env.GHC_WASM_META_REV }}-flavour-${{ matrix.ghc }}-${{ github.sha }}
restore-keys: |
wasi-${{ runner.os }}-${{ env.GHC_WASM_META_REV }}-flavour-${{ matrix.ghc }}-
- name: Build
run: |
mv cabal.project.wasi cabal.project.local
wasm32-wasi-cabal build --enable-tests
wasm32-wasi-cabal list-bin test:bytestring-tests
- name: Test
run: |
wasmtime.sh $(wasm32-wasi-cabal list-bin test:bytestring-tests)
5 changes: 5 additions & 0 deletions cabal.project.wasi
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- https://github.com/haskellari/splitmix/pull/73
source-repository-package
type: git
location: https://github.com/amesgen/splitmix
tag: 5f5b766d97dc735ac228215d240a3bb90bc2ff75

0 comments on commit 609b5f6

Please sign in to comment.