Skip to content

Commit

Permalink
CI: Support macOS 15 build with autotools
Browse files Browse the repository at this point in the history
Use also always Qt 5 on macOS 13 and Qt 6 on macOS 15.
  • Loading branch information
radioactiveman committed Jan 6, 2025
1 parent b19b438 commit a08536d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
14 changes: 11 additions & 3 deletions .github/actions/install-dependencies/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -42,11 +42,19 @@ case "$os" in
fi
;;

macos-13)
if [ "$build_system" = 'meson' ]; then
brew install qt@5 meson
else
brew install qt@5 automake
fi
;;

macos*)
if [ "$build_system" = 'meson' ]; then
brew install qt@6 meson
else
brew install qt@5 automake
brew install qt@6 automake libiconv
fi
;;

Expand Down
24 changes: 19 additions & 5 deletions .github/actions/run-action/run-action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -53,13 +53,27 @@ 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
else
./autogen.sh && ./configure --enable-qt5 --disable-gtk
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
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
export LDFLAGS="-L/opt/homebrew/opt/libiconv/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libiconv/include"
./autogen.sh && ./configure --disable-gtk
fi
;;

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ jobs:
macos-13, macos-15,
windows-2022]
build-system: [autotools, meson]
exclude:
- os: macos-15
build-system: autotools
fail-fast: false
runs-on: ${{ matrix.os }}

Expand Down

0 comments on commit a08536d

Please sign in to comment.