Skip to content

Commit

Permalink
ci: run WPT tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jul 23, 2024
1 parent 2a4c3f5 commit b47126a
Show file tree
Hide file tree
Showing 51 changed files with 920 additions and 433 deletions.
39 changes: 37 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Install Rust 1.77.1
run: |
Expand All @@ -45,3 +43,40 @@ jobs:
- name: StarlingMonkey E2E & Integration Tests
run: |
CTEST_OUTPUT_ON_FAILURE=1 ctest --test-dir cmake-build-debug -j4
wpt:
name: Web Platform Tests
strategy:
matrix:
build: [release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Install Rust 1.77.1
run: |
rustup toolchain install 1.77.1
rustup target add wasm32-wasi --toolchain 1.77.1
- uses: actions/setup-node@v2
with:
node-version: 'lts/*'

- name: Build StarlingMonkey WPT
run: |
cmake -S . -B cmake-build-${{ matrix.build }} -DENABLE_WPT:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build == 'release' && 'Release' || 'Debug' }}
cmake --build cmake-build-${{ matrix.build }} --parallel 4 --target wpt-runtime
env:
WPT_ROOT: ../wpt

- name: Prepare WPT hosts
run: |
cd wpt
./wpt make-hosts-file | sudo tee -a /etc/hosts
- name: StarlingMonkey WPT Test
env:
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest -R wpt --test-dir cmake-build-${{ matrix.build }} --verbose
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "wpt"]
path = wpt
url = [email protected]:web-platform-tests/wpt
1 change: 1 addition & 0 deletions cmake/wasmtime.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
set(WASMTIME_VERSION v19.0.2)
set(WASMTIME_URL https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/wasmtime-${WASMTIME_VERSION}-${HOST_ARCH}-${HOST_OS}.tar.xz)
CPMAddPackage(NAME wasmtime URL ${WASMTIME_URL} DOWNLOAD_ONLY TRUE)
set(WASMTIME_DIR ${CPM_PACKAGE_wasmtime_SOURCE_DIR})
set(WASMTIME ${CPM_PACKAGE_wasmtime_SOURCE_DIR}/wasmtime)
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"Float16 arrays": {
"status": "PASS"
},
"Float arrays": {
"status": "PASS"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"SubtleCrypto interface: operation deriveKey(AlgorithmIdentifier, CryptoKey, AlgorithmIdentifier, boolean, sequence<KeyUsage>)": {
"status": "FAIL"
},
"SubtleCrypto interface: operation deriveBits(AlgorithmIdentifier, CryptoKey, unsigned long)": {
"SubtleCrypto interface: operation deriveBits(AlgorithmIdentifier, CryptoKey, optional unsigned long?)": {
"status": "FAIL"
},
"SubtleCrypto interface: operation importKey(KeyFormat, (BufferSource or JsonWebKey), AlgorithmIdentifier, boolean, sequence<KeyUsage>)": {
Expand Down Expand Up @@ -212,10 +212,10 @@
"SubtleCrypto interface: calling deriveKey(AlgorithmIdentifier, CryptoKey, AlgorithmIdentifier, boolean, sequence<KeyUsage>) on crypto.subtle with too few arguments must throw TypeError": {
"status": "FAIL"
},
"SubtleCrypto interface: crypto.subtle must inherit property \"deriveBits(AlgorithmIdentifier, CryptoKey, unsigned long)\" with the proper type": {
"SubtleCrypto interface: crypto.subtle must inherit property \"deriveBits(AlgorithmIdentifier, CryptoKey, optional unsigned long?)\" with the proper type": {
"status": "FAIL"
},
"SubtleCrypto interface: calling deriveBits(AlgorithmIdentifier, CryptoKey, unsigned long) on crypto.subtle with too few arguments must throw TypeError": {
"SubtleCrypto interface: calling deriveBits(AlgorithmIdentifier, CryptoKey, optional unsigned long?) on crypto.subtle with too few arguments must throw TypeError": {
"status": "FAIL"
},
"SubtleCrypto interface: crypto.subtle must inherit property \"importKey(KeyFormat, (BufferSource or JsonWebKey), AlgorithmIdentifier, boolean, sequence<KeyUsage>)\" with the proper type": {
Expand Down
Loading

0 comments on commit b47126a

Please sign in to comment.