diff options
author | fn ⌃ ⌥ <70830482+FnControlOption@users.noreply.github.com> | 2021-08-28 03:14:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-28 12:14:55 +0200 |
commit | 0f8a6d78a72731833664b09695bd44471bc014ac (patch) | |
tree | 96565af80d25e40bd4233fa4f748da1167141c92 /.github/workflows | |
parent | 3f1adb49ae8da5bb02bea52609524d3645b6a665 (diff) | |
download | minetest-0f8a6d78a72731833664b09695bd44471bc014ac.tar.gz minetest-0f8a6d78a72731833664b09695bd44471bc014ac.tar.bz2 minetest-0f8a6d78a72731833664b09695bd44471bc014ac.zip |
CI: Add macOS workflow (#11454)
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/macos.yml | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..18e627de7 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,66 @@ +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: + IRRLICHT_TAG: 1.9.0mt2 + MINETEST_GAME_REPO: https://github.com/minetest/minetest_game.git + MINETEST_GAME_BRANCH: master + MINETEST_GAME_NAME: minetest_game + +jobs: + build: + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v2 + - name: Install deps + run: | + pkgs=(cmake freetype gettext gmp hiredis jpeg jsoncpp leveldb libogg libpng libvorbis luajit) + brew update + brew install ${pkgs[@]} + brew unlink $(brew ls --formula) + brew link ${pkgs[@]} + + - name: Build + run: | + git clone -b $MINETEST_GAME_BRANCH $MINETEST_GAME_REPO games/$MINETEST_GAME_NAME + rm -rvf games/$MINETEST_GAME_NAME/.git + git clone https://github.com/minetest/irrlicht -b $IRRLICHT_TAG lib/irrlichtmt + mkdir cmakebuild + cd cmakebuild + cmake .. \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DCMAKE_INSTALL_PREFIX=../build/macos/ \ + -DRUN_IN_PLACE=FALSE \ + -DENABLE_FREETYPE=TRUE -DENABLE_GETTEXT=TRUE + make -j2 + make install + + - name: Test + run: | + ./build/macos/minetest.app/Contents/MacOS/minetest --run-unittests + + - uses: actions/upload-artifact@v2 + with: + name: minetest-macos + path: ./build/macos/ |