Fix #164 (3/N) - Add tts::json_sink, wire up --sink=json #108
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
| ##====================================================================================================================== | |
| ## TTS - Tiny Test System | |
| ## Copyright : TTS Contributors & Maintainers | |
| ## SPDX-License-Identifier: BSL-1.0 | |
| ##====================================================================================================================== | |
| name: Unit Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: tts-unit-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ################################################################################################## | |
| ## Fast gate: pre-commit checks, standalone generation and sanitizers all start together with no | |
| ## interdependency - only once all three pass does the (much heavier) compiler matrix start below. | |
| ################################################################################################## | |
| precommit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Install pre-commit | |
| run: pip install pre-commit | |
| - name: Run pre-commit checks | |
| run: pre-commit run --all-files --show-diff-on-failure --color=always | |
| ##====================================================================================================================== | |
| ## Ensure Standalone is viable | |
| ##====================================================================================================================== | |
| standalone-generation: | |
| name: Standalone Generation | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/jfalcou/compilers:v10 | |
| steps: | |
| - name: Fetch current branch | |
| uses: actions/checkout@v6 | |
| - name: Generate standalone header | |
| run: | | |
| cmake -S . -B build -G Ninja -DTTS_BUILD_TEST=OFF -DTTS_BUILD_DOCUMENTATION=OFF | |
| cmake --build build --target tts-standalone | |
| - name: Test standalone header | |
| run: | | |
| cd build | |
| g++ -std=c++20 -S -I. ../test/integration/main.cpp -DTTS_STANDALONE | |
| ################################################################################################## | |
| ## Sanitizers (ASan+UBSan) | |
| ################################################################################################## | |
| sanitizer-tests: | |
| name: Sanitizers | |
| uses: ./.github/workflows/sanitizers.yml | |
| ################################################################################################## | |
| ## Unit Tests - the full compiler matrix, gated behind the fast checks above all passing | |
| ################################################################################################## | |
| linux-tests: | |
| name: Linux | |
| needs: [precommit, standalone-generation, sanitizer-tests] | |
| uses: ./.github/workflows/linux.yml | |
| macos-tests: | |
| name: MacOS | |
| needs: [precommit, standalone-generation, sanitizer-tests] | |
| uses: ./.github/workflows/macos.yml | |
| windows-tests: | |
| name: Windows | |
| needs: [precommit, standalone-generation, sanitizer-tests] | |
| uses: ./.github/workflows/windows.yml | |
| nvidia-tests: | |
| name: Nvidia | |
| needs: [precommit, standalone-generation, sanitizer-tests] | |
| uses: ./.github/workflows/nvidia.yml |