From a6b5977b37dd9061bbf1b323dc9e0ea3eea87bc3 Mon Sep 17 00:00:00 2001 From: amesgen Date: Sun, 30 Apr 2023 22:35:41 +0200 Subject: [PATCH] Add WASI to CI --- .github/workflows/other.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/other.yml diff --git a/.github/workflows/other.yml b/.github/workflows/other.yml new file mode 100644 index 0000000..f376759 --- /dev/null +++ b/.github/workflows/other.yml @@ -0,0 +1,30 @@ +on: + push: + pull_request: +jobs: + wasi: + runs-on: ubuntu-latest + env: + GHC_WASM_META_REV: 5a5c10c3b7e2f9f55bb2f40601cb20c9eb599bb5 + FLAVOUR: '9.6' + steps: + - name: Setup WASI GHC + run: | + cd $(mktemp -d) + curl -L --retry 5 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: | + wasm32-wasi-cabal build