| name: Tests |
| on: |
| push: |
| |
| jobs: |
| # ---------- Linux ---------- |
| unit_linux: |
| runs-on: ubuntu-latest |
| defaults: { run: { shell: bash } } |
| steps: |
| - uses: actions/checkout@v4 |
| |
| - name: Tooling |
| run: | |
| sudo apt-get update |
| sudo apt-get install -y build-essential uuid-dev clang llvm lld |
| curl -sL -o premake.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz |
| tar -xf premake.tar.gz |
| sudo install -m 0755 premake5 /usr/local/bin/premake5 |
| |
| - name: Install C++ dependencies |
| run: sudo apt update && sudo apt-get -y install build-essential clang g++ llvm-dev uuid-dev |
| |
| - 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: Tests |
| shell: bash |
| run: | |
| cd tests/unit_tests |
| ./test.sh asan |
| |
| # ---------- Windows (MSVC) ---------- |
| unit_windows_msvc: |
| runs-on: windows-2022 |
| steps: |
| - uses: actions/checkout@v4 |
| - uses: microsoft/setup-msbuild@v1.3 |
| |
| - name: Add build scripts to PATH |
| shell: bash |
| run: echo "${{ github.workspace }}/build" >> "$GITHUB_PATH" |
| |
| - name: Install Dependencies |
| run: | |
| choco install make |
| choco install ninja |
| |
| - name: Unit tests |
| shell: cmd |
| working-directory: tests/unit_tests |
| run: ./test.bat --toolset=msc |
| |
| # ---------- Windows (clang-cl) ---------- |
| unit_windows_clang: |
| runs-on: windows-2022 |
| steps: |
| - uses: actions/checkout@v4 |
| - uses: microsoft/setup-msbuild@v1.3 |
| |
| - name: Add build scripts to PATH |
| shell: bash |
| run: echo "${{ github.workspace }}/build" >> "$GITHUB_PATH" |
| |
| - name: Install Dependencies |
| run: | |
| choco install make |
| choco install ninja |
| |
| - name: Unit tests (clang-cl) |
| shell: cmd |
| working-directory: tests/unit_tests |
| run: ./test.bat |
| |
| # ---------- macOS ---------- |
| unit_macos: |
| runs-on: macos-latest |
| steps: |
| - uses: actions/checkout@v4 |
| - name: Tooling |
| run: | |
| curl -sL -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 |
| working-directory: tests/unit_tests |
| run: ./test.sh |