Skip to content

feat: add experimental exceptions support (#12) #12

feat: add experimental exceptions support (#12)

feat: add experimental exceptions support (#12) #12

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
discover-tests:
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.find-tests.outputs.tests }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Find test directories
id: find-tests
run: |
tests=$(find ./tests -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "tests=$tests" >> $GITHUB_OUTPUT
test:
needs: discover-tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: ${{ fromJson(needs.discover-tests.outputs.tests) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.25.x'
- name: Run test (${{ matrix.test }})
working-directory: ./tests/${{ matrix.test }}
run: |
WASI_SDK_TOOLCHAIN_FILE="${{ github.workspace }}/wasi-sdk.toolchain.cmake" \
cmake -B ./build -DCMAKE_TOOLCHAIN_FILE=./toolchain.cmake
status-report:
needs: test
runs-on: ubuntu-latest
steps:
- name: Report status
run: |
if [[ "${{ needs.test.result }}" == "success" ]]; then
echo "All tests passed!"
else
echo "Some tests failed. Please check the logs for details."
exit 1
fi