Update GitHub Actions and the SFML example #14
Workflow file for this run
This file contains 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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: ${{ matrix.platform.name }} ${{ matrix.config.name }} | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- { name: Windows VS2022, os: windows-2022 } | |
- { name: Linux GCC, os: ubuntu-22.04 } | |
- { name: Linux Clang, os: ubuntu-22.04, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } | |
- { name: macOS x64, os: macos-14, flags: -DCMAKE_OSX_ARCHITECTURES=x86_64 } | |
- { name: macOS M1, os: macos-14, flags: -DCMAKE_OSX_ARCHITECTURES=arm64 } | |
steps: | |
- name: PubBus - Checkout Code | |
uses: actions/checkout@v4 | |
- name: SFML - Install Linux Dependencies | |
if: runner.os == 'Linux' | |
run: sudo apt-get update && sudo apt-get install libxrandr-dev libxcursor-dev libudev-dev libgl1-mesa-dev libegl1-mesa-dev | |
- name: SFML - Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
repository: SFML/SFML | |
path: SFML | |
- name: SFML - Configure CMake | |
shell: bash | |
run: cmake -S $GITHUB_WORKSPACE/SFML -B $GITHUB_WORKSPACE/SFML/build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/SFML/install -DSFML_BUILD_AUDIO=OFF -DSFML_BUILD_NETWORK=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON ${{matrix.platform.flags}} | |
- name: SFML - Build | |
shell: bash | |
run: cmake --build $GITHUB_WORKSPACE/SFML/build --config Release --target install | |
- name: PubBus - Configure CMake | |
shell: bash | |
run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install -DSFML_DIR=$GITHUB_WORKSPACE/SFML/install/lib/cmake/SFML -DPUBBUS_INSTALL_EXAMPLE=ON -DCMAKE_VERBOSE_MAKEFILE=ON ${{matrix.platform.flags}} | |
- name: PubBus - Build | |
shell: bash | |
run: cmake --build $GITHUB_WORKSPACE/build --config Release --target install | |
- name: PubBus - Test | |
shell: bash | |
run: ctest -C Release --test-dir $GITHUB_WORKSPACE/build/test |