diff --git a/.github/workflows/other.yml b/.github/workflows/other.yml index a620aa0..7a84ee0 100644 --- a/.github/workflows/other.yml +++ b/.github/workflows/other.yml @@ -39,3 +39,35 @@ 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 + apt-get install -y zlib1g-dev + - 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: | + wasm32-wasi-cabal build all + + - name: Test + run: | + wasm32-wasi-cabal test all