Update package.sh #116
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: m8c macos arm64 build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: 'Environment info' | |
run: | | |
uname -m | |
- name: 'Install dependencies' | |
run: brew update && brew install cmake pkg-config sdl3 libserialport | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
- name: Set current date as env variable | |
run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: 'Build m8c' | |
id: buildApplication | |
continue-on-error: true | |
run: | | |
mkdir -p build_arm64 && cd build_arm64 && cmake .. && cpack -V | |
- name: 'View debug log if compilation fails' | |
if: failure() && steps.buildApplication.outcome == 'failure' | |
run: cat /Users/runner/work/m8c/m8c/build_arm64/_CPack_Packages/Darwin/DragNDrop/PreinstallOutput.log | |
- name: 'Build package' | |
run: | | |
mv build_arm64/m8c-0.1.1-Darwin.dmg m8c-${{ env.NOW }}-macos-applesilicon.dmg | |
- name: 'Upload artifact' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: m8c-${{ env.NOW }}-macos-applesilicon | |
path: | | |
m8c-${{ env.NOW }}-macos-applesilicon.dmg |