-
Notifications
You must be signed in to change notification settings - Fork 4
129 lines (109 loc) · 3.92 KB
/
build_ubuntu.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Build Ubuntu
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
workflow_dispatch:
jobs:
build:
name: Build packages
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Free Up GitHub Actions Ubuntu Runner Disk Space
uses: dbouget/free-disk-space@main
with:
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
tool-cache: false
# All of these default to true, but feel free to set to "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: Install CL dependencies
run: |
apt update && apt install -y sudo
sudo apt install -y clinfo
- name: Setup OpenCL
run: |
sudo add-apt-repository ppa:ocl-icd/ppa
sudo apt update
sudo apt-get install -y pocl-opencl-icd
- name: Setup OpenGL
run: sudo apt install -y '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
- name: Debug clinfo
run: clinfo
- name: Setup X virtual framebuffer
run: sudo apt-get install -y xvfb
- name: Download ANTs
uses: robinraju/release-downloader@main
with:
repository: "raidionics/Raidionics-dependencies"
latest: true
fileName: "ANTsX-v2.4.3_ubuntu.tar.gz"
out-file-path: "downloads"
- name: Extract ANTs
run: |
cd ${{github.workspace}}/downloads/
tar -xzf ANTsX-v2.4.3_ubuntu.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@master
pip install -r assets/requirements.txt
pip uninstall -y PySide6 PySide6-Addons PySide6-Essentials
pip install --force-reinstall --no-cache-dir pyside6==6.2.4
- name: Integration tests
env:
DISPLAY: ':99.0'
run: |
pip install pytest-qt pytest-cov
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
pytest --cov=gui --cov=utils ${{github.workspace}}/integration_tests
- 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 xvfb
env:
DISPLAY: ':1'
run: xvfb-run ./dist/Raidionics/Raidionics & sleep 5; kill -INT %+
shell: bash
- 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: |
mkdir -p assets/Raidionics_ubuntu/usr/local/bin
cp -r dist/Raidionics assets/Raidionics_ubuntu/usr/local/bin
dpkg-deb --build --root-owner-group assets/Raidionics_ubuntu
ls -la
cp -r assets/Raidionics_ubuntu.deb dist/Raidionics-1.3.0-ubuntu.deb
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: Package
path: ${{github.workspace}}/dist/Raidionics-*
if-no-files-found: error
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4