Skip to content

Update tests.yml

Update tests.yml #841

Workflow file for this run

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: Tests
run: |
cd tests/unit_tests
./test.sh asan
build-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- uses: microsoft/[email protected]
- 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
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: Tests
if: matrix.platform == 'macOS'
run: |
echo Testing for ${{matrix.platform}}
cd tests/unit_tests
./test.sh coverage
- 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"