minetest/.github/workflows/macos.yml
grorp 4b90e582b4
Rename to Luanti (#15294)
The new header intentionally isn't in MTG stone design (or any other MTG-esque design), since we want to distance Luanti and MTG from each other. The font "undefined medium" (https://undefined-medium.com/) was used. 

ASCII art generated by https://patorjk.com/software/taag/#p=display&f=Graffiti&t=luanti
https://github.com/minetest/minetest/pull/11952#issuecomment-1013364703

---------

Co-authored-by: sfan5 <sfan5@live.de>
2024-10-27 14:04:51 +01:00

71 lines
1.8 KiB
YAML

name: macos
# build on c/cpp changes or workflow changes
on:
push:
paths:
- 'lib/**.[ch]'
- 'lib/**.cpp'
- 'src/**.[ch]'
- 'src/**.cpp'
- 'irr/**.[ch]'
- 'irr/**.cpp'
- 'irr/**.mm' # Objective-C(++)
- '**/CMakeLists.txt'
- 'cmake/Modules/**'
- '.github/workflows/macos.yml'
pull_request:
paths:
- 'lib/**.[ch]'
- 'lib/**.cpp'
- 'src/**.[ch]'
- 'src/**.cpp'
- 'irr/**.[ch]'
- 'irr/**.cpp'
- 'irr/**.mm' # Objective-C(++)
- '**/CMakeLists.txt'
- 'cmake/Modules/**'
- '.github/workflows/macos.yml'
jobs:
build:
# use lowest possible macOS running on x86_64 supported by brew to support more users
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
source ./util/ci/common.sh
install_macos_deps
- name: Build
run: |
mkdir build
cd build
cmake .. \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \
-DCMAKE_FIND_FRAMEWORK=LAST \
-DCMAKE_INSTALL_PREFIX=../build/macos/ \
-DRUN_IN_PLACE=FALSE -DENABLE_GETTEXT=TRUE \
-DINSTALL_DEVTEST=TRUE
cmake --build . -j$(sysctl -n hw.logicalcpu)
make install
- name: Test
run: |
./build/macos/luanti.app/Contents/MacOS/luanti --run-unittests
# Zipping the built .app preserves permissions on the contained files,
# which the GitHub artifact pipeline would otherwise strip away.
- name: CPack
run: |
cd build
rm -rf macos
cmake .. -DINSTALL_DEVTEST=FALSE
cpack -G ZIP -B macos
- uses: actions/upload-artifact@v4
with:
name: luanti-macos
path: ./build/macos/*.zip