Skip to content

Commit

Permalink
Use macOS 14 in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ISSOtm committed Aug 8, 2024
1 parent 93fb846 commit 9e90d7c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ case "${1%-*}" in
macos)
brew install bison libpng pkg-config md5sha1sum
# For the version check below exclusively, re-do this before building
export PATH="/usr/local/opt/bison/bin:$PATH"
export PATH="/opt/homebrew/opt/bison/bin:/usr/local/opt/bison/bin:$PATH"
;;
*)
echo "WARNING: Cannot install deps for OS '$1'"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
path: rgbds-${{ env.version }}-win${{ matrix.bits }}.zip

macos:
runs-on: macos-12
runs-on: macos-14
steps:
- name: Get version from tag
shell: bash
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Install deps
shell: bash
run: |
./.github/scripts/install_deps.sh macos-latest
./.github/scripts/install_deps.sh macos
# We force linking libpng statically; the other libs are provided by macOS itself
- name: Build binaries
run: |
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
unix:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12]
os: [ubuntu-20.04, ubuntu-22.04, macos-14]
cxx: [g++, clang++]
buildsys: [make, cmake]
exclude:
# Don't use `g++` on macOS; it's just an alias to `clang++`.
- os: macos-12
- os: macos-14
cxx: g++
fail-fast: false
runs-on: ${{ matrix.os }}
Expand All @@ -27,13 +27,13 @@ jobs:
- name: Build & install using Make
if: matrix.buildsys == 'make'
run: |
export PATH="/usr/local/opt/bison/bin:$PATH"
export PATH="/opt/homebrew/opt/bison/bin:/usr/local/opt/bison/bin:$PATH"
make develop -kj Q= CXX=${{ matrix.cxx }}
sudo make install -j Q=
- name: Build & install using CMake
if: matrix.buildsys == 'cmake'
run: |
export PATH="/usr/local/opt/bison/bin:$PATH"
export PATH="/opt/homebrew/opt/bison/bin:/usr/local/opt/bison/bin:$PATH"
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DSANITIZERS=ON -DMORE_WARNINGS=ON
cmake --build build -j --verbose
cp build/src/rgb{asm,link,fix,gfx} .
Expand Down Expand Up @@ -77,24 +77,19 @@ jobs:
CXX=${{ matrix.cxx }} test/run-tests.sh
macos-static:
strategy:
matrix:
# Don't run on macOS 11; our setup makes clang segfault (YES).
os: [macos-12]
fail-fast: false
runs-on: ${{ matrix.os }}
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install deps
shell: bash
run: |
./.github/scripts/install_deps.sh ${{ matrix.os }}
./.github/scripts/install_deps.sh macos
# Export `bison` to allow using the version we install from Homebrew,
# instead of the outdated one preinstalled on macOS (which doesn't
# even support `-Wall`...).
- name: Build & install
run: |
export PATH="/usr/local/opt/bison/bin:$PATH"
export PATH="/opt/homebrew/opt/bison/bin:/usr/local/opt/bison/bin:$PATH"
make -kj CXXFLAGS="-O3 -flto -DNDEBUG -mmacosx-version-min=10.9" PKG_CONFIG="pkg-config --static" PNGLDLIBS="$(pkg-config --static --libs-only-L libpng | cut -c 3-)/libpng.a $(pkg-config --static --libs-only-l libpng | sed s/-lpng[0-9]*//g)" Q=
- name: Package binaries
run: |
Expand Down
5 changes: 4 additions & 1 deletion test/fetch-test-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ case "$actionname" in
# libbet depends on PIL to build
if [ "$2" = "libbet" ]; then
case "${osname%-*}" in
ubuntu|macos)
macos)
python3 -m pip install --break-system-packages pillow
;;
ubuntu)
python3 -m pip install pillow
;;
windows)
Expand Down

0 comments on commit 9e90d7c

Please sign in to comment.