Skip to content

Build macOS ARM

Build macOS ARM #56

Workflow file for this run

name: Build macOS ARM
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
# Allows to run the workflow manually from the Actions tab
workflow_dispatch:
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
jobs:
build:
name: Build packages
runs-on: macos-14
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"
# - name: Setup OpenGL
# run: brew install mesa-glu libxi libxkbcommon
- name: Download ANTs
uses: robinraju/release-downloader@main
with:
repository: "raidionics/Raidionics-dependencies"
latest: true
fileName: "ANTsX-v2.4.3_macos_arm.tar.gz"
out-file-path: "downloads"
- name: Extract ANTs
run: |
cd ${{github.workspace}}/downloads/
tar -xzf ANTsX-v2.4.3_macos_arm.tar.gz -C ${{github.workspace}}/downloads/
mkdir ${{github.workspace}}/ANTs
mkdir ${{github.workspace}}/ANTs/install
# mv ${{github.workspace}}/downloads/install ${{github.workspace}}/ANTs/
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install raidionicsrads
pip install -r assets/requirements.txt
pip install matplotlib
pip install --force-reinstall --no-cache-dir pyside6
# - name: Integration tests
# timeout-minutes: 10
# env:
# DISPLAY: ':99.0'
# run: |
# pip install pytest-qt pytest-cov pytest-timeout
# pytest -vvv --cov=gui --cov=utils ${{github.workspace}}/integration_tests --timeout=120 --timeout-method=thread --log-cli-level=DEBUG
- name: Clean build artifacts
run: |
rm -rf build dist __pycache__
- name: Build software
run: |
pip install pyinstaller
mkdir tmp_dependencies
python -c "import sys; sys.setrecursionlimit(5000); print('Recursion limit during build:', sys.getrecursionlimit())"
python build_launcher.py
# pyinstaller --log-level INFO --noconfirm --clean assets/main_arm.spec
# - name: Test executable
# env:
# DISPLAY: ':1'
# run: QT_QPA_PLATFORM="offscreen" ./dist/Raidionics/Raidionics & sleep 5; kill -INT %+
# shell: bash
#
# - name: Test GUI startup
# env:
# DISPLAY: ':1'
# run: |
# export QT_QPA_PLATFORM="offscreen"
# cd ${{github.workspace}}/tests && python software_launch_test.py
- name: Make installer
run: |
git clone https://github.com/dbouget/quickpkg.git
quickpkg/quickpkg dist/Raidionics.app --output Raidionics-1.3.1-macOS.pkg
cp -r Raidionics-1.3.1-macOS.pkg dist/Raidionics-1.3.1-macOS-arm64.pkg
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: Package
path: ${{github.workspace}}/dist/Raidionics-*
if-no-files-found: error