-
Notifications
You must be signed in to change notification settings - Fork 32
133 lines (132 loc) · 4.13 KB
/
actions.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
130
131
132
133
---
name: Build NSO-RPC - x86_64
on:
release:
types:
- published
pull_request:
types:
- opened
- synchronize
jobs:
build-windows:
name: Build NSO-RPC - Windows
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
pyqt_version:
- pyqt6
- pyqt5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4
- name: Build
run: |
python -m pip install ${{ matrix.pyqt_version }} &&
cd scripts &&
./build.bat
- name: Rename executable
if: matrix.pyqt_version == 'pyqt5'
run: mv client/dist/NSO-RPC.exe client/dist/NSO-RPC-qt5.exe
- name: Upload Build
if: github.event_name != 'pull_request'
uses: softprops/[email protected]
with:
files: |
client/dist/NSO-RPC*.exe
build-linux:
name: Build NSO-RPC - Linux
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4
- name: Upload script
run: |
cd scripts &&
chmod +x linux.sh
continue-on-error: false
- name: Upload Build
if: github.event_name != 'pull_request'
uses: softprops/[email protected]
with:
files: scripts/linux.sh
build-macos:
name: Build NSO-RPC - MacOS
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4
# We initially use `arch -x86_64` to ensure that we use an x86_64 version
# of Python, regardless of the host architecture.
# Subsequent invocations will all use the x86_64 `python3` binary within the venv.
- name: Build
run: >
cd scripts &&
arch -x86_64 /bin/bash ./build.sh &&
cd ../client/dist &&
arch -x86_64 /bin/bash ../../scripts/tests/macos_test.sh &&
rm output.log &&
ln -s /Applications "Applications (admin)" &&
hdiutil create -fs HFS+ -srcfolder . -volname NSO-RPC mac-installer.dmg &&
zip -yr mac-portable.zip NSO-RPC.app/
- name: Upload Build
if: github.event_name != 'pull_request'
uses: softprops/[email protected]
with:
files: |
client/dist/mac-installer.dmg
client/dist/mac-portable.zip
build-universal2:
name: Build NSO-RPC - Universal2
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11.4
- name: Install Python 3.11.4 and build NSO-RPC
run: >
curl https://www.python.org/ftp/python/3.11.4/python-3.11.4-macos11.pkg -o python-3.11.4-macos11.pkg &&
sudo installer -verbose -pkg python-3.11.4-macos11.pkg -target / &&
alias python3=python3.11 &&
cd scripts/macos-universal2 &&
bash ./build.sh &&
cd ../../client/dist &&
bash ../../scripts/tests/macos_test.sh &&
rm output.log &&
ln -s /Applications "Applications (admin)" &&
hdiutil create -fs HFS+ -srcfolder . -volname NSO-RPC mac-universal2-installer.dmg &&
zip -yr mac-universal2-portable.zip NSO-RPC.app/
- name: Upload NSO-RPC Universal2 Build
if: github.event_name != 'pull_request'
uses: softprops/[email protected]
with:
files: |
client/dist/mac-universal2-installer.dmg
client/dist/mac-universal2-portable.zip
get-hashes:
name: Generate Checksums
runs-on: ubuntu-22.04
needs:
- build-windows
- build-linux
- build-macos
- build-universal2
if: github.event_name != 'pull_request'
steps:
- name: Generate checksums.txt
uses: MCJack123/ghaction-generate-release-hashes@v4
with:
hash-type: sha256
file-name: checksums.txt
get-assets: true
- uses: softprops/[email protected]
with:
files: checksums.txt