Mac CI update #68
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: [master, update] | |
pull_request: | |
branches: | |
- '*' | |
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: Collect submodules | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- 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 | |
mv ${{github.workspace}}/downloads/install ${{github.workspace}}/ANTs/ | |
rm ANTsX-v2.4.3_macos.tar.gz | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install matplotlib==3.3.4 | |
pip install -e git+https://github.com/dbouget/raidionics_rads_lib.git@update#egg=raidionicsrads | |
pip install -r assets/requirements.txt | |
- name: Build software | |
run: | | |
pip install pyinstaller | |
mkdir tmp_dependencies | |
pyinstaller --noconfirm --clean assets/main.spec | |
- name: Make installer | |
run: | | |
git clone https://github.com/dbouget/quickpkg.git | |
quickpkg/quickpkg dist/Raidionics.app --output Raidionics-1.2.1-macOS.pkg | |
cp -r Raidionics-1.2.1-macOS.pkg dist/Raidionics-1.2.1-macOS.pkg | |
- name: Upload package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Package | |
path: ${{github.workspace}}/dist/Raidionics-* | |
if-no-files-found: error |