From 304c66f0302cc1bb836b9a1d477ee3e4d7052e9d Mon Sep 17 00:00:00 2001 From: offtkp Date: Tue, 2 Jan 2024 14:56:50 +0200 Subject: [PATCH] Fix CI --- .github/workflows/FreeBSD.yml | 9 ++++++--- .github/workflows/Linux.yml | 7 +++++-- .github/workflows/MacOS.yml | 9 ++++++--- .github/workflows/Windows.yml | 7 +++++-- .github/workflows/iOS.yml | 4 +++- CMakeLists.txt | 4 +++- include/settings.hxx | 4 +--- src/corewrapper.cxx | 1 + 8 files changed, 30 insertions(+), 15 deletions(-) diff --git a/.github/workflows/FreeBSD.yml b/.github/workflows/FreeBSD.yml index f7f4b0ab..07ee56b9 100644 --- a/.github/workflows/FreeBSD.yml +++ b/.github/workflows/FreeBSD.yml @@ -1,19 +1,22 @@ name: Build FreeBSD +on: [push] jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2.3.1 + uses: actions/checkout@v4 + with: + submodules: 'true' - name: Build id: test uses: vmactions/freebsd-vm@v1 with: usesh: true prepare: | - pkg install -y curl cmake libX11 libXi libXrandr libXinerama libXcursor libglvnd alsa-lib + pkg install -y cmake libX11 libXi libXrandr libXinerama libXcursor libglvnd alsa-lib run: | - cmake -B build -GNinja + cmake -B build cmake --build build --config Release - name: Release uses: actions/upload-artifact@v2 diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml index 3c3403b4..d2fb83ee 100644 --- a/.github/workflows/Linux.yml +++ b/.github/workflows/Linux.yml @@ -1,10 +1,13 @@ name: Build Linux +on: [push] jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2.3.1 + uses: actions/checkout@v4 + with: + submodules: 'true' - name: Install dependencies run: | sudo apt-get update @@ -12,7 +15,7 @@ jobs: sudo apt-get install -y libgl1-mesa-dev libegl1-mesa-dev libasound2-dev - name: Build run: | - cmake -B build -GNinja + cmake -B build cmake --build build --config Release - name: Release uses: actions/upload-artifact@v2 diff --git a/.github/workflows/MacOS.yml b/.github/workflows/MacOS.yml index 83cc838a..78d1382b 100644 --- a/.github/workflows/MacOS.yml +++ b/.github/workflows/MacOS.yml @@ -1,14 +1,17 @@ name: Build macOS +on: [push] jobs: build-and-deploy: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v2.3.1 + uses: actions/checkout@v4 + with: + submodules: 'true' - name: Build run: | - cmake -B build -GNinja - cmake --build build--config Release + cmake -B build + cmake --build build --config Release - name: Build DMG run: | cd build diff --git a/.github/workflows/Windows.yml b/.github/workflows/Windows.yml index ed8bced0..3745cf66 100644 --- a/.github/workflows/Windows.yml +++ b/.github/workflows/Windows.yml @@ -1,15 +1,18 @@ name: Build Windows +on: [push] jobs: build-and-deploy: runs-on: windows-2019 steps: - name: Checkout - uses: actions/checkout@v2.3.1 + uses: actions/checkout@v4 + with: + submodules: 'true' - name: Get latest CMake and ninja uses: lukka/get-cmake@latest - name: Build run: | - cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.19041.0 -B build + cmake -G "Visual Studio 16 2019" -A x64 -B build cmake --build build --config Release - name: Release uses: actions/upload-artifact@v2 diff --git a/.github/workflows/iOS.yml b/.github/workflows/iOS.yml index 8516c8db..77f14e38 100644 --- a/.github/workflows/iOS.yml +++ b/.github/workflows/iOS.yml @@ -5,7 +5,9 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v2.3.1 + uses: actions/checkout@v4 + with: + submodules: 'true' - name: Build run: | cmake -GXcode -DSOKOL_BACKEND=SOKOL_METAL -DCMAKE_SYSTEM_NAME=iOS -B build diff --git a/CMakeLists.txt b/CMakeLists.txt index 544f1fd0..55fc4aba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,8 +19,10 @@ set(BUILD_SHARED_LIBS OFF) set(BUILD_STATIC_LIBS ON) set(DPP_BUILD_TEST OFF) +# TODO: instead, set HYDRA_DEFINITIONS if (WIN32) add_definitions(-DHYDRA_WINDOWS) + add_definitions(-DWIN32_LEAN_AND_MEAN) set(HYDRA_WINDOWS 1) elseif(APPLE) add_definitions(-DHYDRA_MACOS) @@ -77,7 +79,7 @@ elseif(HYDRA_IOS) # "-framework GameController" ) elseif(HYDRA_MACOS) - set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version" FORCE) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE) set(HYDRA_LIBRARIES ${HYDRA_LIBRARIES} # "-framework QuartzCore" # "-framework Cocoa" diff --git a/include/settings.hxx b/include/settings.hxx index d01da4a9..b84b000a 100644 --- a/include/settings.hxx +++ b/include/settings.hxx @@ -1,6 +1,5 @@ #pragma once -#include "SDL_opengl.h" #include #include #include @@ -13,7 +12,6 @@ #include #include #include -#include #include #include @@ -30,7 +28,7 @@ struct CoreInfo int max_players; std::vector firmware_files; std::vector extensions; - GLuint icon_texture = 0; + unsigned int icon_texture = 0; }; // Essentially a wrapper around a std::map that locks a mutex diff --git a/src/corewrapper.cxx b/src/corewrapper.cxx index d2819666..151d8390 100644 --- a/src/corewrapper.cxx +++ b/src/corewrapper.cxx @@ -1,6 +1,7 @@ #include "hydra/core.hxx" #define OPENSSL_API_COMPAT 10101 #include +#include #include #include #include