summaryrefslogtreecommitdiffstats
path: root/.github/workflows/main.yml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.github/workflows/main.yml45
1 files changed, 34 insertions, 11 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index eb9b59f..e906e5e 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -82,9 +82,28 @@ jobs:
echo "NM=$CLANG_DIR/llvm-nm" >> $GITHUB_ENV
if: matrix.os == 'ubuntu-latest'
+ - name: Disable libsetjmp for old LLVM
+ shell: bash
+ run: |
+ echo "BUILD_LIBSETJMP=no" >> $GITHUB_ENV
+ if: matrix.clang_version == '10.0.0'
+
- name: Build libc
shell: bash
- run: make -j4
+ run: |
+ make -j4 TARGET_TRIPLE=wasm32-wasi
+ make -j4 TARGET_TRIPLE=wasm32-wasip1
+ make -j4 TARGET_TRIPLE=wasm32-wasip2 WASI_SNAPSHOT=p2
+
+ - name: Build libc + threads
+ # Only build the thread-capable wasi-libc in the latest supported Clang
+ # version; the earliest version does not have all necessary builtins
+ # (e.g., `__builtin_wasm_memory_atomic_notify`).
+ if: matrix.clang_version != '10.0.0'
+ shell: bash
+ run: |
+ make -j4 THREAD_MODEL=posix TARGET_TRIPLE=wasm32-wasi-threads
+ make -j4 THREAD_MODEL=posix TARGET_TRIPLE=wasm32-wasip1-threads
- name: Test
shell: bash
@@ -95,9 +114,21 @@ jobs:
cd test
make download
export WASI_DIR=$(realpath $($CLANG_DIR/clang -print-resource-dir)/lib/wasi/)
- mkdir -p $WASI_DIR
+ export WASIP1_DIR=$(realpath $($CLANG_DIR/clang -print-resource-dir)/lib/wasip1/)
+ export WASIP2_DIR=$(realpath $($CLANG_DIR/clang -print-resource-dir)/lib/wasip2/)
+ mkdir -p $WASI_DIR $WASIP1_DIR $WASIP2_DIR
cp download/lib/wasi/libclang_rt.builtins-wasm32.a $WASI_DIR
- make test
+ cp download/lib/wasi/libclang_rt.builtins-wasm32.a $WASIP1_DIR
+ cp download/lib/wasi/libclang_rt.builtins-wasm32.a $WASIP2_DIR
+ TARGET_TRIPLE=wasm32-wasi make test
+ rm -r build
+ TARGET_TRIPLE=wasm32-wasip1 make test
+ rm -r build
+ TARGET_TRIPLE=wasm32-wasip2 make test
+ rm -r build
+ TARGET_TRIPLE=wasm32-wasi-threads make test
+ rm -r build
+ TARGET_TRIPLE=wasm32-wasip1-threads make test
# The older version of Clang does not provide the expected symbol for the
# test entrypoints: `undefined symbol: __main_argc_argv`.
# The older (<15.0.7) version of wasm-ld does not provide `__heap_end`,
@@ -110,14 +141,6 @@ jobs:
name: ${{ format( 'sysroot-{0}.tgz', matrix.os) }}
path: sysroot
- - name: Build libc + threads
- # Only build the thread-capable wasi-libc in the latest supported Clang
- # version; the earliest version does not have all necessary builtins
- # (e.g., `__builtin_wasm_memory_atomic_notify`).
- if: matrix.clang_version != '10.0.0'
- shell: bash
- run: make -j4 THREAD_MODEL=posix
-
# Disable the headerstest job for now, while WASI transitions from the
# witx snapshots to wit proposals, and we have a few manual edits to the
# generated header to make life easier for folks.