Skip to content

Update dependencies #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Apr 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8c3815f
Update dependencies
cschreib Apr 18, 2025
b3b73ce
Tabs to spaces
cschreib Apr 18, 2025
6a40fde
Update CI
cschreib Apr 18, 2025
dd005ca
Add missing include
cschreib Apr 18, 2025
5f9dfd8
Fix MSVC warning
cschreib Apr 18, 2025
a69ab06
brew already moved to SFML v3; request v2
cschreib Apr 18, 2025
8e4b135
Update CMake version and set policies
cschreib Apr 18, 2025
55ccb35
Remove FindSFML.cmake; rely on config files
cschreib Apr 18, 2025
3a67394
Add missing include
cschreib Apr 18, 2025
16bd54d
Fix variable now a cache variable in latest sol2
cschreib Apr 18, 2025
5a6bc2e
Parallel builds
cschreib Apr 18, 2025
c1ddf12
Remove unnecesary CMake Find* packages
cschreib Apr 18, 2025
43744e5
Add missing includes
cschreib Apr 18, 2025
b475157
Add brew keg-only dependencies to CMAKE_PREFIX_PATH
cschreib Apr 18, 2025
e72945f
Remove zlib from brew; already available as standard
cschreib Apr 19, 2025
2190b2d
Fix issues found with clang-17
cschreib Apr 21, 2025
35f4b2f
Clarify dubious float/int operations
cschreib Apr 21, 2025
3cc8a7d
Better error handling for glGetString(GL_VERSION)
cschreib Apr 21, 2025
9a15b16
Avoid segfault when failing to create materials
cschreib Apr 21, 2025
09aed65
Fix using wrong OpenGL function on shader compilation error
cschreib Apr 21, 2025
c7521d2
Remove extraneous semicolons
cschreib Apr 21, 2025
f9cda20
Use conan for deps
cschreib Apr 20, 2025
18e6cf2
Disable pulseaudio in clang build; package broken on conan-center
cschreib Apr 21, 2025
7bdd99b
conanbuild.sh doesn't exist on Windows
cschreib Apr 21, 2025
b54a5ec
Set CMake policy CMP0091 in CI build for Conan
cschreib Apr 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 104 additions & 55 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,107 +4,146 @@ on: push

env:
BUILD_TYPE: Release
EM_VERSION: 2.0.34
EM_CACHE_FOLDER: 'emsdk-cache'

jobs:
build:
strategy:
fail-fast: false
matrix:
platform:
- { name: Ubuntu GCC, os: ubuntu-latest, compiler: g++, arch: "64", cmakepp: "", suffix: "", flags: "-DCMAKE_CXX_COMPILER=g++"}
- { name: Ubuntu Clang, os: ubuntu-latest, compiler: clang++, arch: "64", cmakepp: "", suffix: "", flags: "-DCMAKE_CXX_COMPILER=clang++"}
- { name: Windows 32, os: windows-latest, compiler: vs2019, arch: "32", cmakepp: "", suffix: "", flags: "-DCMAKE_PREFIX_PATH=`pwd`/../dependencies -A Win32"}
- { name: Windows 64, os: windows-latest, compiler: vs2019, arch: "64", cmakepp: "", suffix: "", flags: "-DCMAKE_PREFIX_PATH=`pwd`/../dependencies -A x64"}
- { name: MacOS, os: macos-latest, compiler: clang++, arch: "64", cmakepp: "", suffix: "", flags: ""}
- { name: WebAssembly, os: ubuntu-latest, compiler: em++, arch: "32", cmakepp: "emcmake", suffix: "-emscripten", flags: "-DCMAKE_PREFIX_PATH=`pwd`/../dependencies -DCMAKE_FIND_ROOT_PATH=/ -DLXGUI_TEST_IMPLEMENTATION=OPENGL_SDL"}
- name: Ubuntu GCC
os: ubuntu-latest
compiler: g++
arch: "64"
suffix: ""
cmake-flags: ""
- name: Ubuntu Clang
os: ubuntu-latest
compiler: clang++
arch: "64"
suffix: ""
cmake-flags: ""
- name: Windows
os: windows-latest
compiler: msvc
arch: "64"
suffix: ""
cmake-flags: ""
- name: MacOS
os: macos-latest
compiler: clang++
arch: "64"
suffix: ""
cmake-flags: ""
- name: WebAssembly
os: ubuntu-latest
compiler: em++
arch: "32"
suffix: "-emscripten"
cmake-flags: "-DLXGUI_BUILD_GUI_SFML_IMPL=OFF -DLXGUI_BUILD_INPUT_SFML_IMPL=OFF -DLXGUI_TEST_IMPLEMENTATION=OPENGL_SDL"

name: ${{matrix.platform.name}}
runs-on: ${{matrix.platform.os}}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Setup Clang
if: matrix.platform.compiler == 'clang++' && matrix.platform.os == 'ubuntu-latest'
run: sudo apt install clang
run: |
sudo apt install clang
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV

- name: Setup Emscripten cache
if: matrix.platform.compiler == 'em++'
id: cache-system-libraries
uses: actions/[email protected]
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{ runner.os }}
- name: Setup Conan
shell: bash
working-directory: ${{github.workspace}}
run: |
pip install conan
echo "CONAN_HOME=`pwd`/conan-cache" >> $GITHUB_ENV

- name: Setup Emscripten
if: matrix.platform.compiler == 'em++'
uses: mymindstorm/setup-emsdk@v11
- name: Setup Conan cache
id: cache-conan-packages
uses: actions/cache@v4
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Get Linux dependencies
if: runner.os == 'Linux' && matrix.platform.compiler != 'em++'
run: |
sudo apt-get update
sudo apt-get install libz-dev libpng-dev libfreetype6-dev libglew-dev libglu1-mesa-dev libsfml-dev liblua5.2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-dev
path: ${{env.CONAN_HOME}}
key: ${{matrix.platform.name}}-${{matrix.platform.compiler}}

- name: Get Emscripten dependencies
if: matrix.platform.compiler == 'em++'
- name: Get Conan dependencies
shell: bash
working-directory: ${{github.workspace}}/dependencies
run: unzip wasm.zip

- name: Get Windows dependencies
if: runner.os == 'Windows'
# Ideally (but too slow):
#run: vcpkg install sfml lua zlib libpng freetype glew sdl2 sdl2-ttf sdl2-image
# Pre-compiled dependencies:
shell: bash
working-directory: ${{github.workspace}}/dependencies
run: unzip windows-dependencies-${{matrix.platform.compiler}}-${{matrix.platform.arch}}.zip
working-directory: ${{github.workspace}}
run: |
conan profile detect --force
conan create conan/observable_unique_ptr \
-pr default \
-pr ./conan/profiles/${{matrix.platform.os}}-${{matrix.platform.arch}}-${{matrix.platform.compiler}}
conan install . \
--build=missing \
-c tools.system.package_manager:mode=install \
-c tools.system.package_manager:sudo=true \
--output-folder dependencies \
-pr:b default \
-pr:h default \
-pr:h ./conan/profiles/${{matrix.platform.os}}-${{matrix.platform.arch}}-${{matrix.platform.compiler}}

- name: Get MacOS dependencies
if: runner.os == 'macOS'
run: brew install sfml lua zlib libpng freetype glew sdl2 sdl2_ttf sdl2_image
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: ${{matrix.platform.cmakepp}} cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DLXGUI_BUILD_EXAMPLES=0 -DCMAKE_INSTALL_PREFIX=`pwd`/../dependencies ${{matrix.platform.flags}}
run: |
test -f ../dependencies/conanbuild.sh && source ../dependencies/conanbuild.sh
cmake .. \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_TOOLCHAIN_FILE=`pwd`/../dependencies/conan_toolchain.cmake \
-DLXGUI_BUILD_EXAMPLES=OFF \
-DLXGUI_DEV=ON \
-DCMAKE_INSTALL_PREFIX=`pwd`/../install \
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW \
${{matrix.platform.cmake-flags}}

- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${BUILD_TYPE} --parallel 2
run: |
test -f ../dependencies/conanbuild.sh && source ../dependencies/conanbuild.sh
cmake --build . --config ${BUILD_TYPE} --parallel 2

- name: Install
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --install . --config ${BUILD_TYPE}
run: |
test -f ../dependencies/conanbuild.sh && source ../dependencies/conanbuild.sh
cmake --install . --config ${BUILD_TYPE}

- name: Build example SDL
shell: bash
working-directory: ${{github.workspace}}/build
run: |
rm -rf *
${{matrix.platform.cmakepp}} cmake ../examples/sdl${{matrix.platform.suffix}} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_PREFIX_PATH=`pwd`/../dependencies ${{matrix.platform.flags}}
test -f ../dependencies/conanbuild.sh && source ../dependencies/conanbuild.sh
cmake ../examples/sdl${{matrix.platform.suffix}} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_TOOLCHAIN_FILE=`pwd`/../dependencies/conan_toolchain.cmake \
-DCMAKE_PREFIX_PATH=`pwd`/../install \
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW
cmake --build . --config ${BUILD_TYPE} --parallel 2

- name: Build example OpenGL-SDL
shell: bash
working-directory: ${{github.workspace}}/build
run: |
rm -rf *
${{matrix.platform.cmakepp}} cmake ../examples/opengl-sdl${{matrix.platform.suffix}} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_PREFIX_PATH=`pwd`/../dependencies ${{matrix.platform.flags}}
test -f ../dependencies/conanbuild.sh && source ../dependencies/conanbuild.sh
cmake ../examples/opengl-sdl${{matrix.platform.suffix}} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_TOOLCHAIN_FILE=`pwd`/../dependencies/conan_toolchain.cmake \
-DCMAKE_PREFIX_PATH=`pwd`/../install \
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW
cmake --build . --config ${BUILD_TYPE} --parallel 2

- name: Build example SFML
Expand All @@ -113,7 +152,12 @@ jobs:
working-directory: ${{github.workspace}}/build
run: |
rm -rf *
${{matrix.platform.cmakepp}} cmake ../examples/sfml${{matrix.platform.suffix}} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_PREFIX_PATH=`pwd`/../dependencies ${{matrix.platform.flags}}
test -f ../dependencies/conanbuild.sh && source ../dependencies/conanbuild.sh
cmake ../examples/sfml${{matrix.platform.suffix}} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_TOOLCHAIN_FILE=`pwd`/../dependencies/conan_toolchain.cmake \
-DCMAKE_PREFIX_PATH=`pwd`/../install \
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW
cmake --build . --config ${BUILD_TYPE} --parallel 2

- name: Build example OpenGL-SFML
Expand All @@ -122,7 +166,12 @@ jobs:
working-directory: ${{github.workspace}}/build
run: |
rm -rf *
${{matrix.platform.cmakepp}} cmake ../examples/opengl-sfml${{matrix.platform.suffix}} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_PREFIX_PATH=`pwd`/../dependencies ${{matrix.platform.flags}}
test -f ../dependencies/conanbuild.sh && source ../dependencies/conanbuild.sh
cmake ../examples/opengl-sfml${{matrix.platform.suffix}} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_TOOLCHAIN_FILE=`pwd`/../dependencies/conan_toolchain.cmake \
-DCMAKE_PREFIX_PATH=`pwd`/../install \
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW
cmake --build . --config ${BUILD_TYPE} --parallel 2

- name: Prepare publish package
Expand All @@ -135,7 +184,7 @@ jobs:

- name: Publish
if: matrix.platform.compiler == 'em++' && github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@4.1.0
uses: JamesIves/github-pages-deploy-action@v4.7.3
with:
branch: gh-pages
folder: ${{github.workspace}}/bin/demo
Expand Down
79 changes: 0 additions & 79 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/workflows/custom.ruleset

This file was deleted.

Loading