forked from MeshInspector/MeshLib
-
Notifications
You must be signed in to change notification settings - Fork 0
225 lines (195 loc) · 8.96 KB
/
build-test-distribute.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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
name: Build Test Distribute
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
#UPLOAD_ARTIFACTS condition: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
jobs:
prepare-image:
uses: ./.github/workflows/prepare-images.yml
secrets: inherit
versioning-and-release-url:
uses: ./.github/workflows/versioning-release.yml
with:
version-namespace: ${{ contains(github.event.pull_request.labels.*.name, 'full-ci') && github.event_name != 'push' && 'pr-test' || '' }}
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
secrets:
BUILD_MACHINE_TOKEN: ${{ secrets.BUILD_MACHINE_TOKEN }}
windows-build-test:
needs: [ prepare-image, versioning-and-release-url ]
uses: ./.github/workflows/build-test-windows.yml
with:
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
secrets: inherit
ubuntu20-build-test:
needs: [ prepare-image, versioning-and-release-url ]
uses: ./.github/workflows/build-test-ubuntu20.yml
with:
docker_image_tag: ${{needs.prepare-image.outputs.docker_image_tag}}
app_version: ${{needs.versioning-and-release-url.outputs.app_version}}
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
secrets: inherit
ubuntu-arm64-build-test:
needs: [ prepare-image, versioning-and-release-url ]
uses: ./.github/workflows/build-test-ubuntu-arm64.yml
with:
docker_image_tag: ${{needs.prepare-image.outputs.docker_image_tag}}
app_version: ${{needs.versioning-and-release-url.outputs.app_version}}
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
secrets: inherit
ubuntu22-build-test:
needs: [ prepare-image, versioning-and-release-url ]
uses: ./.github/workflows/build-test-ubuntu22.yml
with:
docker_image_tag: ${{needs.prepare-image.outputs.docker_image_tag}}
app_version: ${{needs.versioning-and-release-url.outputs.app_version}}
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
secrets: inherit
fedora-build-test:
needs: [ prepare-image, versioning-and-release-url ]
uses: ./.github/workflows/build-test-fedora.yml
with:
docker_image_tag: ${{needs.prepare-image.outputs.docker_image_tag}}
app_version: ${{needs.versioning-and-release-url.outputs.app_version}}
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
secrets: inherit
emscripten-build-test:
needs: [ prepare-image, versioning-and-release-url ]
uses: ./.github/workflows/build-test-emscripten.yml
with:
docker_image_tag: ${{needs.prepare-image.outputs.docker_image_tag}}
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
macos-build-test:
needs: [ versioning-and-release-url ]
uses: ./.github/workflows/build-test-macos.yml
with:
app_version: ${{needs.versioning-and-release-url.outputs.app_version}}
UPLOAD_ARTIFACTS: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
secrets: inherit
update-win-version:
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
needs: [ windows-build-test ]
timeout-minutes: 15
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download Windows Binaries Archive
uses: actions/download-artifact@v4
with:
pattern: WindowsArchive*
merge-multiple: true
- name: Extract Windows Binaries
run: |
tar -xvzf MREDist_Release.zip
tar -xvzf MREDist_Debug.zip
- name: Make Install Folder
run: py -3.10 scripts\make_install_folder.py ${{needs.versioning-and-release-url.outputs.app_version}}
- name: Distribute
run: py -3.10 scripts\zip_distribution.py MeshLibDist.zip
- name: Upload Windows Distribution
uses: actions/upload-artifact@v4
with:
name: DistributivesWin
path: MeshLibDist.zip
retention-days: 1
upload-distributions:
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
timeout-minutes: 10
runs-on: ubuntu-latest
needs:
- update-win-version
- ubuntu20-build-test
- ubuntu22-build-test
- ubuntu-arm64-build-test
- fedora-build-test
- emscripten-build-test
- macos-build-test
- versioning-and-release-url
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download All Developer Distributives
uses: actions/download-artifact@v4
with:
pattern: Distributives*
merge-multiple: true
- name: Rename Distributives
run: |
mv MeshLibDist.zip MeshLibDist_${{needs.versioning-and-release-url.outputs.app_version}}.zip
mv meshlib-ubuntu20-dev.deb meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_ubuntu20-dev.deb
mv meshlib-ubuntu22-dev.deb meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_ubuntu22-dev.deb
mv meshlib-ubuntu20-arm64-dev.deb meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_ubuntu20-arm64-dev.deb
mv meshlib-ubuntu22-arm64-dev.deb meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_ubuntu22-arm64-dev.deb
mv meshlib-dev.rpm meshlib_${{needs.versioning-and-release-url.outputs.app_version}}-dev.rpm
mv meshlib_x64.pkg meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_x64.pkg
mv meshlib_arm.pkg meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_arm.pkg
- name: Upload Distributives
run: |
echo ${{ secrets.BUILD_MACHINE_TOKEN }} | gh auth login --with-token
gh release upload ${{needs.versioning-and-release-url.outputs.tag}} \
MeshLibDist_${{needs.versioning-and-release-url.outputs.app_version}}.zip \
meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_ubuntu20-dev.deb \
meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_ubuntu22-dev.deb \
meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_ubuntu20-arm64-dev.deb \
meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_ubuntu22-arm64-dev.deb \
meshlib_${{needs.versioning-and-release-url.outputs.app_version}}-dev.rpm \
meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_x64.pkg \
meshlib_${{needs.versioning-and-release-url.outputs.app_version}}_arm.pkg
test-distribution:
if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'full-ci') }}
needs: [ versioning-and-release-url, upload-distributions ]
uses: ./.github/workflows/test-distribution.yml
with:
release_id: ${{needs.versioning-and-release-url.outputs.release_id}}
update-artifacts:
timeout-minutes: 15
runs-on: ubuntu-20.04
needs: [ upload-distributions ]
if: always()
steps:
# all Windows
- name: Delete Windows Debug Install Archive artifact
uses: geekyeggo/delete-artifact@v4
with:
name: WindowsArchive*
failOnError: false
# Distributives
- name: Delete Distribution
uses: geekyeggo/delete-artifact@v4
with:
name: Distributives*
failOnError: false
- name: Delete Wheelhouse
uses: geekyeggo/delete-artifact@v4
with:
name: Wheelhouse*
failOnError: false
# generate timing logs archive
- name: Download Timing Logs Archive
uses: actions/download-artifact@v4
with:
pattern: Timing_Logs*
merge-multiple: true
- name: Generate Timing Logs Archive
run: tar -cvzf time_log.tar.gz ./*.csv
- name: Upload Timing Logs Archive
uses: actions/upload-artifact@v4
with:
name: time_log
path: time_log.tar.gz
retention-days: 1
- name: Delete Timing Logs Source
uses: geekyeggo/delete-artifact@v4
with:
name: Timing_Logs*
failOnError: false