diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 90ab6c7143d..0c922b2c1e7 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -5,6 +5,9 @@ name: CI # gets it in a script, but that can't be done in the cache-name value # also I assume the name can't have slashes in it +# in the case of needing to recompile the vcpkg-created Windows dependencies, increment the cache-name and key +# this will create a brand new cache and recompile the vcpkg dependencies from scratch + on: push: branches: [ master ] @@ -281,3 +284,25 @@ jobs: export LTO=false export CACHE_DIR=/home/wesnoth-travis/build ./.github/workflows/ci-scripts/ubuntu.sh + + macos-01-master: + runs-on: macos-10.15 + + steps: + - uses: actions/checkout@v2 + with: + submodules: "recursive" + + - name: Cache object files + uses: actions/cache@v2 + env: + cache-name: macos-01-cache-master + with: + path: ~/build-cache + key: macos-01-master + + - name: macOS Release + run: | + export CFG=release + export CACHE_DIR=/home/wesnoth-travis/build + ./.github/workflows/ci-scripts/macos.sh diff --git a/.github/workflows/ci-scripts/macos.sh b/.github/workflows/ci-scripts/macos.sh new file mode 100755 index 00000000000..7aa17947cd1 --- /dev/null +++ b/.github/workflows/ci-scripts/macos.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache scons +export PATH="/usr/local/opt/gettext/bin:/usr/local/opt/ccache/libexec:$PWD/utils/travis:$PATH" +export CC=ccache-clang +export CXX=ccache-clang++ +export CCACHE_MAXSIZE=3000M +export CCACHE_COMPILERCHECK=content +export CCACHE_DIR="$CACHE_DIR" +./projectfiles/Xcode/Fix_Xcode_Dependencies + +scons translations build=release --debug=time nls=true jobs=2 || exit 1 + +cd ./projectfiles/Xcode + +xcodebuild CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -project "The Battle for Wesnoth.xcodeproj" -target "The Battle for Wesnoth" -configuration "$CFG" +EXIT_VAL=$? + +ccache -s +ccache -z + +exit $EXIT_VAL