Merge pull request #20 from Open-Splice/Test for embedded functionallity #104
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: Splice CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-test: | |
| name: Build & Test (${{ matrix.os }} - ${{ matrix.arch }}) | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # macOS | |
| - os: macos | |
| arch: x64 | |
| runner: macos-15-intel | |
| - os: macos | |
| arch: arm64 | |
| runner: macos-14 | |
| # Linux | |
| - os: linux | |
| arch: x64 | |
| runner: ubuntu-22.04 | |
| - os: linux | |
| arch: arm64 | |
| runner: ubuntu-22.04 | |
| # Windows (CI only, no runtime) | |
| - os: windows | |
| arch: x64 | |
| runner: windows-2022 | |
| - os: windows | |
| arch: arm64 | |
| runner: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # ======================== | |
| # UNIX: build + run | |
| # ======================== | |
| - name: Build Splice (Unix) | |
| if: matrix.os != 'windows' | |
| shell: bash | |
| run: | | |
| set -e | |
| chmod +x build.sh | |
| CI=true ./build.sh | |
| - name: Run Splice (Unix) | |
| if: matrix.os != 'windows' | |
| shell: bash | |
| run: | | |
| ./bin/spbuild test/main.spl main.spc | |
| ./bin/Splice main.spc | |
| # ======================== | |
| # WINDOWS: intentionally skipped | |
| # ======================== | |
| - name: Skip Splice runtime (Windows) | |
| if: matrix.os == 'windows' | |
| shell: pwsh | |
| run: | | |
| Write-Host "No prebuilt Windows binaries. Runtime tests skipped." | |
| # ======================== | |
| # Finish | |
| # ======================== | |
| - name: Mark as finished | |
| shell: bash | |
| run: echo "Build completed on ${{ matrix.os }}-${{ matrix.arch }}" > finish.txt | |
| - name: Upload finish artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: splice-finish-${{ matrix.os }}-${{ matrix.arch }} | |
| path: finish.txt |