diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a0f83d8..7599abb8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 39c5e719..2a08d533 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -134,7 +156,6 @@ jobs: - name: Zip xcframeworks run: | - (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 && \ @@ -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" diff --git a/Documentation/install.md b/Documentation/install.md index e94e0d0c..80c2a152 100644 --- a/Documentation/install.md +++ b/Documentation/install.md @@ -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 diff --git a/Frameworks/fetch-sdl3-extensions.sh b/Frameworks/fetch-sdl3-extensions.sh index 8c9c004b..8b8cda54 100755 --- a/Frameworks/fetch-sdl3-extensions.sh +++ b/Frameworks/fetch-sdl3-extensions.sh @@ -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)"