Skip to content

cmdcraft: fix tailoring crash (#656) #10

cmdcraft: fix tailoring crash (#656)

cmdcraft: fix tailoring crash (#656) #10

# https://github.com/actions/cache
# https://github.com/actions/checkout
# https://github.com/ncipollo/release-action
# https://docs.github.com/actions/using-workflows
# https://docs.github.com/actions/learn-github-actions/contexts
name: osx-wizmode
on: [push]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
# custom libpng build fails a test on macos-latest (11.x)
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: make-build-dir
run: mkdir build
- name: Print github workspace
run: |
echo "PWD = $PWD"
echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE"
echo "github.workspace = ${{ github.workspace }}"
echo "${{runner.workspace}}"
echo "HOME = $HOME"
- name: Set env
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> $GITHUB_ENV
- name: Show git tag
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Generate cache key
run: |
key="$(grep -o "'https://[^']*'" ci/osx/requirements.sh | openssl dgst -sha256 -hex)"
echo "CACHE_KEY=${key#* }" >> $GITHUB_ENV
- name: Reuse cached files
uses: actions/cache@v2
with:
path: |
~/Thirdparty/Frameworks
key: ${{ runner.os }}-${{ env.CACHE_KEY }}
- name: CI-Build
shell: bash
working-directory: ${{github.workspace}}/build
env:
CXXFLAGS: -DWIZARD
run: |
if [[ "${GITHUB_REF}" =~ ^refs/tags/ ]]; then
export TODO_BREW_UPDATE=ON
export MACOSX_DEPLOYMENT_TARGET=10.9
echo MACOSX_DEPLOYMENT_TARGET = $MACOSX_DEPLOYMENT_TARGET
fi
export SDL2DIR="$HOME/Thirdparty/Frameworks"
export BUILD_MAC_APP=ON
export IVAN_BUILD_DIR="${{github.workspace}}/build"
export IVAN_FILE_VERSION=${RELEASE_VERSION#v}
../ci/osx/requirements.sh
../ci/osx/build.sh
make install
../ci/osx/package.sh
# Attention: you perform the release step when you push a tag, neat huh?
- name: Release
if: startsWith(github.ref, 'refs/tags/')
#if: startsWith(github.ref, 'refs/tags/') && github.repository == 'attnam/ivan'
uses: ncipollo/release-action@v1
with:
token: ${{ github.token }}
allowUpdates: true
artifactErrorsFailBuild: true
removeArtifacts: false
replacesArtifacts: true
generateReleaseNotes: false
artifacts: ${{github.workspace}}/build/osx/*.dmg
artifactContentType: raw
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
draft: false
prerelease: false