add separate builds for macos arm and intel #1
Workflow file for this run
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: 'Install dependencies' | |
run: arch -arm64 brew install cmake pkg-config sdl2 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' | |
run: | | |
mkdir -p build_arm64 && cd build_arm64 && export CMAKE_APPLE_SILICON_PROCESSOR="arm64" && cmake .. && cpack -V | |
- name: 'Build package' | |
run: | | |
mv build_arm64/m8c-0.1.1-Darwin.dmg m8c-${{ env.NOW }}-applesilicon.dmg | |
- name: 'Upload artifact' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: m8c-${{ env.NOW }}-macos | |
path: | | |
m8c-${{ env.NOW }}-applesilicon.dmg |