macos_instance: image: ghcr.io/cirruslabs/macos-ventura-xcode:14.3 env: CIRRUS_CLONE_DEPTH: 1 SSHKEY: ENCRYPTED[!55736b62f38817758b30fa42d741a6287a946d9201398343963b140be4e47df5658aa06523db4193329c70a0dfc17672!] build_task: brew_script: brew install sdl2 openal-soft sdl2_mixer libpng libvorbis openssh googletest cmake_script: # FindOpenAL prefers the framework version by default ... which deprecated OpenAL - openal="-DOPENAL_INCLUDE_DIR=/usr/local/opt/openal-soft/include/AL -DOPENAL_LIBRARY=/usr/local/opt/openal-soft/lib/libopenal.dylib" - mkdir build && cd build - export OPENALDIR="/usr/local/opt/openal-soft/" - cmake -DCMAKE_INSTALL_PREFIX=iprefix -DBIN_DIR="$CIRRUS_WORKING_DIR" $openal -DCMAKE_FIND_FRAMEWORK=LAST -DUSE_OPENAL=off -DUSE_TESTS=ON .. build_script: - cd build - make - # try to only run on tag pushes - if grep -q '^v[01]\.[0-9].[0-9]' <<< "${CIRRUS_TAG}"; then make fetch-demo-data; fi - make install test_script: - cd build - make test # also try real testing on this platform later if creating a display succeeds publish_script: - if [[ $CIRRUS_REPO_OWNER != 'gemrb' || -n $CIRRUS_PR ]]; then exit 0; fi - # generate filename - # there are no tags, so improvise - v2=${CIRRUS_CHANGE_IN_REPO:0:8} - if [[ -n $CIRRUS_TAG ]]; then v2=$CIRRUS_TAG; fi - version=$({ date +%F; echo "-$v2"; } | tr -d '\n') || exit 14 - file="gemrb-$version.zip" - # pack - zip -q -r "$file" "GemRB.app" - # unpack ssh key - echo "$SSHKEY" > testing/id_travissfbot.av - sed -i '' 's/Y----$/&-/' testing/id_travissfbot.av # either there's a bug or I c/p the incomplete key - chmod 600 testing/id_travissfbot.av - # upload - filepath="Apple/ARM64/$file" - scp -vvv -oStrictHostKeyChecking=no -i testing/id_travissfbot.av "$file" "gemrb-travisbot@frs.sourceforge.net:/home/frs/project/gemrb/botbins/$filepath"