Skip to content

Update tests.yml

Update tests.yml #839

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
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.sh
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
- name: Tess Tests
if: matrix.platform == 'macOS'
run: |
set -euo pipefail
cd tess
# ---- Debug/default ----
../build/build_rive.sh --file=premake5_tess.lua
MK=./out/debug/rive_tess_tests.make
TARGETDIR=$(sed -n 's/^TARGETDIR := *//p' "$MK")
TARGET=$(sed -n 's/^TARGET := *//p' "$MK")
DBG_BIN="$TARGETDIR/$TARGET"
echo "Debug tess binary: $DBG_BIN"
test -x "$DBG_BIN" || chmod +x "$DBG_BIN"
"$DBG_BIN"
# ---- Release ----
../build/build_rive.sh --file=premake5_tess.lua release
MK=./out/debug/rive_tess_tests.make
TARGETDIR=$(sed -n 's/^TARGETDIR := *//p' "$MK")
TARGET=$(sed -n 's/^TARGET := *//p' "$MK")
REL_BIN="$TARGETDIR/$TARGET"
echo "Release tess binary: $REL_BIN"
test -x "$REL_BIN" || chmod +x "$REL_BIN"
"$REL_BIN"