Skip to content

Commit

Permalink
CI: run macOS build for x64/arm64 CPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
HuguesDelorme committed Jan 24, 2025
1 parent 9bfe06e commit 88b146b
Showing 1 changed file with 5 additions and 29 deletions.
34 changes: 5 additions & 29 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,23 @@ jobs:
build-macos:
strategy:
matrix:
qt_version: [5.15, 6.7]
qt_version_major: [5, 6]
os: [macos-latest-large, macos-latest-xlarge]

runs-on: ${{matrix.os}}
name: build-macos-qt${{matrix.qt_version}}
name: build-${{matrix.os}}-qt${{matrix.qt_version_major}}

steps:
- name: Set globals
id: globals
run: |
QT_VERSION_MAJOR=$(echo ${{matrix.qt_version}} | cut -d. -f1)
echo qt_version_major=$QT_VERSION_MAJOR >> ${GITHUB_OUTPUT}
echo qt_path=$(brew --prefix qt@$QT_VERSION_MAJOR) >> ${GITHUB_OUTPUT}
if [[ ${{matrix.os}} =~ "-large" ]]; then
echo arch=x64 >> ${GITHUB_OUTPUT}
elif [[ ${{matrix.os}} =~ "-xlarge" ]]; then
echo arch=arm64 >> ${GITHUB_OUTPUT}
fi
echo qt_path=$(brew --prefix qt@${{matrix.qt_version_major}}) >> ${GITHUB_OUTPUT}
- name: Checkout
uses: actions/checkout@v2

- name: Install Qt
run: brew install qt@${{steps.globals.outputs.qt_version_major}}
run: brew install qt@${{matrix.qt_version_major}}

- name: Install OpenCascade
run: brew install opencascade
Expand All @@ -49,7 +42,7 @@ jobs:
cmake .. \
-DMayo_BuildTests=ON \
-DMayo_BuildPluginAssimp=ON \
-DQT_DIR=${{steps.globals.outputs.qt_path}}/lib/cmake/Qt${{steps.globals.outputs.qt_version_major}}
-DQT_DIR=${{steps.globals.outputs.qt_path}}/lib/cmake/Qt${{matrix.qt_version_major}}
cmake --build . \
--config Release \
--parallel ${{steps.cpu-cores.outputs.count}}
Expand All @@ -58,20 +51,3 @@ jobs:
working-directory: ${{github.workspace}}/build
run: |
./mayo.app/Contents/MacOS/mayo --runtests
- name: Create dmg file
if: ${{steps.globals.outputs.qt_version_major}} == '6'
working-directory: ${{github.workspace}}/build
run: |
${{steps.globals.outputs.qt_path}}/bin/macdeployqt mayo.app -dmg
mv mayo.dmg Mayo-0.9.0-macOS-${{steps.globals.outputs.arch}}.dmg
- name: Upload dmg file
if: ${{steps.globals.outputs.qt_version_major}} == '6'
uses: actions/upload-artifact@v4
with:
name: Mayo-0.9.0-macOS-${{steps.globals.outputs.arch}}-dmg
path: |
${{github.workspace}}/build/Mayo-0.9.0-macOS-${{steps.globals.outputs.arch}}.dmg
#${{github.workspace}}/build/MayoConv-0.9.0-macOS-${{steps.globals.outputs.arch}}.dmg

0 comments on commit 88b146b

Please sign in to comment.