2023-11-14 12:16:51 -08:00
|
|
|
name: Build
|
2023-11-14 11:03:43 -08:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 60
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
platform:
|
|
|
|
- c
|
|
|
|
- js
|
|
|
|
- wasm
|
|
|
|
- wasi
|
2024-09-26 09:26:32 -07:00
|
|
|
- wasm-gc
|
2023-11-14 11:03:43 -08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
distribution: adopt
|
2024-10-11 09:09:27 -07:00
|
|
|
- uses: actions/setup-node@v4
|
2023-11-14 11:03:43 -08:00
|
|
|
- uses: gradle/gradle-build-action@v2
|
|
|
|
- if: ${{ matrix.platform == 'wasi' }}
|
|
|
|
uses: bytecodealliance/actions/wasmtime/setup@v1
|
|
|
|
- if: ${{ matrix.platform == 'wasi' }}
|
|
|
|
run: |
|
|
|
|
mkdir -p "$HOME/.wasmtime/bin/"
|
|
|
|
echo 'wasmtime "$@"'> "$HOME/.wasmtime/bin/wasmtime"
|
|
|
|
chmod +x "$HOME/.wasmtime/bin/wasmtime"
|
|
|
|
- run: |
|
2024-09-26 09:26:32 -07:00
|
|
|
platforms=("c" "js" "wasm" "wasi" "wasm-gc")
|
2023-11-14 11:03:43 -08:00
|
|
|
args=()
|
|
|
|
for v in "${platforms[@]}"
|
|
|
|
do
|
|
|
|
if [[ "${{ matrix.platform }}" != "$v" ]]; then
|
|
|
|
args+=("-Pteavm.tests.${v}=false")
|
|
|
|
fi
|
|
|
|
done
|
2024-10-11 09:09:27 -07:00
|
|
|
args+=("-Pteavm.localNodeJS=true")
|
2023-11-14 11:03:43 -08:00
|
|
|
echo "${args[@]}"
|
2023-11-14 11:52:04 -08:00
|
|
|
./gradlew "${args[@]}" test
|
2023-11-14 11:03:43 -08:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: "test-reports-${{ matrix.platform }}"
|
|
|
|
path: "tests/build/reports/tests/test"
|
2023-11-14 11:52:04 -08:00
|
|
|
checkstyle:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
distribution: adopt
|
|
|
|
- uses: gradle/gradle-build-action@v2
|
|
|
|
- run: |
|
2024-10-11 09:09:27 -07:00
|
|
|
./gradlew check -x test
|