Skip to content
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

CI: Update Artifact actions to v4 #120

Merged
merged 18 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .github/workflows/android-macos-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
build-android:
name: ${{ matrix.ndk-arch }} on ${{ matrix.arch }} Android
runs-on: macos-11
runs-on: macos-13
strategy:
matrix:
ndk-arch: [x86_64]
Expand Down Expand Up @@ -150,13 +150,13 @@ jobs:
pushd build-boost/Boost-for-Android/libiconv-libicu-android/${{ matrix.ndk-arch }}/
zip -r -9 -q ../../../../FreeOrionSDK_${{ steps.cmake-dist-version.outputs.dist-version }}_Android-${{ matrix.ndk-arch }}.zip lib/libicui18n.a lib/libicuuc.a lib/libicudata.a lib/libiconv.so

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Artifacts
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
with:
name: python SDK
name: python ${{ matrix.ndk-arch }} SDK
path: |
python39.zip
${{ matrix.ndk-arch == 'x86_64' && 'python39.zip' || '' }}
FreeOrionSDK_${{ steps.cmake-dist-version.outputs.dist-version }}_Android-${{ matrix.ndk-arch }}.zip

- name: Prepare Release
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11]
os: [macos-13]
env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
HOMEBREW_NO_AUTO_UPDATE: 1
Expand All @@ -21,14 +21,14 @@ jobs:
run: |
mkdir build
cd build
xcversion select 11.7
xcodes select 14.1
cmake -DCMAKE_XCODE_BUILD_SYSTEM=1 ..
- name: Build
run: |
cd build
cmake --build . --config RelWithDebInfo
- name: Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
with:
name: MacOS SDK
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
cd build
cmake --build . --config RelWithDebInfo -- /verbosity:d
- name: Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
with:
name: Windows SDK
name: Windows ${{ matrix.toolset }}-${{ matrix.arch }} SDK
path: |
build/FreeOrionSDK_*_MSVC-${{ matrix.toolset }}-${{ matrix.arch }}.zip
- name: Prepare Release
Expand Down
15 changes: 9 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function(ExternalProject_PatchSet TARGET_NAME RESULT)
else()
set(${RESULT} ${${RESULT}} COMMAND)
endif()
set(${RESULT} ${${RESULT}} ${CMAKE_COMMAND} -E echo "Appliying patch ${_PATCH} ..." COMMAND)
set(${RESULT} ${${RESULT}} ${PATCH_EXECUTABLE} -p1 < ${_PATCH})
endforeach()
if(NOT ${RESULT})
Expand Down Expand Up @@ -373,9 +374,9 @@ if(WIN32)
else()
set(SDL_CONFIGURE_FLAGS
-DBUILD_SHARED_LIBS=ON
-DBUILD_FRAMEWORK=ON
-DBUILD_FRAMEWORK=OFF
)
set(SDL_CONFIGURE_INSTALL_DIR ${SDK_INSTALL_DIR}/Frameworks)
set(SDL_CONFIGURE_INSTALL_DIR ${SDK_INSTALL_DIR})
endif()

ExternalProject_PatchSet(sdl SDL_PATCHSET)
Expand All @@ -393,9 +394,10 @@ ExternalProject_Add(sdl
-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES_}
-DCMAKE_INSTALL_MESSAGE=${CMAKE_INSTALL_MESSAGE}
-DSDL_STATIC=OFF
-DDIRECTX=OFF
-DRENDER_D3D=OFF
-DVIDEO_VULKAN=OFF
-DSDL_DIRECTX=OFF
-DSDL_RENDER_D3D=OFF
-DSDL_VULKAN=OFF
-DSDL2_DISABLE_SDL2MAIN=ON
${SDL_CONFIGURE_FLAGS}
INSTALL_DIR ${SDL_CONFIGURE_INSTALL_DIR}
)
Expand Down Expand Up @@ -555,7 +557,7 @@ else()
list(GET _VS_PLATFORM_TOOLSET 0 _VS_PLATFORM_TOOLSET_VERSION)
list(GET _VS_PLATFORM_TOOLSET 1 _VS_PLATFORM_TOOLSET_TARGET)
math(EXPR _VS_PLATFORM_TOOLSET_VERSION "${_VS_PLATFORM_TOOLSET_VERSION}/10")
set(_VS_PLATFORM_TOOLSET_VERSION "${_VS_PLATFORM_TOOLSET_VERSION}.0")
set(_VS_PLATFORM_TOOLSET_VERSION "${_VS_PLATFORM_TOOLSET_VERSION}.3")
set(BOOST_CONFIGURE_FLAGS
debug-store=database
)
Expand All @@ -570,6 +572,7 @@ else()
list(APPEND BOOST_CONFIGURE_FLAGS define=BOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_VISTA)
endif()
set(BOOST_TOOLSET msvc-${_VS_PLATFORM_TOOLSET_VERSION})
message(STATUS "Boost toolset is msvc-${_VS_PLATFORM_TOOLSET_VERSION} for ${CMAKE_VS_PLATFORM_TOOLSET}")
set(BOOST_OSX_SYSROOT "")
endif()

Expand Down
4 changes: 2 additions & 2 deletions Sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ set(FREETYPE_VERSION 2.9)
set(FREETYPE_URL http://downloads.sourceforge.net/project/freetype/freetype2/${FREETYPE_VERSION}/freetype-${FREETYPE_VERSION}.tar.gz)
set(FREETYPE_MD5 d23a1b246e78890458c6672cb45eacd0)

set(SDL_VERSION 2.0.12)
set(SDL_VERSION 2.26.0)
set(SDL_URL https://www.libsdl.org/release/SDL2-${SDL_VERSION}.tar.gz)
set(SDL_MD5 783b6f2df8ff02b19bb5ce492b99c8ff)
set(SDL_MD5 35bc58cfe41b8fb6c8e6646be26fa47e)

set(LIBOGG_VERSION 1.3.2)
set(LIBOGG_URL http://downloads.xiph.org/releases/ogg/libogg-${LIBOGG_VERSION}.tar.gz)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8f1e828d1..aa17932b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1947,6 +1947,13 @@ if(NOT (WINDOWS OR CYGWIN))
install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/aclocal")
@@ -2848,6 +2848,13 @@ if(NOT (WINDOWS OR CYGWIN))
endif()
endif()

+if(SDL_SHARED AND (MSVC_VERSION GREATER 1500) AND (NOT CMAKE_VERSION VERSION_LESS "3.1"))
Expand All @@ -25,7 +25,7 @@ index 8f1e828d1..aa17932b6 100644
+
##### Uninstall target #####

if(NOT TARGET uninstall)
if(NOT SDL2_DISABLE_UNINSTALL)
--
2.14.3

36 changes: 36 additions & 0 deletions patches/sdl/0002-CMake-Remove-so-names.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From b9cfc3565b4d56adc5f022a5ab18c89959bc9476 Mon Sep 17 00:00:00 2001
From: O01eg <o01eg@yandex.ru>
Date: Wed, 25 Dec 2024 10:40:02 +0400
Subject: [PATCH 2/2] CMake: Remove so-names

---
CMakeLists.txt | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a596eec..b509bb3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3290,9 +3290,7 @@ if(SDL_SHARED)
if(APPLE)
# FIXME: Remove SOVERSION in SDL3
set_target_properties(SDL2 PROPERTIES
- MACOSX_RPATH 1
- SOVERSION 0
- OUTPUT_NAME "SDL2-${LT_RELEASE}")
+ MACOSX_RPATH 1)
elseif(UNIX AND NOT ANDROID)
set_target_properties(SDL2 PROPERTIES
VERSION ${LT_VERSION}
@@ -3518,7 +3516,7 @@ if(NOT SDL2_DISABLE_INSTALL)
install(FILES ${SDL2_BINARY_DIR}/sdl2.pc
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif()
- if(NOT (WINDOWS OR CYGWIN) OR MINGW)
+ if(NOT (WINDOWS OR CYGWIN OR APPLE) OR MINGW)
if(SDL_SHARED)
set(SOEXT ${CMAKE_SHARED_LIBRARY_SUFFIX}) # ".so", ".dylib", etc.
get_target_property(SONAME SDL2 OUTPUT_NAME)
--
2.45.2

37 changes: 0 additions & 37 deletions patches/sdl/0002-Never-build-and-install-SDL2main-library.patch

This file was deleted.

This file was deleted.

43 changes: 0 additions & 43 deletions patches/sdl/0004-CMake-Add-MacOSX-Framework-support.patch

This file was deleted.

24 changes: 0 additions & 24 deletions patches/sdl/0005-CMake-Set-framework-install-directory.patch

This file was deleted.