-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (69 loc) · 2.54 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
77
78
79
80
81
name: Build SimpleDDNetAutomapper
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.10', '3.11']
architecture: ['x64']
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Install Missing libs
if: matrix.os == 'ubuntu-latest'
run: |
: # https://askubuntu.com/questions/1485442/issue-with-installing-pyqt6-on-ubuntu-22-04
: # https://stackoverflow.com/questions/68036484/qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it/68058308#68058308
: # I am not having fun here
sudo apt update
sudo apt-get install -y libegl1
sudo apt-get install -y libxcb-xinerama0 libxcb-cursor0
sudo apt-get install -y -qq libglu1-mesa-dev libx11-xcb-dev '^libxcb*'
sudo apt-get install -y libxkbcommon-dev libxkbcommon-x11-dev '^libxcb.*-dev'
- name: Install PyQt
run: pip install -r requirements.txt
- name: Build Executable for Linux
if: matrix.os == 'ubuntu-latest'
run: |
pyinstaller -F viewer.py
mv dist/viewer dist/viewer_linux_python_${{ matrix.python-version }}
cp -r data dist/data
- name: Test Executable for Linux
if: matrix.os == 'DISABLED'
run: |
./dist/viewer_linux_python_${{ matrix.python-version }} &
VIEWER_PID=$!
sleep 10
kill $VIEWER_PID
- name: Build Executable for Windows
if: matrix.os == 'windows-latest'
run: |
pyinstaller -F viewer.py
mv dist/viewer.exe dist/viewer_win64_python_${{ matrix.python-version }}.exe
cp -r data dist/data
- name: Test Executable for Windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
$process = Start-Process -FilePath "dist/viewer_win64_python_${{ matrix.python-version }}.exe" -PassThru
Start-Sleep -Seconds 10
$process.Kill()
- name: Upload Artifacts
if: matrix.python-version == '3.11'
uses: actions/upload-artifact@v4
with:
name: simple_ddnet_automapper_${{ matrix.os }}_${{ matrix.architecture }}
path: dist/