Skip to content

Commit

Permalink
Merge pull request #42 from certik/wasm
Browse files Browse the repository at this point in the history
Test LLVM-WASM support
  • Loading branch information
certik authored Nov 15, 2024
2 parents c1d497e + b5b1111 commit 7d9eb7e
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,40 @@ jobs:
micromamba list
which lfortran
- name: Setup WASI SDK
if: ${{ startsWith(matrix.os, 'ubuntu') }}
shell: bash -e -l {0}
run: |
cd $HOME
curl -o wasi-sdk.tar.gz -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-21/wasi-sdk-21.0-linux.tar.gz
tar -xvf wasi-sdk.tar.gz
export WASI_SDK_PATH=$HOME/wasi-sdk-21.0
echo $WASI_SDK_PATH
$WASI_SDK_PATH/bin/clang --version
- name: Install wasmtime
if: ${{ startsWith(matrix.os, 'ubuntu') }}
shell: bash -e -l {0}
run: |
cd $HOME
curl -o wasmtime.tar.gz -L https://github.com/bytecodealliance/wasmtime/releases/download/v19.0.2/wasmtime-v19.0.2-x86_64-linux.tar.xz
tar -xvf wasmtime.tar.gz
export PATH=$HOME/wasmtime-v19.0.2-x86_64-linux:$PATH
wasmtime --version
- name: Setup EMSCRIPTEN SDK
if: ${{ startsWith(matrix.os, 'ubuntu') }}
shell: bash -e -l {0}
run: |
cd $HOME
curl -o emsdk.tar.gz -L https://github.com/emscripten-core/emsdk/archive/refs/tags/3.1.59.tar.gz
tar -xvf emsdk.tar.gz
export EMSDK_PATH=$HOME/emsdk-3.1.59
echo $EMSDK_PATH
cd $EMSDK_PATH
./emsdk install latest
./emsdk activate latest
- name: Clone LFortran Source Repository
shell: bash -e -x -l {0}
run: |
Expand All @@ -327,3 +361,18 @@ jobs:
run: |
cd lfortran
./run_tests.py --skip-run-with-dbg --no-llvm --skip-cpptranslate
- name: Run LFortran WASM Tests
if: ${{ startsWith(matrix.os, 'ubuntu') }}
shell: bash -e -x -l {0}
run: |
cd lfortran
export WASI_SDK_PATH=$HOME/wasi-sdk-21.0
export EMSDK_PATH=$HOME/emsdk-3.1.59
export PATH=$HOME/wasmtime-v19.0.2-x86_64-linux:$PATH
export WASMTIME_NEW_CLI=0
cd integration_tests
# llvm_wasm requires lfortran_runtime_wasm_wasi.o which is
# currently missing
./run_tests.py -b llvm_wasm_emcc

0 comments on commit 7d9eb7e

Please sign in to comment.