forked from Dioptas/Dioptas
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (67 loc) · 2.72 KB
/
build_linux.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
# This is a basic workflow to help you get started with Actions
name: CD_LINUX
on: [push]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_linux:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
- name: Setup Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Use Python Dependency Cache
id: pip-cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('Dioptas.spec') }}-c2
restore-keys: |
${{ runner.os }}-pip-c2
- name: Install Apt Dependencies
run: |
sudo apt-get update
sudo apt-get install libxkbcommon-x11-0 libxkbcommon-x11-dev libxcb-xinerama0 \
libxkbcommon-dev libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev \
libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev \
libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev \
libxcb-randr0-dev libxcb-render-util0-dev
- name: Install Pip Dependencies
run: |
pip install pycifrw pandas python-dateutil h5py scikit-image pyqt5 cython future qtpy pyfai lmfit \
pyepics extra_data pyinstaller watchdog pyopengl pyopengl-accelerate h5py hdf5plugin pyqtgraph \
sharedmem
- name: Compile Smooth Bruckner
run: cythonize -a -i dioptas/model/util/smooth_bruckner_cython.pyx
- name: Run Dioptas from source to test and create version file
run: xvfb-run python Dioptas.py test
- name: Run PyInstaller
run: bash create_executable.sh
- name: Clean Up Executable Folder
run: |
cd dist/Dioptas*
rm libQt5Quick.so.5 libQt5Qml.so.5 libQt5Network.so.5 libcrypto.so.1.1 libsqlite3.so.0
rm -r imageio
- name: Run Dioptas
run: |
cd dist/Dioptas*
xvfb-run ./Dioptas test
- name: Compress Executable
run: |
cd dist
export DIOPTAS_FOLDER=$(ls | grep Dioptas)
tar -zcvf $DIOPTAS_FOLDER.tar.gz $DIOPTAS_FOLDER
du -sh $DIOPTAS_FOLDER.tar.gz
- name: Upload Compressed App to Dropbox
env:
DROPBOX_TOKEN: ${{ secrets.DROPBOX_TOKEN }}
run: |
pip install dropbox
cd dist
export compressedFile=$(ls | grep .tar.gz)
export targetFile='/develop/linux/'$compressedFile
python ../scripts/dropbox_upload.py $compressedFile $targetFile