-
Notifications
You must be signed in to change notification settings - Fork 2
408 lines (392 loc) · 16.9 KB
/
XmsMesher-CI.yaml
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
name: XmsMesher-5
on:
push:
pull_request:
schedule:
- cron: "0 12 * * 1"
jobs:
# ----------------------------------------------------------------------------------------------
# FLAKE
# ----------------------------------------------------------------------------------------------
flake:
name: Flake Project
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
python-version: ['3.10']
steps:
# Checkout Sources
- name: Checkout Source
uses: actions/checkout@v2
# Setup Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install Python Dependencies
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 flake8-docstrings flake8-bugbear flake8-import-order pep8-naming
# Flake Code
- name: Run Flake
run: |
flake8 --exclude .tox,.git,__pycache__,_package/tests/files/*,pydocs/source/conf.py,build,dist,tests/fixtures/*,*.pyc,*.egg-info,.cache,.eggs --ignore=D200,D212 --max-line-length=120 --docstring-convention google --isolated --import-order-style=appnexus --application-import-names=xms.mesher --application-package-names=xms --count --statistics _package
# ----------------------------------------------------------------------------------------------
# MAC
# ----------------------------------------------------------------------------------------------
mac:
name: Clang-14.0 (${{ matrix.build_type }}, ${{ matrix.python-version }}, Macos)
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [macos-13]
python-version: ['3.10']
build_type: [Release, Debug]
env:
# Library Variables
LIBRARY_NAME: xmsmesher
XMS_VERSION: 5.0.0
# Conan Variables
CONAN_REFERENCE: xmsmesher/5.0.0
CONAN_ARCHS: x86_64
CONAN_USERNAME: aquaveo
CONAN_CHANNEL: testing
CONAN_STABLE_BRANCH_PATTERN: 'we_should_never_use_this_string_for_a_branch_name'
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER_SECRET }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD_SECRET }}
CONAN_REMOTES: https://conan.aquaveo.com
CONAN_BUILD_TYPES: ${{ matrix.build_type }}
CONAN_APPLE_CLANG_VERSIONS: '14.0'
# Aquapi Variables
AQUAPI_USERNAME: ${{ secrets.AQUAPI_USERNAME_SECRET }}
AQUAPI_PASSWORD: ${{ secrets.AQUAPI_PASSWORD_SECRET }}
AQUAPI_URL: ${{ secrets.AQUAPI_URL_DEV }}
# Python Variables
PYTHON_TARGET_VERSION: ${{ matrix.python-version }}
RELEASE_PYTHON: 'False'
steps:
# Get Correct Version of Xcode
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 14.3.1
# Checkout Sources
- name: Checkout Source
uses: actions/checkout@v2
# Setup Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install Python Dependencies
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install pyYAML==5.3.1 conan==1.60.0 conan-package-tools==0.39.0 devpi-client wheel MarkupSafe==2.0.0
python -m pip install -i https://public.aquapi.aquaveo.com/aquaveo/stable/+simple/ "xmsconan>=1.0.4,<2"
# Setup Conan
- name: Setup Conan Directory
run: conan user
- name: Set Conan Path
run: |
echo "CONAN_PATH=$(conan config get storage.path)" >> $GITHUB_ENV
# Get Tag Name (ONLY RUNS ON TAGS)
- name: Get Tag
id: gitTag
uses: little-core-labs/[email protected]
if: startsWith(github.ref, 'refs/tags/')
# Set Conan Version (ONLY RUNS ON TAGS)
- name: Set Conan Version
uses: allenevans/[email protected]
with:
CONAN_REFERENCE: 'xmsmesher/${{ steps.gitTag.outputs.tag }}'
XMS_VERSION: ${{ steps.gitTag.outputs.tag }}
CONAN_UPLOAD: https://conan.aquaveo.com
RELEASE_PYTHON: 'True'
if: startsWith(github.ref, 'refs/tags/')
# Check for release branch
- name: Get Branch Name
id: gitBranch
uses: nelonoel/[email protected]
- name: Change Channel and URL if Release Branch
uses: allenevans/[email protected]
with:
CONAN_CHANNEL: stable
AQUAPI_URL: ${{ secrets.AQUAPI_URL_STABLE }}
if: startsWith(github.ref, 'refs/tags/') && startsWith(env.BRANCH_NAME, ${{ env.XMS_VERSION }})
# Build the Conan Package
- name: Build the Conan Packages
run: python build.py
# Zip Built Conan Packages
- name: Zip Conan Packages
run: |
tar czf ${{ github.workspace }}/${{ matrix.platform }}-Clang${{ matrix.compiler-version }}-${{ matrix.build_type }}.tar.gz ${{ env.CONAN_PATH }}/${{ env.LIBRARY_NAME }}/${{ env.XMS_VERSION }}/aquaveo/${{ env.CONAN_CHANNEL}}/package
- name: Add Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.platform }}-Clang${{ matrix.compiler-version }}-${{ matrix.build_type }}
path: ${{ github.workspace }}/${{ matrix.platform }}-Clang${{ matrix.compiler-version }}-${{ matrix.build_type }}.tar.gz
# Get the Release Data
- name: Get Release
id: git_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.AQUAVEO_GITHUB_TOKEN }}
if: startsWith(github.ref, 'refs/tags/')
# Upload Zipped Conan Packages
- name: Upload Zipped Conan Packages
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.AQUAVEO_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.git_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ matrix.platform }}-Clang${{ matrix.compiler-version }}-${{ matrix.build_type }}.tar.gz
asset_name: ${{ matrix.platform }}-Clang${{ matrix.compiler-version }}-${{ matrix.build_type }}.tar.gz
asset_content_type: application/zip
if: startsWith(github.ref, 'refs/tags/')
# ----------------------------------------------------------------------------------------------
# LINUX
# ----------------------------------------------------------------------------------------------
linux:
name: GCC-${{ matrix.compiler-version }} (${{ matrix.build_type }}, ${{ matrix.python-version }}, Linux)
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
python-version: ['3.10']
compiler-version: [7]
build_type: [Release, Debug]
env:
# Library Variables
LIBRARY_NAME: xmsmesher
XMS_VERSION: 5.0.0
# Conan Variables
CONAN_REFERENCE: xmsmesher/5.0.0
CONAN_ARCHS: x86_64
CONAN_USERNAME: aquaveo
CONAN_CHANNEL: testing
CONAN_STABLE_BRANCH_PATTERN: 'we_should_never_use_this_string_for_a_branch_name'
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER_SECRET }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD_SECRET }}
CONAN_REMOTES: https://conan.aquaveo.com
CONAN_BUILD_TYPES: ${{ matrix.build_type }}
CONAN_GCC_VERSIONS: ${{ matrix.compiler-version }}
CONAN_DOCKER_IMAGE: docker.aquaveo.com/aquaveo/conan-docker/conan-gcc${{ matrix.compiler-version }}-py${{ matrix.python-version }}:latest
CONAN_PIP_INSTALL: 'conan-package-tools==0.35.1'
CONAN_PIP_PACKAGE: 'conan==1.41.0'
# Aquapi Variables
AQUAPI_USERNAME: ${{ secrets.AQUAPI_USERNAME_SECRET }}
AQUAPI_PASSWORD: ${{ secrets.AQUAPI_PASSWORD_SECRET }}
AQUAPI_URL: ${{ secrets.AQUAPI_URL_DEV }}
# Python Variables
PYTHON_TARGET_VERSION: ${{ matrix.python-version }}
RELEASE_PYTHON: 'False'
steps:
# Checkout Sources
- name: Checkout Source
uses: actions/checkout@v2
# Setup Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install Python Dependencies
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install pyYAML==5.3.1 conan==1.41.0 conan-package-tools==0.35.1 devpi-client wheel MarkupSafe==2.0.0
python -m pip install -i https://public.aquapi.aquaveo.com/aquaveo/stable/+simple/ "xmsconan>=1.0.4,<2"
# Login to Aquaveo Docker
- name: Login to Aquaveo Docker
run: sudo -E docker login -u ${{ secrets.AQUAVEO_DOCKER_USERNAME_SECRET }} -p ${{ secrets.AQUAVEO_DOCKER_TOKEN }} docker.aquaveo.com
shell: bash
# Setup Conan
- name: Setup Conan Directory
run: conan user
- name: Set Conan Path
run: |
echo "CONAN_PATH=$(conan config get storage.path)" >> $GITHUB_ENV
mkdir -p $(conan config get storage.path)
- name: Set Conan Docker Options
uses: allenevans/[email protected]
with:
CONAN_DOCKER_RUN_OPTIONS: "-v '${{ env.CONAN_PATH }}:/home/conan/.conan/data'"
# Get Tag Name
- name: Get Tag
id: gitTag
uses: little-core-labs/[email protected]
if: startsWith(github.ref, 'refs/tags/')
# Set Conan Version
- name: Set Conan Version
uses: allenevans/[email protected]
with:
CONAN_REFERENCE: 'xmsmesher/${{ steps.gitTag.outputs.tag }}'
XMS_VERSION: ${{ steps.gitTag.outputs.tag }}
CONAN_UPLOAD: https://conan.aquaveo.com
RELEASE_PYTHON: 'True'
if: startsWith(github.ref, 'refs/tags/')
# Check for release branch
- name: Get Branch Name
id: gitBranch
uses: nelonoel/[email protected]
- name: Change Channel and URL if Release Branch
uses: allenevans/[email protected]
with:
CONAN_CHANNEL: stable
AQUAPI_URL: ${{ secrets.AQUAPI_URL_STABLE }}
if: startsWith(github.ref, 'refs/tags/') && startsWith(env.BRANCH_NAME, ${{ env.XMS_VERSION }})
# Build the Conan Package
- name: Build the Conan Packages
run: |
chmod -R 777 ${{ env.CONAN_PATH }}
python build.py
# Zip Conan Package
- name: Zip Conan Packages
run: |
tar czf ${{ github.workspace }}/${{ matrix.platform }}-GCC${{ matrix.compiler-version }}-${{ matrix.build_type }}.tar.gz ${{ env.CONAN_PATH }}/${{ env.LIBRARY_NAME }}/${{ env.XMS_VERSION }}/aquaveo/${{ env.CONAN_CHANNEL}}/package
- name: Add Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.platform }}-Clang${{ matrix.compiler-version }}-${{ matrix.build_type }}
path: ${{ github.workspace }}/${{ matrix.platform }}-GCC${{ matrix.compiler-version }}-${{ matrix.build_type }}.tar.gz
# Get the Release Data
- name: Get Release
id: git_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.AQUAVEO_GITHUB_TOKEN }}
if: startsWith(github.ref, 'refs/tags/')
# Upload Zipped Conan Packages
- name: Upload Zipped Conan Packages
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.AQUAVEO_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.git_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ matrix.platform }}-GCC${{ matrix.compiler-version }}-${{ matrix.build_type }}.tar.gz
asset_name: ${{ matrix.platform }}-GCC${{ matrix.compiler-version }}-${{ matrix.build_type }}.tar.gz
asset_content_type: application/zip
if: startsWith(github.ref, 'refs/tags/')
# ----------------------------------------------------------------------------------------------
# WINDOWS
# ----------------------------------------------------------------------------------------------
windows:
name: Visual Studio ${{ matrix.compiler-version }} (${{ matrix.build_type }}, ${{ matrix.python-version }}, Windows)
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-2019]
python-version: ['3.10']
compiler-version: [16]
build_type: [Release, Debug]
env:
MATRIX_NAME: ${{ matrix.platform }}-VS${{ matrix.compiler-version }}-${{ matrix.build_type }}
# Library Variables
LIBRARY_NAME: xmsmesher
XMS_VERSION: 5.0.0
# Conan Variables
CONAN_REFERENCE: xmsmesher/5.0.0
CONAN_ARCHS: x86_64
CONAN_USERNAME: aquaveo
CONAN_CHANNEL: testing
CONAN_STABLE_BRANCH_PATTERN: 'we_should_never_use_this_string_for_a_branch_name'
CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_USER_SECRET }}
CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD_SECRET }}
CONAN_REMOTES: https://conan.aquaveo.com
CONAN_BUILD_TYPES: ${{ matrix.build_type }}
CONAN_VISUAL_VERSIONS: ${{ matrix.compiler-version }}
# Aquapi Variables
AQUAPI_USERNAME: ${{ secrets.AQUAPI_USERNAME_SECRET }}
AQUAPI_PASSWORD: ${{ secrets.AQUAPI_PASSWORD_SECRET }}
AQUAPI_URL: ${{ secrets.AQUAPI_URL_DEV }}
# Python Variables
PYTHON_TARGET_VERSION: ${{ matrix.python-version }}
RELEASE_PYTHON: 'False'
steps:
# Checkout Sources
- name: Checkout Source
uses: actions/checkout@v2
# Setup Python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install Python Dependencies
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install pyYAML==5.3.1 conan==1.41.0 conan-package-tools==0.35.1 devpi-client wheel MarkupSafe==2.0.0
python -m pip install -i https://public.aquapi.aquaveo.com/aquaveo/stable/+simple/ "xmsconan>=1.0.4,<2"
# Setup Visual Studio
- name: Setup Visual Studio
uses: microsoft/[email protected]
with:
vs-version: ${{ matrix.compiler-version }}
# Setup Conan
- name: Setup Conan Directory
run: conan user
shell: cmd
- name: Set Conan Path
run: |
echo "CONAN_PATH=$(conan config get storage.path)" >> $env:GITHUB_ENV
shell: powershell
# Get Tag Name
- name: Get Tag
id: gitTag
uses: little-core-labs/[email protected]
if: startsWith(github.ref, 'refs/tags/')
# Set Conan Version
- name: Set Conan Version
uses: allenevans/[email protected]
with:
CONAN_REFERENCE: 'xmsmesher/${{ steps.gitTag.outputs.tag }}'
XMS_VERSION: ${{ steps.gitTag.outputs.tag }}
CONAN_UPLOAD: https://conan.aquaveo.com
RELEASE_PYTHON: 'True'
if: startsWith(github.ref, 'refs/tags/')
# Check for release branch
- name: Get Branch Name
id: gitBranch
uses: nelonoel/[email protected]
- name: Change Channel and URL if Release Branch
uses: allenevans/[email protected]
with:
CONAN_CHANNEL: stable
AQUAPI_URL: ${{ secrets.AQUAPI_URL_STABLE }}
if: startsWith(github.ref, 'refs/tags/') && startsWith(env.BRANCH_NAME, ${{ env.XMS_VERSION }})
# Build the Conan Package
- name: Build the Conan Packages
run: python build.py
shell: cmd
# Zip Packages
- name: Zip Conan Packages
run: |
tar czf ${{ github.workspace }}/${{ env.MATRIX_NAME }}.tar.gz ${{ env.CONAN_PATH }}/${{ env.LIBRARY_NAME }}/${{ env.XMS_VERSION }}/aquaveo/${{ env.CONAN_CHANNEL}}/package
- name: Add Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ env.MATRIX_NAME }}
path: ${{ github.workspace }}/${{ env.MATRIX_NAME }}.tar.gz
# Get the Release Data
- name: Get Release
id: git_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.AQUAVEO_GITHUB_TOKEN }}
if: startsWith(github.ref, 'refs/tags/')
# Upload Zipped Conan Packages
- name: Upload Zipped Conan Packages
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.AQUAVEO_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.git_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/${{ env.MATRIX_NAME }}.tar.gz
asset_name: ${{ env.MATRIX_NAME }}.tar.gz
asset_content_type: application/zip
if: startsWith(github.ref, 'refs/tags/')