Chore/cleanup #127
Workflow file for this run
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: CMake Multi-Platform | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| BUILD_TYPE: Release | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [windows-2025, ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Ensure submodules are up-to-date | |
| run: git submodule update --init --recursive | |
| - name: Check submodulesversions | |
| run: git submodule status | |
| - name: Install dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt update && sudo apt install -y cmake g++ make xorg-dev libgl1-mesa-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev xvfb | |
| - name: Configure CMake | |
| run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWEIRD_ENGINE_BUILD_EXAMPLES=ON -DWEIRD_TEST_HOOKS=ON | |
| - name: Build | |
| run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
| - name: Test (Linux) | |
| if: runner.os == 'Linux' | |
| working-directory: ${{github.workspace}}/build/examples/sample-scenes | |
| env: | |
| WEIRD_AUTO_QUIT_SECONDS: 3 | |
| WEIRD_SCREENSHOT_FRAME: 10 | |
| run: xvfb-run -a ./WeirdSamples | |
| - name: Upload Test Artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-artifacts-${{ matrix.os }} | |
| path: | | |
| ${{github.workspace}}/build/examples/sample-scenes/log.txt | |
| ${{github.workspace}}/build/examples/sample-scenes/screenshot_*.bmp | |
| ${{github.workspace}}/build/examples/sample-scenes/Release/log.txt | |
| ${{github.workspace}}/build/examples/sample-scenes/Release/screenshot_*.bmp |