Update tests.yml #848
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: | |
| jobs: | |
| # -------------------- Linux -------------------- | |
| unit_linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Premake | |
| run: | | |
| wget -q https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz | |
| tar -xf premake-5.0.0-beta2-linux.tar.gz | |
| sudo install -m 0755 premake5 /usr/local/bin/premake5 | |
| - name: Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential uuid-dev clang llvm lld | |
| - name: Add build scripts to PATH | |
| run: echo "${{ github.workspace }}/build" >> $GITHUB_PATH | |
| - name: Build | |
| shell: bash | |
| run: | | |
| build_rive.sh --file=premake5_v2.lua --with_rive_audio=system --with_rive_scripting debug | |
| build_rive.sh --file=premake5_v2.lua --with_rive_audio=system --with_rive_scripting release | |
| - name: Unit tests (no ASan) | |
| run: | | |
| cd tests/unit_tests | |
| ./test.sh | |
| # -------------------- Windows (clang-cl toolset) -------------------- | |
| unit_windows: | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: microsoft/[email protected] | |
| - name: Add build scripts to PATH | |
| shell: bash | |
| run: echo "${{ github.workspace }}/build" >> $GITHUB_PATH | |
| - name: Unit tests (no GPU) | |
| shell: cmd | |
| working-directory: tests/unit_tests | |
| run: .\test.bat --factory=null | |
| # -------------------- Windows (MSVC toolset) -------------------- | |
| unit_windows_msvc: | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: microsoft/[email protected] | |
| - name: Add build scripts to PATH | |
| shell: bash | |
| run: echo "${{ github.workspace }}/build" >> $GITHUB_PATH | |
| - name: Unit tests (MSVC, no GPU) | |
| shell: cmd | |
| working-directory: tests/unit_tests | |
| run: .\test.bat --toolset=msc --factory=null | |
| # -------------------- macOS -------------------- | |
| unit_macos: | |
| runs-on: macOS-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Premake | |
| run: | | |
| curl -L -o premake_macosx.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-macosx.tar.gz | |
| tar -xf premake_macosx.tar.gz | |
| sudo install -m 0755 premake5 /usr/local/bin/premake5 | |
| - name: Add build scripts to PATH | |
| run: echo "${{ github.workspace }}/build" >> $GITHUB_PATH | |
| - name: Unit tests (no ASan) | |
| run: | | |
| cd tests/unit_tests | |
| ./test.sh | |
| # Tess (kept as separate; builds and runs both variants) | |
| - name: Tess tests | |
| run: | | |
| set -euo pipefail | |
| cd tess | |
| # Debug/default | |
| ../build/build_rive.sh --file=premake5_tess.lua | |
| DBG_BIN=$(find ./out -type f -name 'rive_tess_tests*' -perm -111 -print -quit) | |
| echo "Debug tess binary: ${DBG_BIN:-<not found>}" | |
| test -n "${DBG_BIN:-}" && "$DBG_BIN" | |
| # Release | |
| ../build/build_rive.sh --file=premake5_tess.lua release | |
| REL_BIN=$(find ./out -type f -name 'rive_tess_tests*' -perm -111 -print -quit) | |
| echo "Release tess binary: ${REL_BIN:-<not found>}" | |
| test -n "${REL_BIN:-}" && "$REL_BIN" |