mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-24 21:53:37 +02:00
52 lines
2.0 KiB
YAML
52 lines
2.0 KiB
YAML
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 VS2019, os: windows-2019 }
|
|
- { name: Windows VS2022, os: windows-2022 }
|
|
- { name: Windows ClangCL, os: windows-2022, flags: -T ClangCL }
|
|
- { name: Linux GCC, os: ubuntu-latest }
|
|
- { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ }
|
|
- { name: MacOS, os: macos-12, flags: -DSFML_BUILD_FRAMEWORKS=FALSE }
|
|
steps:
|
|
- name: Install Linux Dependencies
|
|
if: runner.os == 'Linux'
|
|
run: sudo apt-get update && sudo apt-get install libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev
|
|
|
|
- name: Checkout SFML
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: SFML/SFML
|
|
ref: 2.6.0
|
|
path: SFML
|
|
|
|
- name: Configure SFML CMake
|
|
shell: bash
|
|
run: cmake -S $GITHUB_WORKSPACE/SFML -B $GITHUB_WORKSPACE/SFML/build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/SFML/install -DBUILD_SHARED_LIBS=TRUE -DSFML_BUILD_EXAMPLES=FALSE -DSFML_BUILD_TEST_SUITE=FALSE -DCMAKE_VERBOSE_MAKEFILE=ON ${{matrix.platform.flags}}
|
|
|
|
- name: Build SFML
|
|
shell: bash
|
|
run: cmake --build $GITHUB_WORKSPACE/SFML/build --config Release --target install
|
|
|
|
- name: Checkout CSFML
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: CSFML
|
|
|
|
- name: Configure CSFML CMake
|
|
shell: bash
|
|
run: cmake -S $GITHUB_WORKSPACE/CSFML -B $GITHUB_WORKSPACE/CSFML/build -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/CSFML/install -DBUILD_SHARED_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=FALSE -DSFML_DIR=$GITHUB_WORKSPACE/SFML/install/lib/cmake/SFML -DCMAKE_VERBOSE_MAKEFILE=ON ${{matrix.platform.flags}}
|
|
|
|
- name: Build CSFML
|
|
shell: bash
|
|
run: cmake --build $GITHUB_WORKSPACE/CSFML/build --config Release --target install
|