Run tests by Sploder12 #61
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: Run gtest | |
| run-name: Run tests by ${{ github.actor }} | |
| on: [push] | |
| jobs: | |
| job: | |
| name: ${{ matrix.os }}-${{ github.workflow }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| include: | |
| - os: windows-latest | |
| preset: 'x64-release' | |
| binary_ext: '.exe' | |
| - os: ubuntu-latest | |
| preset: 'linux-debug' | |
| install_opengl: true | |
| - os: macos-latest | |
| preset: 'macos-debug' | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Install openGL | |
| if: ${{ matrix.install_opengl }} | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libxmu-dev libxi-dev libgl-dev | |
| sudo apt install libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev pkg-config | |
| sudo apt install libxrandr-dev | |
| - uses: ilammy/[email protected] | |
| - uses: lukka/get-cmake@latest | |
| with: | |
| cmakeVersion: "~3.31.0" # use most recent 3.31.x version | |
| - name: Run vcpkg | |
| uses: lukka/[email protected] | |
| with: | |
| runVcpkgInstall: true | |
| - name: Run CMake | |
| uses: lukka/run-cmake@v10 | |
| with: | |
| configurePreset: ${{ matrix.preset }} | |
| - name: Compile | |
| working-directory: ./out/build/${{ matrix.preset }} | |
| run: ninja | |
| - name: Run Tests | |
| working-directory: ./out/build/${{ matrix.preset }}/src/tests | |
| timeout-minutes: 5 | |
| run: ./tests${{ matrix.binary_ext }} | |