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 Oct 24, 2023
1 parent a1d7af6 commit ac6aede
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,45 @@ jobs:
run: |
cd zlib-*/
cabal haddock
build-wasi:
runs-on: ubuntu-latest
env:
GHC_WASM_META_REV: 895f7067e1d4c918a45559da9d2d6a403a690703
FLAVOUR: '9.6'
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-master.tar.gz | tar xz --strip-components=1
./setup.sh
~/.ghc-wasm/add_to_github_path.sh
- uses: actions/checkout@v3

- uses: actions/cache@v3
with:
path: |
~/.ghc-wasm/.cabal/store
dist-newstyle
key: build-wasi-${{ runner.os }}-wasm-meta-${{ env.GHC_WASM_META_REV }}-flavour-${{ env.FLAVOUR }}-${{ github.sha }}
restore-keys: |
build-wasi-${{ runner.os }}-wasm-meta-${{ env.GHC_WASM_META_REV }}-flavour-${{ env.FLAVOUR }}-
- name: Build
run: |
rm -f cabal.project
cat > cabal.project <<EOF
packages: .
if os(wasi)
-- https://github.com/haskellari/splitmix/pull/73
source-repository-package
type: git
location: https://github.com/amesgen/splitmix
tag: ebd790e992a83fe1b16b6182677106295d9afba2
EOF
wasm32-wasi-cabal build all -f+bundled-c-zlib
- name: Test
run: |
wasm32-wasi-cabal test all -f+bundled-c-zlib

0 comments on commit ac6aede

Please sign in to comment.