24w40a #54
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 Qt CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
project: 'minutor' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
name: [macos-5.9, macos-5.12, macos-5.15] | |
include: | |
- name: macos-5.9 | |
os: macos-12 | |
qt: '5.9.9' | |
- name: macos-5.12 | |
os: macos-12 | |
qt: '5.12.12' | |
- name: macos-5.15 | |
os: macos-latest | |
qt: '5.15.2' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Cache Qt | |
# id: cache-qt | |
# uses: actions/cache@v3 | |
# with: | |
# path: ${{ runner.workspace }}/Qt | |
# key: ${{ runner.os }}-QtCache-${{ matrix.qt }} | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt }} | |
target: 'desktop' | |
# manually-cached: ${{ steps.cache-qt.outputs.cache-hit }} | |
cache: 'true' | |
cache-key-prefix: ${{ runner.os }}-QtCache-${{ matrix.qt }} | |
- name: Create BUILD folder | |
run: | | |
mkdir ../build | |
- name: Build (MacOS) | |
working-directory: ../build | |
run: | | |
qmake ${{ github.workspace }}/${{ env.project }}.pro -early QMAKE_DEFAULT_LIBDIRS=$(xcrun -show-sdk-path)/usr/lib | |
make | |
- name: Deploy Qt (macOS) | |
working-directory: ../build | |
run: | | |
macdeployqt ${{ env.project }}.app -codesign=- -dmg | |
- name: Archive build result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Binary ${{ matrix.name }} | |
path: ${{ runner.workspace }}/build/${{ env.project }}.dmg |