| name: Tests |
| |
| on: |
| push: |
| |
| jobs: |
| build-linux: |
| runs-on: ubuntu-latest |
| |
| strategy: |
| matrix: |
| platform: [linux] |
| |
| steps: |
| - uses: actions/checkout@v2 |
| - name: Install |
| 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 chmod a+x premake5 |
| sudo mv premake5 /usr/local/bin |
| |
| - name: Install dependencies |
| if: runner.os == 'Linux' |
| run: | |
| sudo apt-get update |
| sudo apt-get install -y build-essential uuid-dev clang llvm lld |
| |
| - name: Build |
| run: | |
| build/build_rive.sh --file=premake5_v2.lua --with_rive_audio=system --with_rive_text --with_rive_layout debug |
| build/build_rive.sh --file=premake5_v2.lua --with_rive_audio=system --with_rive_text --with_rive_layout release |
| |
| - name: Add build scripts to PATH |
| run: echo "${{ github.workspace }}/build" >> $GITHUB_PATH |
| |
| - name: Tests |
| run: | |
| cd tests/unit_tests |
| ./test.sh asan |
| |
| build-windows: |
| runs-on: windows-2022 |
| steps: |
| - uses: actions/checkout@v2 |
| - uses: microsoft/setup-msbuild@v1.1 |
| - name: Build Rive |
| shell: pwsh |
| run: | |
| ./build/build_rive.ps1 --file=premake5_v2.lua debug |
| ./build/build_rive.ps1 --file=premake5_v2.lua release |
| |
| - name: Tests |
| run: | |
| cd tests/unit_tests |
| ./test.bat --factory=null |
| |
| build-macos: |
| runs-on: macOS-latest |
| |
| strategy: |
| matrix: |
| platform: [macOS] |
| |
| steps: |
| - uses: actions/checkout@v3 |
| |
| - name: Install |
| run: | |
| wget -q https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-macosx.tar.gz |
| tar -xf premake-5.0.0-beta2-macosx.tar.gz |
| sudo chmod a+x premake5 |
| sudo mv premake5 /usr/local/bin |
| |
| - name: Build |
| run: | |
| build/build_rive.sh --file=premake5_v2.lua --with_rive_audio=system --with_rive_text --with_rive_layout debug |
| build/build_rive.sh --file=premake5_v2.lua --with_rive_audio=system --with_rive_text --with_rive_layout release |
| |
| - name: Build glfw |
| working-directory: skia/dependencies/ |
| run: ./make_glfw.sh |
| |
| - name: Add build scripts to PATH |
| run: echo "${{ github.workspace }}/build" >> $GITHUB_PATH |
| |
| - name: Memory Leaks & Address Sanitization |
| # Need to clean here because we already did a unit_tests build above without asan |
| run: | |
| cd tests/unit_tests |
| ./test.sh |
| |
| - name: Tess Tests |
| if: matrix.platform == 'macOS' |
| run: | |
| set -euo pipefail |
| cd tess |
| |
| # Build Debug (lands under ./out/debug/… with original script) |
| ../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>}" |
| if [ -z "${DBG_BIN:-}" ]; then |
| echo "Could not locate Debug tess binary. Listing ./out for clues:"; find ./out -maxdepth 3 -print; exit 1 |
| fi |
| "$DBG_BIN" |
| |
| # Build Release (lands under ./out/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>}" |
| if [ -z "${REL_BIN:-}" ]; then |
| echo "Could not locate Release tess binary. Listing ./out for clues:"; find ./out -maxdepth 3 -print; exit 1 |
| fi |
| "$REL_BIN" |