Skip to content
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
29 changes: 26 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,31 @@ jobs:
steps:
- name: Install dependencies
run: |
brew install autoconf automake libtool pkg-config check \
sdl3 sdl3_image sdl3_ttf
brew install autoconf automake libtool pkg-config check cmake \
freetype harfbuzz

# SDL3_image and SDL3_ttf are built here, not taken from Homebrew: Homebrew's builds link
# Homebrew's sdl3, which would load a second SDL3 alongside this one.
- name: Build SDL3
run: |
git clone --depth 1 --branch ObjectivelyGPU https://github.com/jdolan/SDL.git SDL3
cmake -S SDL3 -B SDL3/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${HOMEBREW_PREFIX}
cmake --build SDL3/build -j$(sysctl -n hw.logicalcpu)
cmake --install SDL3/build

- name: Build SDL3_image
run: |
git clone --depth 1 --branch release-3.4.4 https://github.com/libsdl-org/SDL_image.git SDL3_image
cmake -S SDL3_image -B SDL3_image/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${HOMEBREW_PREFIX}
cmake --build SDL3_image/build -j$(sysctl -n hw.logicalcpu)
cmake --install SDL3_image/build

- name: Build SDL3_ttf
run: |
git clone --depth 1 --branch release-3.2.2 https://github.com/libsdl-org/SDL_ttf.git SDL3_ttf
cmake -S SDL3_ttf -B SDL3_ttf/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${HOMEBREW_PREFIX}
cmake --build SDL3_ttf/build -j$(sysctl -n hw.logicalcpu)
cmake --install SDL3_ttf/build

- name: Checkout Objectively
uses: actions/checkout@v6
Expand Down Expand Up @@ -111,7 +134,7 @@ jobs:

- name: Build SDL3
run: |
git clone --depth 1 --branch release-3.4.12 https://github.com/libsdl-org/SDL.git SDL3
git clone --depth 1 --branch ObjectivelyGPU https://github.com/jdolan/SDL.git SDL3
cmake -S SDL3 -B SDL3/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build SDL3/build -j$(nproc)
sudo cmake --install SDL3/build
Expand Down
32 changes: 26 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,35 @@ jobs:
# when built from source (i.e. whenever Config.h isn't already present);
# the macOS runner image doesn't ship autotools by default. configure.ac
# hard-requires check (via pkg-config) even though release builds don't
# run the test suite. sdl3/sdl3_image/sdl3_ttf provide the pkg-config
# files that Objectively/ObjectivelyGPU/ObjectivelyMVC's own configure
# scripts check for. macvim provides a modern xxd (supporting -t) on
# run the test suite. macvim provides a modern xxd (supporting -t) on
# PATH ahead of the runner's older /usr/bin/xxd, which the Assets
# "Preprocess Assets" build phase requires.
- name: Install autotools
run: brew install autoconf automake libtool pkg-config check sdl3 sdl3_image sdl3_ttf macvim
run: brew install autoconf automake libtool pkg-config check cmake freetype harfbuzz macvim

# SDL3, SDL3_image and SDL3_ttf provide the pkg-config files that
# Objectively/ObjectivelyGPU/ObjectivelyMVC's own configure scripts check
# for. They are built here, as in build.yml, not taken from Homebrew.
- name: Build SDL3
run: |
git clone --depth 1 --branch ObjectivelyGPU https://github.com/jdolan/SDL.git SDL3
cmake -S SDL3 -B SDL3/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${HOMEBREW_PREFIX}
cmake --build SDL3/build -j$(sysctl -n hw.logicalcpu)
cmake --install SDL3/build

- name: Build SDL3_image
run: |
git clone --depth 1 --branch release-3.4.4 https://github.com/libsdl-org/SDL_image.git SDL3_image
cmake -S SDL3_image -B SDL3_image/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${HOMEBREW_PREFIX}
cmake --build SDL3_image/build -j$(sysctl -n hw.logicalcpu)
cmake --install SDL3_image/build

- name: Build SDL3_ttf
run: |
git clone --depth 1 --branch release-3.2.2 https://github.com/libsdl-org/SDL_ttf.git SDL3_ttf
cmake -S SDL3_ttf -B SDL3_ttf/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${HOMEBREW_PREFIX}
cmake --build SDL3_ttf/build -j$(sysctl -n hw.logicalcpu)
cmake --install SDL3_ttf/build

- name: Checkout Objectively
uses: actions/checkout@v6
Expand Down Expand Up @@ -134,7 +156,6 @@ jobs:

- name: Zip xcframeworks
run: |
Comment thread
jdolan marked this conversation as resolved.
(cd ObjectivelyGPU/Frameworks && zip -r "$GITHUB_WORKSPACE/SDL3.xcframework.zip" SDL3.xcframework)
(cd ObjectivelyMVC/Frameworks && \
zip -r "$GITHUB_WORKSPACE/SDL3_image.xcframework.zip" SDL3_image.xcframework && \
zip -r "$GITHUB_WORKSPACE/SDL3_ttf.xcframework.zip" SDL3_ttf.xcframework && \
Expand All @@ -147,7 +168,6 @@ jobs:
gh release create ${{ github.ref_name }} \
--title "ObjectivelyMVC ${{ github.ref_name }}" \
--generate-notes \
"$GITHUB_WORKSPACE/SDL3.xcframework.zip" \
"$GITHUB_WORKSPACE/SDL3_image.xcframework.zip" \
"$GITHUB_WORKSPACE/SDL3_ttf.xcframework.zip" \
"$GITHUB_WORKSPACE/ObjectivelyMVC.xcframework.zip"
Expand Down
2 changes: 1 addition & 1 deletion Documentation/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Tagged releases are published on the [GitHub releases page](https://github.com/j

* [Objectively](https://github.com/jdolan/Objectively) >= 2.2.0
* [ObjectivelyGPU](https://github.com/jdolan/ObjectivelyGPU) >= 2.2.0
* [SDL3](https://github.com/libsdl-org/SDL) >= 3.2.0, [SDL3_image](https://github.com/libsdl-org/SDL_image), [SDL3_ttf](https://github.com/libsdl-org/SDL_ttf)
* [SDL3](https://github.com/libsdl-org/SDL) >= 3.2.0 (CI builds against the `ObjectivelyGPU` tag of [jdolan/SDL](https://github.com/jdolan/SDL), which adds the SDL_gpu query API; see [Installing ObjectivelyGPU](https://jdolan.github.io/ObjectivelyGPU/install.html)), [SDL3_image](https://github.com/libsdl-org/SDL_image), [SDL3_ttf](https://github.com/libsdl-org/SDL_ttf)

## Building

Expand Down
2 changes: 1 addition & 1 deletion Frameworks/fetch-sdl3-extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
set -euo pipefail

SDL3_IMAGE_VERSION="${SDL3_IMAGE_VERSION:-3.4.0}"
SDL3_IMAGE_VERSION="${SDL3_IMAGE_VERSION:-3.4.4}"
SDL3_TTF_VERSION="${SDL3_TTF_VERSION:-3.2.2}"

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
Expand Down
Loading