fix: accumulate cmake_*_flags correctly and add SJLJ test #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | | |
| 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 |