Skip to content

fix(dependencies): refactor spdlog dependency handling #247

fix(dependencies): refactor spdlog dependency handling

fix(dependencies): refactor spdlog dependency handling #247

Workflow file for this run

name: MacOS Qt6
on:
push:
paths-ignore:
- "README.md"
- "LICENSE"
- "BUILD.md"
pull_request:
paths-ignore:
- "README.md"
- "LICENSE"
- "BUILD.md"
release:
types: [published]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
build_type: [Release, RelWithDebInfo]
arch: [x86_64, arm64]
qt_ver: [6.5.1]
qt_arch: [clang_64]
env:
targetName: lemon
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
cached: ${{ steps.MacosCacheQt.outputs.cache-hit }}
- uses: actions/checkout@v4
with:
submodules: true
- name: macOS - ${{ matrix.qt_version }} - Build preparation - Install Packages
run: |
brew install ninja pkg-config
- name: build macos
run: |
cmake . \
-GNinja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DLEMON_QT6=ON \
-DLEMON_BUILD_INFO="Build for macOS" \
-DLEMON_BUILD_EXTRA_INFO="Build on $(uname -sr)" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.arch }}"
cmake --build . --parallel $(sysctl -n hw.logicalcpu)
# tag 打包
- name: package
env:
Qt6_DIR: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
run: |
# 拷贝依赖
#mv ${targetName} ${targetName}.app
export PATH=$Qt6_DIR/bin:$PATH
macdeployqt ${targetName}.app -qmldir=. -verbose=1 -dmg
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.targetName }}-Qt${{ matrix.qt_ver }}-${{ matrix.build_type }}-${{ matrix.arch }}.dmg
path: ${{ env.targetName }}.dmg
- name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./${{ env.targetName }}.dmg
asset_name: ${{ env.targetName }}-Qt${{ matrix.qt_ver }}-${{ matrix.build_type }}-${{ matrix.arch }}.dmg
tag: ${{ github.ref }}