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

Fix macOS CI #2075

Merged
merged 5 commits into from
Dec 16, 2023
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
11 changes: 5 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,13 @@ jobs:
gettext \
create-dmg
brew link gettext --force
- uses: actions/setup-python@v4 # Workaround for #2069
with:
python-version: '3.11'
lmoureaux marked this conversation as resolved.
Show resolved Hide resolved
- uses: lukka/run-vcpkg@v10
name: Install dependencies
with:
vcpkgGitCommitId: 50fd3d9957195575849a49fa591e645f1d8e7156
vcpkgGitCommitId: 23ceb9cbf9b6d32f485cf039547b70102a6ef9d8
lmoureaux marked this conversation as resolved.
Show resolved Hide resolved
- name: Build
uses: lukka/run-cmake@v10
with:
Expand Down Expand Up @@ -253,6 +256,7 @@ jobs:
mkdir staging
mv Freeciv21.app staging
create-dmg \
--hdiutil-verbose \
--volname "Freeciv21 Installer" \
--volicon "client.icns" \
--window-pos 200 120 \
Expand All @@ -264,11 +268,6 @@ jobs:
"Freeciv21-${{steps.split.outputs.fragment}}.dmg" \
"staging/"
shasum -a 256 Freeciv21-${{steps.split.outputs.fragment}}.dmg > Freeciv21-${{steps.split.outputs.fragment}}.dmg.sha256
- name: Debug
if: failure()
run: |
cat CMakeCache.txt
echo ${{steps.split.outputs.fragment}}
- name: Upload package
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down
9 changes: 5 additions & 4 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ target_link_libraries(freeciv21-client PRIVATE tolua)

target_link_libraries(freeciv21-client PRIVATE Qt5::Widgets)
target_link_libraries(freeciv21-client PRIVATE Qt5::Svg)
target_link_libraries(freeciv21-client PRIVATE ${SDL2_MIXER_LIBRARIES} ${SDL2_LIBRARY})

if(NOT EMSCRIPTEN)
target_sources(freeciv21-client PRIVATE servers.cpp)
Expand All @@ -168,13 +167,15 @@ if (AUDIO_SDL)
target_sources(freeciv21-client PRIVATE audio/audio_sdl.cpp)
if (NOT EMSCRIPTEN)
# SDL comes with the -s option on emscripten
target_include_directories(freeciv21-client PRIVATE ${SDL2_INCLUDE_DIR})
# See https://github.com/microsoft/vcpkg/blob/2023.12.12/ports/sdl2/usage
target_link_libraries(freeciv21-client
PRIVATE $<IF:$<TARGET_EXISTS:SDL2::SDL2>,SDL2::SDL2,SDL2::SDL2-static>)
target_link_libraries(freeciv21-client PRIVATE ${SDL2_MIXER_LIBRARIES})
target_include_directories(freeciv21-client PRIVATE ${SDL2_MIXER_INCLUDE_DIR})
endif()
endif()

if(APPLE)
target_link_libraries(freeciv21-client PRIVATE "-framework AudioUnit" "-framework CoreAudio" "-framework ForceFeedback" "-framework AudioToolbox")
if (APPLE)
qt5_import_plugins(freeciv21-client INCLUDE Qt5::QCocoaIntegrationPlugin Qt5::QSvgPlugin)
endif()

Expand Down
181 changes: 0 additions & 181 deletions cmake/FindSDL2.cmake

This file was deleted.

1 change: 1 addition & 0 deletions docs/Contributing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Freeciv21 project.
pull-request.rst
eval-pull-request.rst
release.rst
workarounds.rst
stable-branch.rst
style-guide.rst
:maxdepth: 1
5 changes: 5 additions & 0 deletions docs/Contributing/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ These are the general steps to prepare and finalize a release:
created PR's.
#. While inside the ``Release Update of AutoRevision.txt`` PR, the release manager will enable an automatic
rebase and merge.
#. The release manager will open an issue titled ``Review workarounds after <version> release`` with the following text:

We should review the workarounds in the source code and check that they are still needed. Some
workarounds are documented here: :doc:`Workarounds`.

#. When all the CI actions are complete, the release manager will make a post in the ``#news-channel`` on the
Longturn.net Discord server.
#. The release manager will download the Windows i686 and x86_64 installer packages and use their Microsoft
Expand Down
11 changes: 11 additions & 0 deletions docs/Contributing/workarounds.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. SPDX-License-Identifier: GPL-3.0-or-later
.. SPDX-FileCopyrightText: Louis Moureaux <m_louis30@yahoo.com>

Workarounds
***********

This page lists workarounds in the code. They should be checked from time to
time and removed once they are no longer needed.

#. The macOS CI installs a fixed Python version to work around a bug in Meson.
(``.github/workflows/build.yaml``)
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "freeciv21",
"version-string": "3.0.0",
"builtin-baseline": "50fd3d9957195575849a49fa591e645f1d8e7156",
"builtin-baseline": "23ceb9cbf9b6d32f485cf039547b70102a6ef9d8",
"dependencies": [
"qt5-base",
"qt5-svg",
Expand Down
Loading