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 Feb 5, 2024
1 parent 3b372fd commit dd91633
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,37 @@ jobs:
name: Run build (arm64v8 linux)
with:
args: sh -c "cabal update && cabal test"

wasi:
runs-on: ubuntu-latest
env:
GHC_WASM_META_REV: c0aa3bb7d88bb6ec809210e17658dd1ed64ba66c
strategy:
matrix:
ghc: ['9.6', '9.8']
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)
9 changes: 9 additions & 0 deletions cabal.project.wasi
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- https://github.com/haskellari/splitmix/pull/73
source-repository-package
type: git
location: https://github.com/amesgen/splitmix
tag: 83b906c4bcdc2720546f1779a16eb65e8e12ecba

package splitmix
tests: False
benchmarks: False

0 comments on commit dd91633

Please sign in to comment.