arm64 test #12
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: Build latest (macOS) | |
on: [push] | |
concurrency: | |
group: ${{ github.ref }}-mac | |
cancel-in-progress: true | |
jobs: | |
build: | |
if: github.ref_name == github.event.repository.default_branch | |
runs-on: ubuntu-latest | |
container: | |
image: fzwoch/osxcross | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Compile 64 bit macOS builds | |
shell: bash | |
id: compile | |
env: | |
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn" | |
MAC32_FLAGS: "-fvisibility=hidden -rdynamic -DCC_BUILD_ICON" | |
MAC64_FLAGS: "-fvisibility=hidden -rdynamic -DCC_BUILD_ICON" | |
run: | | |
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\" | |
find /opt/osxcross/target/bin | |
cd src | |
MACOSX_DEPLOYMENT_TARGET=10.5 x86_64-apple-darwin12-cc *.c interop_cocoa.m ${{ env.COMMON_FLAGS }} ${{ env.MAC64_FLAGS }} $LATEST_FLAG -o cc-mac64-gl1 -framework Cocoa -framework OpenGL -framework IOKit -lobjc | |
MACOSX_DEPLOYMENT_TARGET=10.5 x86_64-apple-darwin12-cc *.c interop_cocoa.m ${{ env.COMMON_FLAGS }} ${{ env.MAC64_FLAGS }} $LATEST_FLAG -DCC_BUILD_GLMODERN -o cc-mac64-gl2 -framework Cocoa -framework OpenGL -framework IOKit -lobjc | |
MACOSX_DEPLOYMENT_TARGET=10.5 i386-apple-darwin12-cc *.c interop_cocoa.m ${{ env.COMMON_FLAGS }} ${{ env.MAC32_FLAGS }} $LATEST_FLAG -o cc-mac32-gl1 -framework Cocoa -framework OpenGL -framework IOKit -lobjc | |
MACOSX_DEPLOYMENT_TARGET=10.5 i386-apple-darwin12-cc *.c interop_cocoa.m ${{ env.COMMON_FLAGS }} ${{ env.MAC32_FLAGS }} $LATEST_FLAG -DCC_BUILD_GLMODERN -o cc-mac32-gl2 -framework Cocoa -framework OpenGL -framework IOKit -lobjc | |
- uses: ./.github/actions/notify_failure | |
if: ${{ always() && steps.compile.outcome == 'failure' }} | |
with: | |
NOTIFY_MESSAGE: 'Failed to compile 64 bit macOS build' | |
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' | |
- uses: ./.github/actions/upload_build | |
if: ${{ always() && steps.compile.outcome == 'success' }} | |
with: | |
SOURCE_FILE: 'src/cc-mac64-gl1' | |
DEST_NAME: 'ClassiCube-mac64' | |
- uses: ./.github/actions/upload_build | |
if: ${{ always() && steps.compile.outcome == 'success' }} | |
with: | |
SOURCE_FILE: 'src/cc-mac64-gl2' | |
DEST_NAME: 'ClassiCube-mac64-ModernGL' |