Merge remote-tracking branch 'origin/wip5.7.0' into mapgen_earth #263
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: macos | |
# build on c/cpp changes or workflow changes | |
on: | |
push: | |
paths: | |
- 'lib/**.[ch]' | |
- 'lib/**.cpp' | |
- 'src/**.[ch]' | |
- 'src/**.cpp' | |
- '**/CMakeLists.txt' | |
- 'cmake/Modules/**' | |
- '.github/workflows/macos.yml' | |
pull_request: | |
paths: | |
- 'lib/**.[ch]' | |
- 'lib/**.cpp' | |
- 'src/**.[ch]' | |
- 'src/**.cpp' | |
- '**/CMakeLists.txt' | |
- 'cmake/Modules/**' | |
- '.github/workflows/macos.yml' | |
env: | |
MINETEST_GAME_REPO: https://github.com/minetest/minetest_game.git | |
MINETEST_GAME_BRANCH: master | |
MINETEST_GAME_NAME: minetest_game | |
jobs: | |
build: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 10 | |
- name: Install deps | |
run: | | |
source ./util/ci/common.sh | |
install_macos_deps | |
- name: Build | |
run: | | |
git clone -b $MINETEST_GAME_BRANCH $MINETEST_GAME_REPO games/$MINETEST_GAME_NAME | |
# git clone https://github.com/minetest/irrlicht lib/irrlichtmt --depth 1 -b $(cat misc/irrlichtmt_tag.txt) | |
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 | |
make -j2 | |
make install | |
- name: Test | |
run: | | |
./build/macos/minetest.app/Contents/MacOS/minetest --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 | |
cpack -G ZIP -B macos | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: minetest-macos | |
path: ./build/macos/*.zip |