Build macOS ARM #10
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 ARM | |
on: | |
# Allows to run the workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build packages | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Create environment and install python packages | |
run: | | |
cd ${{github.workspace}} | |
mkdir tmp | |
cd tmp | |
python3 -m virtualenv -p python3 venv --clear | |
source venv/bin/activate | |
python3 -m pip install wheel setuptools | |
deactivate | |
- name: Install dependencies | |
run: | | |
cd ${{github.workspace}} | |
source tmp/venv/bin/activate | |
python3 -m pip install --upgrade pip | |
pip3 install ffmpeg | |
pip3 install matplotlib | |
pip install git+https://github.com/dbouget/raidionics_rads_lib.git@macos_arm | |
pip3 install -r assets/requirements.txt | |
pip install --force-reinstall --no-cache-dir pyside6 | |
pip install urllib3==1.26.6 | |
deactivate | |
# - name: Install cmake | |
# run: | | |
# brew update | |
# brew install cmake ninja | |
# ninja --version | |
# cmake --version | |
# | |
# - name: Build ANTs | |
# run: | | |
# cd ${{github.workspace}} | |
# mkdir ANTs | |
# cd ANTs | |
# git clone https://github.com/ANTsX/ANTs.git source | |
# mkdir build | |
# cd build | |
# cmake -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/ANTs/install ../source | |
# make -j4 | |
# cd ANTS-build | |
# make install | |
# cp -R ${{github.workspace}}/ANTs/source/Scripts ${{github.workspace}}/ANTs/install/ | |
- 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 | |
mv ${{github.workspace}}/downloads/install ${{github.workspace}}/ANTs/ | |
- name: Build software | |
run: | | |
cd ${{github.workspace}} | |
source tmp/venv/bin/activate | |
pip3 install pyinstaller==5.13.2 | |
mkdir tmp_dependencies | |
pyinstaller --log-level INFO --noconfirm --clean assets/main_arm.spec | |
- name: Test executable | |
run: ./dist/Raidionics/Raidionics & sleep 5; kill -INT %+ | |
shell: bash | |
- name: Test GUI startup | |
run: cd ${{github.workspace}}/tests && python3 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.1-macOS.pkg | |
cp -r Raidionics-1.2.1-macOS.pkg dist/Raidionics-1.2.1-macOS-arm64.pkg | |
- name: Upload package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Package | |
path: ${{github.workspace}}/dist/Raidionics-* | |
if-no-files-found: error | |
- name: Cleanup | |
if: always() | |
run: | | |
rm -rf ${{github.workspace}}/tmp/ |