-
-
Notifications
You must be signed in to change notification settings - Fork 5
200 lines (163 loc) · 5.48 KB
/
make-release.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
name: "Build Release"
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
#- cron: '0 0 * * *' # end of each day (nightlies!)
- cron: '0 0 * * 0' # once a week to check if build completes
release:
types:
- created
jobs:
################################
# Normal release version #
################################
build_macPlugin:
name: Build macOS plugin binary
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Build and run CATCH2 tests
run: |
make -C client/mumble-plugin/ CC=g++-11 test
- name: Build Plugin
run: |
make -C client/mumble-plugin/ plugin-macOS
- name: Upload plugin
uses: actions/upload-artifact@main
with:
name: macPlugin
path: client/mumble-plugin/fgcom-mumble-macOS.bundle
retention-days: 1
build_release_package:
name: Build release package
runs-on: ubuntu-latest
needs: build_macPlugin
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Setup submodules
run: |
git submodule init
git submodule update client/mumble-plugin/lib/openssl
git submodule update client/radioGUI/lib/jsimconnect
- name: Setup Java
uses: actions/setup-java@main
with:
java-version: '11' # The JDK version to make available on the path.
distribution: adopt
- name: Setup C++
run: |
sudo apt-get install libssl-dev mingw-w64 mingw-w64-common build-essential
- name: Download mac plugin from job_1
uses: actions/download-artifact@main
with:
name: macPlugin
- name: Add macPlugin to release files
run: |
cp fgcom-mumble-macOS.bundle client/mumble-plugin/
- name: Build release
run: |
make clean plugin
make clean plugin-win64
make clean plugin-win32
make clean release
- name: Get release version
run: |
echo "PACKAGE_VERSION=$(make showVer |grep BUNDLE: |cut -d':' -f2)" >> $GITHUB_ENV
echo "PACKAGE_SHASHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: 'Upload Artifact'
uses: actions/upload-artifact@main
with:
name: fgcom-mumble-${{env.PACKAGE_VERSION}}_${{env.PACKAGE_SHASHORT}}
path: |
*.zip
*.mumble_plugin
retention-days: 7
###############################
# Debug version #
###############################
build_macPlugin-debug:
name: Build macOS plugin binary (debug version)
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Build and run CATCH2 tests
run: |
make -C client/mumble-plugin/ DEBUG+="-g3 -Og -DDEBUG" CC=g++-11 test
- name: Build Plugin
run: |
make -C client/mumble-plugin/ DEBUG+="-g3 -Og -DDEBUG" plugin-macOS
- name: Upload plugin
uses: actions/upload-artifact@main
with:
name: macPlugin-debug
path: client/mumble-plugin/fgcom-mumble-macOS.bundle
retention-days: 1
build_release_package-debug:
name: Build release package (debug version)
runs-on: ubuntu-latest
needs: build_macPlugin-debug
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Setup submodules
run: |
git submodule init
git submodule update client/mumble-plugin/lib/openssl
git submodule update client/radioGUI/lib/jsimconnect
- name: Setup Java
uses: actions/setup-java@main
with:
java-version: '11' # The JDK version to make available on the path.
distribution: adopt
- name: Setup C++
run: |
sudo apt-get install libssl-dev mingw-w64 mingw-w64-common build-essential
- name: Download mac plugin from job_1
uses: actions/download-artifact@main
with:
name: macPlugin-debug
- name: Add macPlugin to release files
run: |
cp fgcom-mumble-macOS.bundle client/mumble-plugin/
- name: Build release
run: |
make DEBUG+="-g3 -Og -DDEBUG" clean plugin
make DEBUG+="-g3 -Og -DDEBUG" clean plugin-win64
make DEBUG+="-g3 -Og -DDEBUG" clean plugin-win32
make DEBUG+="-g3 -Og -DDEBUG" clean release
- name: Get release version
run: |
echo "PACKAGE_VERSION=$(make showVer |grep BUNDLE: |cut -d':' -f2)" >> $GITHUB_ENV
echo "PACKAGE_SHASHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: 'Upload Artifact'
uses: actions/upload-artifact@main
with:
name: fgcom-mumble-${{env.PACKAGE_VERSION}}_${{env.PACKAGE_SHASHORT}}-debug
path: |
*.zip
*.mumble_plugin
retention-days: 7