Draft: macOS: Add M1/arm64 support #1160
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: macOS Build | ||
# yamllint disable-line rule:truthy | ||
on: | ||
- push | ||
jobs: | ||
build: | ||
name: ${{matrix.buildname}} | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
matrix: | ||
include: | ||
# - os: macos-11 | ||
# buildname: macOS 10.15 | ||
# create_bundle: true | ||
# cmake_configure_preset: macOS-10 | ||
# bundle_suffix: '' | ||
# qt_package: "qt@5" | ||
- os: macos-12-large | ||
buildname: macOS 12 M1 | ||
create_bundle: true | ||
bundle_suffix: '-macos-12-m1' | ||
cmake_configure_preset: macOS-12-m1 | ||
qt_package_version: "6" | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: false | ||
fetch-depth: 1 | ||
- name: Enable ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ github.job }}-${{ matrix.os }} | ||
- name: Set up ccache | ||
run: | | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
- name: Install dependencies | ||
env: | ||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 | ||
HOMEBREW_NO_AUTO_UPDATE: 1 | ||
HOMEBREW_NO_INSTALL_CLEANUP: 1 | ||
COPYQ_QT_PACKAGE_VERSION: '${{qt_package_version}}' | ||
Check failure on line 49 in .github/workflows/build-macos.yml GitHub Actions / macOS BuildInvalid workflow file
|
||
run: '${{github.workspace}}/utils/github/install-macos.sh' | ||
- name: Build with CMake | ||
uses: lukka/run-cmake@v10 | ||
with: | ||
configurePreset: '${{cmake_configure_preset}}' | ||
buildPreset: macOS | ||
- name: Create gnupg directory for tests | ||
run: mkdir -p ~/.gnupg | ||
- name: Create macOS bundle | ||
if: matrix.create_bundle | ||
working-directory: '${{runner.workspace}}/build' | ||
run: '${{github.workspace}}/utils/github/bundle-macos.sh' | ||
- name: Upload macOS bundle | ||
if: matrix.create_bundle | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: 'CopyQ${{matrix.bundle_suffix}}.dmg' | ||
path: '${{runner.workspace}}/build/CopyQ.dmg' |