From 068501158a3a44629b9e3f7d55855a6cbb33b961 Mon Sep 17 00:00:00 2001 From: emiyl Date: Sun, 9 Aug 2026 14:14:01 +0100 Subject: [PATCH 01/11] macos test runner --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ceaab6e9b..829f981c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,33 @@ jobs: with: name: butterscotch-glfw-linux-x86_64 path: build/butterscotch + + build-glfw-macos-arm64: + name: Build (GLFW/macOS arm64) + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: Get commit info + id: commit-info + run: | + echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + echo "date=$(git log -1 --format=%cd --date=short)" >> $GITHUB_OUTPUT + + - name: Install dependencies + run: brew install cmake glfw bzip2 + + - name: Configure + run: cmake -B build -DWERROR=ON -DDESKTOP_BACKEND=glfw3 -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" + + - name: Build + run: cmake --build build -- -j$(sysctl -n hw.ncpu) + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: butterscotch-glfw-macos-arm64 + path: build/butterscotch build-glfw-windows-x86_64: name: Build (GLFW/Windows x86_64) From 2f906847af14b1b8349070ca3c961f5c3ea6bc11 Mon Sep 17 00:00:00 2001 From: emiyl Date: Sun, 9 Aug 2026 14:23:18 +0100 Subject: [PATCH 02/11] add x86_64 runner --- .github/workflows/build.yml | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 829f981c3..c3ffcd148 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,6 +61,51 @@ jobs: name: butterscotch-glfw-macos-arm64 path: build/butterscotch + build-glfw-macos-x86_64: + name: Build (GLFW/macOS x86_64) + runs-on: macos-14 + steps: + - uses: actions/checkout@v4 + + - name: Install Rosetta + run: softwareupdate --install-rosetta --agree-to-license + + - name: Install x86_64 Homebrew + run: | + arch -x86_64 /bin/bash -c \ + "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + + - name: Install dependencies + run: | + arch -x86_64 /usr/local/bin/brew install cmake glfw bzip2 + + - name: Get commit info + id: commit-info + run: | + echo "hash=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" + echo "date=$(git log -1 --format=%cd --date=short)" >> "$GITHUB_OUTPUT" + + - name: Configure + run: | + arch -x86_64 /usr/local/bin/cmake -B build \ + -DWERROR=ON \ + -DDESKTOP_BACKEND=glfw3 \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_OSX_ARCHITECTURES=x86_64 \ + "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" \ + "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" + + - name: Build + run: | + arch -x86_64 /usr/local/bin/cmake --build build \ + -- -j$(sysctl -n hw.ncpu) + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: butterscotch-glfw-macos-x86_64 + path: build/butterscotch + build-glfw-windows-x86_64: name: Build (GLFW/Windows x86_64) runs-on: ubuntu-24.04 From 9c56e70956b8449917ca6ebe48a0d61d358d82bb Mon Sep 17 00:00:00 2001 From: Fancy2209 <64917206+Fancy2209@users.noreply.github.com> Date: Tue, 11 Aug 2026 17:23:17 +0000 Subject: [PATCH 03/11] Fix uniq's reviews --- .github/workflows/build.yml | 38 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c3ffcd148..5abfb4f32 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: build-glfw-macos-arm64: name: Build (GLFW/macOS arm64) - runs-on: macos-latest + runs-on: macos-26 steps: - uses: actions/checkout@v4 @@ -63,47 +63,29 @@ jobs: build-glfw-macos-x86_64: name: Build (GLFW/macOS x86_64) - runs-on: macos-14 + runs-on: macos-26-intel steps: - uses: actions/checkout@v4 - - name: Install Rosetta - run: softwareupdate --install-rosetta --agree-to-license - - - name: Install x86_64 Homebrew - run: | - arch -x86_64 /bin/bash -c \ - "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - - - name: Install dependencies - run: | - arch -x86_64 /usr/local/bin/brew install cmake glfw bzip2 - - name: Get commit info id: commit-info run: | - echo "hash=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" - echo "date=$(git log -1 --format=%cd --date=short)" >> "$GITHUB_OUTPUT" + echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + echo "date=$(git log -1 --format=%cd --date=short)" >> $GITHUB_OUTPUT + + - name: Install dependencies + run: brew install cmake glfw bzip2 - name: Configure - run: | - arch -x86_64 /usr/local/bin/cmake -B build \ - -DWERROR=ON \ - -DDESKTOP_BACKEND=glfw3 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_OSX_ARCHITECTURES=x86_64 \ - "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" \ - "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" + run: cmake -B build -DWERROR=ON -DDESKTOP_BACKEND=glfw3 -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" - name: Build - run: | - arch -x86_64 /usr/local/bin/cmake --build build \ - -- -j$(sysctl -n hw.ncpu) + run: cmake --build build -- -j$(sysctl -n hw.ncpu) - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: butterscotch-glfw-macos-x86_64 + name: butterscotch-glfw-macos-amd64 path: build/butterscotch build-glfw-windows-x86_64: From 3caf42bd36025536fd5932cca7001f869a83d6f3 Mon Sep 17 00:00:00 2001 From: Fancy2209 <64917206+Fancy2209@users.noreply.github.com> Date: Tue, 11 Aug 2026 17:23:55 +0000 Subject: [PATCH 04/11] Fix typo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5abfb4f32..c9b11ae69 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,7 +85,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: butterscotch-glfw-macos-amd64 + name: butterscotch-glfw-macos-x86_64 path: build/butterscotch build-glfw-windows-x86_64: From fc3765624e9edbb105f61cc99cdaf6dcdb4ee1f3 Mon Sep 17 00:00:00 2001 From: Fancy2209 <64917206+Fancy2209@users.noreply.github.com> Date: Tue, 11 Aug 2026 17:35:44 +0000 Subject: [PATCH 05/11] Use AppKit --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9b11ae69..3b004e773 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: run: brew install cmake glfw bzip2 - name: Configure - run: cmake -B build -DWERROR=ON -DDESKTOP_BACKEND=glfw3 -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" + run: cmake -B build -DWERROR=ON -DDESKTOP_BACKEND=appkit -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" - name: Build run: cmake --build build -- -j$(sysctl -n hw.ncpu) @@ -77,7 +77,7 @@ jobs: run: brew install cmake glfw bzip2 - name: Configure - run: cmake -B build -DWERROR=ON -DDESKTOP_BACKEND=glfw3 -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" + run: cmake -B build -DWERROR=ON -DDESKTOP_BACKEND=appkit -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" - name: Build run: cmake --build build -- -j$(sysctl -n hw.ncpu) From d36b54cdc39825561411d096543d37a32df50ced Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Tue, 11 Aug 2026 22:32:51 +0100 Subject: [PATCH 06/11] chore(ci): matrix builds for macos --- .github/workflows/build.yml | 90 +++++++++++++++---------------------- 1 file changed, 36 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b004e773..953476aec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,60 +33,6 @@ jobs: with: name: butterscotch-glfw-linux-x86_64 path: build/butterscotch - - build-glfw-macos-arm64: - name: Build (GLFW/macOS arm64) - runs-on: macos-26 - steps: - - uses: actions/checkout@v4 - - - name: Get commit info - id: commit-info - run: | - echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - echo "date=$(git log -1 --format=%cd --date=short)" >> $GITHUB_OUTPUT - - - name: Install dependencies - run: brew install cmake glfw bzip2 - - - name: Configure - run: cmake -B build -DWERROR=ON -DDESKTOP_BACKEND=appkit -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" - - - name: Build - run: cmake --build build -- -j$(sysctl -n hw.ncpu) - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: butterscotch-glfw-macos-arm64 - path: build/butterscotch - - build-glfw-macos-x86_64: - name: Build (GLFW/macOS x86_64) - runs-on: macos-26-intel - steps: - - uses: actions/checkout@v4 - - - name: Get commit info - id: commit-info - run: | - echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - echo "date=$(git log -1 --format=%cd --date=short)" >> $GITHUB_OUTPUT - - - name: Install dependencies - run: brew install cmake glfw bzip2 - - - name: Configure - run: cmake -B build -DWERROR=ON -DDESKTOP_BACKEND=appkit -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" - - - name: Build - run: cmake --build build -- -j$(sysctl -n hw.ncpu) - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: butterscotch-glfw-macos-x86_64 - path: build/butterscotch build-glfw-windows-x86_64: name: Build (GLFW/Windows x86_64) @@ -233,6 +179,42 @@ jobs: path: build/butterscotch.exe - name: Pack cache run: cd ~ && tar cJf ccache.tar.xz .cache/ccache workspacecache.tar + + build-glfw-macos: + name: Build (GLFW/macOS ${{ matrix.label }}) + strategy: + fail-fast: false + matrix: + include: + - label: x86_64 + runner: macos-26-intel + - label: arm64 + runner: macos-26 + + runs-on: ${{ matrix.runner }} + steps: + - uses: actions/checkout@v4 + + - name: Get commit info + id: commit-info + run: | + echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + echo "date=$(git log -1 --format=%cd --date=short)" >> $GITHUB_OUTPUT + + - name: Install dependencies + run: brew install cmake ninja glfw bzip2 + + - name: Configure + run: cmake -B build -G Ninja -DWERROR=ON -DDESKTOP_BACKEND=appkit -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" + + - name: Build + run: cmake --build build + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: butterscotch-glfw-macos-${{ matrix.label }} + path: build/butterscotch build-ps2: name: Build (PS2)${{ matrix.label }} From 3b8aa7863cf84d7fa1d0a830eba2116686239129 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Tue, 11 Aug 2026 22:34:27 +0100 Subject: [PATCH 07/11] chore(ci): macos glfw->appkit --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 953476aec..388d31ba6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -181,7 +181,7 @@ jobs: run: cd ~ && tar cJf ccache.tar.xz .cache/ccache workspacecache.tar build-glfw-macos: - name: Build (GLFW/macOS ${{ matrix.label }}) + name: Build (AppKit/macOS ${{ matrix.label }}) strategy: fail-fast: false matrix: From 662c1d271ca29805363ede07bde3886706e2aec4 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Tue, 11 Aug 2026 23:13:18 +0100 Subject: [PATCH 08/11] ccache --- .github/workflows/build.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 388d31ba6..017f846df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -202,10 +202,17 @@ jobs: echo "date=$(git log -1 --format=%cd --date=short)" >> $GITHUB_OUTPUT - name: Install dependencies - run: brew install cmake ninja glfw bzip2 + run: brew install cmake ninja glfw bzip2 ccache + + - uses: actions/cache@v5 + with: + path: ~/Library/Caches/ccache + key: ccache-macos-${{ matrix.label }}-${{ github.sha }} + restore-keys: | + ccache-macos-${{ matrix.label }}- - name: Configure - run: cmake -B build -G Ninja -DWERROR=ON -DDESKTOP_BACKEND=appkit -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" + run: cmake -B build -G Ninja -DWERROR=ON -DDESKTOP_BACKEND=appkit -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" - name: Build run: cmake --build build @@ -213,7 +220,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: butterscotch-glfw-macos-${{ matrix.label }} + name: butterscotch-appkit-macos-${{ matrix.label }} path: build/butterscotch build-ps2: From 07288a3dc8b95beac2c5b7b31bad72efaaf461ee Mon Sep 17 00:00:00 2001 From: emiyl Date: Wed, 12 Aug 2026 14:26:10 +0100 Subject: [PATCH 09/11] remove deprecation warnings --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 017f846df..32f416066 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -212,7 +212,7 @@ jobs: ccache-macos-${{ matrix.label }}- - name: Configure - run: cmake -B build -G Ninja -DWERROR=ON -DDESKTOP_BACKEND=appkit -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" + run: cmake -B build -G Ninja -DWERROR=ON -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DDESKTOP_BACKEND=appkit -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" - name: Build run: cmake --build build From a227bfe5b3161f3deaa79476517112b751a025f6 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Wed, 12 Aug 2026 16:08:19 +0100 Subject: [PATCH 10/11] remove commit date/hash from cmake --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 32f416066..78ea709f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -212,7 +212,7 @@ jobs: ccache-macos-${{ matrix.label }}- - name: Configure - run: cmake -B build -G Ninja -DWERROR=ON -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DDESKTOP_BACKEND=appkit -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release "-DBUTTERSCOTCH_COMMIT_HASH=${{ steps.commit-info.outputs.hash }}" "-DBUTTERSCOTCH_COMMIT_DATE=${{ steps.commit-info.outputs.date }}" + run: cmake -B build -G Ninja -DWERROR=ON -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DDESKTOP_BACKEND=appkit -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=Release - name: Build run: cmake --build build From 0053f87e9eff6438d386ecfaaa148ff119b6c46f Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Wed, 12 Aug 2026 16:15:12 +0100 Subject: [PATCH 11/11] speed up homebrew? --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 78ea709f8..194d279cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -202,7 +202,10 @@ jobs: echo "date=$(git log -1 --format=%cd --date=short)" >> $GITHUB_OUTPUT - name: Install dependencies - run: brew install cmake ninja glfw bzip2 ccache + run: brew install glfw ccache + env: + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 - uses: actions/cache@v5 with: