-
Notifications
You must be signed in to change notification settings - Fork 101
128 lines (124 loc) · 4.49 KB
/
deploy-gui.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
name: Build and upload GUI packages
on:
release:
types: [published]
jobs:
build-and-publish-linux-gui:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
env:
DISPLAY: ":99.0"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: setup Ubuntu 20.04
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt install libxcb-xinerama0 libegl-dev -y
- name: setup Ubuntu 22.04
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt install libxcb-xinerama0 libxcb-cursor0 libegl-dev qt6-qpa-plugins -y
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-3.10-Linux.txt
python -m pip install -e .
- name: Build
run: |
source env/bin/activate
python gui/build.py bundle
mv gui/mozregression-gui.tar.gz gui/mozregression-gui-${{ matrix.os }}.tar.gz
ls -alh gui/mozregression-gui-${{ matrix.os }}.tar.gz
- name: Upload
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./gui/mozregression-gui-${{ matrix.os }}.tar.gz
asset_name: mozregression-gui-${{ matrix.os }}.tar.gz
asset_content_type: application/gzip
build-and-publish-mac-gui:
runs-on: macos-latest
env:
# We need the official Python, because the GA ones only support newer macOS versions
# The deployment target is picked up by the Python build tools automatically
PYTHON_VERSION: 3.11.1
MACOSX_DEPLOYMENT_TARGET: 10.13
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Get Python
run: curl https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macos11.pkg -o "python.pkg"
- name: Install Python
# See: https://github.com/actions/virtual-environments/issues/1256#issuecomment-770270252
run: |
sudo installer -pkg python.pkg -target /
python3 -m venv env
source env/bin/activate
which python
python --version
- name: Install dependencies
run: |
source env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-3.11-macOS.txt
python -m pip install -e .
- name: Build
run: |
source env/bin/activate
python gui/build.py bundle
ls -alh gui/mozregression-gui-app-bundle.tar.gz
- name: Upload
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./gui/mozregression-gui-app-bundle.tar.gz
asset_name: mozregression-gui-app-bundle.tar.gz
asset_content_type: application/octet-stream
- name: Print signing manifest
run: |
source env/bin/activate
./bin/adhoc-sign.py --os macOS ${{ github.event.release.tag_name }}
build-and-publish-windows-gui:
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-3.10-Windows.txt
python -m pip install -e .
- name: Build and test
run: |
python gui\build.py bundle --nsis-path "C:\\Program Files (x86)\\NSIS"
python gui\build.py test
- name: Upload
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./gui/wininst/mozregression-gui.exe
asset_name: mozregression-gui-unsigned.exe
asset_content_type: application/octet-stream
- name: Print signing manifest
run: |
python ./bin/adhoc-sign.py --os windows ${{ github.event.release.tag_name }}