Build macOS #104
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: Build macOS | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
workflow_dispatch: | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 10.15 | |
jobs: | |
build: | |
name: Build packages | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Setup OpenGL | |
run: brew install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev | |
- name: Download ANTs | |
uses: robinraju/release-downloader@main | |
with: | |
repository: "raidionics/Raidionics-dependencies" | |
latest: true | |
fileName: "ANTsX-v2.4.3_macos.tar.gz" | |
out-file-path: "downloads" | |
- name: Extract ANTs | |
run: | | |
cd ${{github.workspace}}/downloads/ | |
tar -xzf ANTsX-v2.4.3_macos.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 git+https://github.com/dbouget/raidionics_rads_lib.git@software | |
pip install -r assets/requirements.txt | |
pip install matplotlib==3.3.4 | |
pip install --force-reinstall --no-cache-dir pyside6 | |
- name: Build software | |
run: | | |
pip install pyinstaller==5.13.2 | |
mkdir tmp_dependencies | |
pyinstaller --log-level INFO --noconfirm --clean assets/main.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: 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.2.2-macOS.pkg | |
cp -r Raidionics-1.2.2-macOS.pkg dist/Raidionics-1.2.2-macOS-x86_64.pkg | |
- name: Upload package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Package | |
path: ${{github.workspace}}/dist/Raidionics-* | |
if-no-files-found: error |