-
Notifications
You must be signed in to change notification settings - Fork 17
76 lines (65 loc) · 2.11 KB
/
build.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
name: Python package
on:
push:
branches:
- main
jobs:
build:
env:
PYTHONIOENCODING: utf-8
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
python scripts/render_templates.py
- name: Package application (MacOS)
if: runner.os == 'macOS'
run: |
virtualenv venv
source venv/bin/activate
maturin develop --release
pyinstaller -F -n paragon -i paragon.ico paragon/ui/main.py
rm -rf dist/paragon.app
cp paragon.ico dist/paragon.ico
cp -R Data dist/Data
cp -R resources dist/resources
cp -R third-party-licenses dist/third-party-licenses
cp -R LICENSE.txt dist/LICENSE.txt
- name: Package application (Windows)
if: runner.os == 'Windows'
run: |
virtualenv venv
.\package.bat
- name: Package application (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libxkbcommon-x11-0
virtualenv venv
source venv/bin/activate
maturin develop --release
pyinstaller -F -n paragon -i paragon.ico paragon/ui/main.py
cp paragon.ico dist/paragon.ico
cp -R Data dist/Data
cp -R resources dist/resources
cp -R third-party-licenses dist/third-party-licenses
cp -R LICENSE.txt dist/LICENSE.txt
- uses: actions/upload-artifact@v2
with:
name: Paragon-${{ runner.os }}
path: dist