-
Notifications
You must be signed in to change notification settings - Fork 4
83 lines (71 loc) · 2.47 KB
/
build_macos_arm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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@v4
- 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@master
pip3 install -r assets/requirements.txt
pip install --force-reinstall --no-cache-dir pyside6
pip install urllib3==1.26.6
deactivate
- 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.4-macOS.pkg
cp -r Raidionics-1.2.4-macOS.pkg dist/Raidionics-1.2.4-macOS-arm64.pkg
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: Package
path: ${{github.workspace}}/dist/Raidionics-*
if-no-files-found: error
- name: Cleanup
if: always()
run: |
rm -rf ${{github.workspace}}/tmp/