From 462ffcddbf1a1fe5bd9ede87a5efae548c008250 Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 6 Jan 2025 22:31:53 +0100 Subject: [PATCH] CI: Use Qt 5 on macOS 13 and Qt 6 on macOS 15 The macOS 15 autotools build stays disabled because many header files are not found (adplug, opusfile, soxr, ...) here for some reason. --- .../install-dependencies.sh | 14 +++++++++--- .github/actions/run-action/run-action.sh | 22 ++++++++++++++----- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/actions/install-dependencies/install-dependencies.sh b/.github/actions/install-dependencies/install-dependencies.sh index 6387cc910..ea1c08f36 100755 --- a/.github/actions/install-dependencies/install-dependencies.sh +++ b/.github/actions/install-dependencies/install-dependencies.sh @@ -6,8 +6,8 @@ # ubuntu-22.04: Qt 5 + GTK 3 # ubuntu-24.04: Qt 6 + GTK 3 # Windows: Qt 6 + GTK 2 -# macOS (Autotools): Qt 5 - GTK -# macOS (Meson): Qt 6 - GTK +# macOS 13: Qt 5 - GTK +# macOS 15: Qt 6 - GTK os=$(tr '[:upper:]' '[:lower:]' <<< "$1") build_system=$(tr '[:upper:]' '[:lower:]' <<< "$2") @@ -58,11 +58,19 @@ case "$os" in fi ;; + macos-13) + if [ "$build_system" = 'meson' ]; then + brew install $macos_packages qt@5 meson + else + brew install $macos_packages qt@5 automake + fi + ;; + macos*) if [ "$build_system" = 'meson' ]; then brew install $macos_packages qt@6 meson else - brew install $macos_packages qt@5 automake + brew install $macos_packages qt@6 automake libiconv fi ;; diff --git a/.github/actions/run-action/run-action.sh b/.github/actions/run-action/run-action.sh index 96a7d3763..dc0748fd4 100755 --- a/.github/actions/run-action/run-action.sh +++ b/.github/actions/run-action/run-action.sh @@ -6,8 +6,8 @@ # ubuntu-22.04: Qt 5 + GTK 3 # ubuntu-24.04: Qt 6 + GTK 3 # Windows: Qt 6 + GTK 2 -# macOS (Autotools): Qt 5 - GTK -# macOS (Meson): Qt 6 - GTK +# macOS 13: Qt 5 - GTK +# macOS 15: Qt 6 - GTK action=$(tr '[:upper:]' '[:lower:]' <<< "$1") os=$(tr '[:upper:]' '[:lower:]' <<< "$2") @@ -49,13 +49,25 @@ case "$action" in fi ;; + macos-13) + export PATH="/usr/local/opt/qt@5/bin:$PATH" + export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig:$PKG_CONFIG_PATH" + + if [ "$build_system" = 'meson' ]; then + meson setup build -D qt5=true -D gtk=false -D mac-media-keys=true + else + ./autogen.sh && ./configure --enable-qt5 --disable-gtk --enable-mac-media-keys + fi + ;; + macos*) + export PATH="/opt/homebrew/opt/qt@6/bin:$PATH" + export PKG_CONFIG_PATH="/opt/homebrew/opt/qt@6/libexec/lib/pkgconfig:$PKG_CONFIG_PATH" + if [ "$build_system" = 'meson' ]; then meson setup build -D gtk=false -D mac-media-keys=true else - export PATH="/usr/local/opt/qt@5/bin:$PATH" - export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig:$PKG_CONFIG_PATH" - ./autogen.sh && ./configure --enable-qt5 --disable-gtk --enable-mac-media-keys + ./autogen.sh && ./configure --disable-gtk --enable-mac-media-keys fi ;;