-
Notifications
You must be signed in to change notification settings - Fork 304
715 lines (648 loc) · 36.9 KB
/
build-assets.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
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
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
name: Build Assets
env:
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,read"
VCPKG_NUGET_REPOSITORY: "https://github.com/hpcc-systems/vcpkg"
on:
push:
tags:
- "*"
- "community_*"
- "!community_8.10.*"
- "!community_8.8.*"
- "!community_8.6.*"
- "!community_8.4.*"
- "!community_8.2.*"
- "!community_8.0.*"
- "!community_7.*"
jobs:
preamble:
name: Publish Release
runs-on: ubuntu-22.04
permissions:
contents: write
outputs:
folder_platform: ${{ steps.vars.outputs.folder_platform }}
mount_platform: ${{ steps.vars.outputs.mount_platform }}
folder_ln: ${{ steps.vars.outputs.folder_ln }}
mount_ln: ${{ steps.vars.outputs.mount_ln }}
folder_build: ${{ steps.vars.outputs.folder_build }}
mount_build: ${{ steps.vars.outputs.mount_build }}
community_ref: ${{ steps.vars.outputs.community_ref }}
internal_ref: ${{ steps.vars.outputs.internal_ref }}
eclide_ref: ${{ steps.vars.outputs.eclide_ref }}
community_tag: ${{ steps.vars.outputs.community_tag }}
internal_tag: ${{ steps.vars.outputs.internal_tag }}
hpcc_version: ${{ steps.vars.outputs.hpcc_version }}
candidate_base_branch: ${{ steps.vars.outputs.candidate_base_branch }}
candidate_branch: ${{ steps.vars.outputs.candidate_branch }}
cmake_docker_config: ${{ steps.vars.outputs.cmake_docker_config }}
gpg_import: ${{ steps.vars.outputs.gpg_import }}
steps:
- name: Calculate vars
id: vars
run: |
echo "folder_platform=${{ github.workspace }}/HPCC-Platform" >> $GITHUB_OUTPUT
echo 'mount_platform=source="${{ github.workspace }}/HPCC-Platform",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached' >> $GITHUB_OUTPUT
echo "folder_ln=${{ github.workspace }}/LN" >> $GITHUB_OUTPUT
echo 'mount_ln=source="${{ github.workspace }}/LN",target=/hpcc-dev/LN,type=bind,consistency=cached' >> $GITHUB_OUTPUT
echo "folder_build=${{ github.workspace }}/build" >> $GITHUB_OUTPUT
echo 'mount_build=source="${{ github.workspace }}/build",target=/hpcc-dev/build,type=bind,consistency=cached' >> $GITHUB_OUTPUT
community_ref=${{ github.ref }}
echo "community_ref=$community_ref" >> $GITHUB_OUTPUT
echo "internal_ref=$(echo $community_ref | sed 's/community/internal/')" >> $GITHUB_OUTPUT
echo "eclide_ref=$(echo $community_ref | sed 's/community/eclide/')" >> $GITHUB_OUTPUT
community_tag=$(echo $community_ref | cut -d'/' -f3)
echo "community_tag=$community_tag" >> $GITHUB_OUTPUT
echo "internal_tag=$(echo $community_tag | sed 's/community/internal/')" >> $GITHUB_OUTPUT
echo "hpcc_version=$(echo $community_tag | sed 's/community_//' | sed 's/-[0-9]$//')" >> $GITHUB_OUTPUT
community_base_ref=${{ github.event.base_ref || github.ref }}
candidate_branch=$(echo $community_base_ref | cut -d'/' -f3)
echo "candidate_branch=$candidate_branch" >> $GITHUB_OUTPUT
echo "candidate_base_branch=$(echo $candidate_branch | awk -F'.' -v OFS='.' '{ $3="x"; print }')" >> $GITHUB_OUTPUT
echo "cmake_docker_config=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DSIGN_MODULES=${{ github.repository_owner == 'hpcc-systems' && 'ON' || 'OFF' }}" >> $GITHUB_OUTPUT
echo 'gpg_import=gpg --batch --import /hpcc-dev/build/private.key' >> $GITHUB_OUTPUT
- name: Print vars
run: |
echo "${{ toJSON(steps.vars.outputs) }})"
- name: Release HPCC-Platform
uses: ncipollo/[email protected]
with:
allowUpdates: true
generateReleaseNotes: false
prerelease: ${{ contains(github.ref, '-rc') }}
build-docker:
name: Build Docker
needs: preamble
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-22.04
name: k8s
container: true
- os: ubuntu-22.04
name: docs
documentation: true
- os: ubuntu-20.04
- os: centos-8
- os: centos-7
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic"
- os: amazonlinux
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-amazonlinux-dynamic"
- os: rockylinux-8
- os: ubuntu-22.04
name: LN k8s
ln: true
container: true
- os: ubuntu-22.04
name: LN
ln: true
- os: ubuntu-22.04
name: Enterprise
ee: true
- os: ubuntu-20.04
name: LN
ln: true
- os: centos-8
name: LN
cmake_options_extra: ""
ln: true
- os: centos-7
name: LN
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic"
ln: true
- os: rockylinux-8
name: LN
cmake_options_extra: ""
ln: true
- os: centos-7-rh-python38
name: LN Python 3.8
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic -DCUSTOM_LABEL=_rh_python38"
ln: true
fail-fast: false
steps:
- name: Free additional disk space (remove Android SDK + Tools)
continue-on-error: true
run: |
df -h
sudo rm -rf ${ANDROID_HOME}
sudo rm -rf ${JAVA_HOME_8_X64}
sudo rm -rf ${JAVA_HOME_11_X64}
sudo rm -rf ${JAVA_HOME_17_X64}
sudo rm -rf ${JAVA_HOME_21_X64}
sudo rm -rf ${CHROMEWEBDRIVER}
sudo rm -rf ${EDGEWEBDRIVER}
sudo rm -rf ${GECKOWEBDRIVER}
sudo rm -rf ${SELENIUM_JAR_PATH}
- name: Display disk space (post free)
run: |
df -h
- name: Checkout HPCC-Platform
uses: actions/checkout@v4
with:
ref: ${{ needs.preamble.outputs.community_ref }}
submodules: recursive
path: ${{ needs.preamble.outputs.folder_platform }}
- name: Checkout LN
if: ${{ matrix.ln || matrix.ee }}
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/LN
token: ${{ secrets.LNB_TOKEN }}
ref: ${{ needs.preamble.outputs.internal_ref }}
submodules: recursive
path: ${{ needs.preamble.outputs.folder_ln }}
- name: Calculate vars
id: vars
working-directory: ${{ needs.preamble.outputs.folder_platform }}/vcpkg
run: |
vcpkg_sha_short=$(git rev-parse --short=8 HEAD)
echo "vcpkg_sha_short=$vcpkg_sha_short" >> $GITHUB_OUTPUT
docker_build_label=hpccsystems/platform-build-${{ matrix.os }}
echo "docker_build_label=$docker_build_label" >> $GITHUB_OUTPUT
echo "docker_tag=$docker_build_label:$vcpkg_sha_short" >> $GITHUB_OUTPUT
echo "docker_tag_candidate_base=$docker_build_label:${{ needs.preamble.outputs.candidate_base_branch }}" >> $GITHUB_OUTPUT
- name: Print vars
run: |
echo "${{ toJSON(needs.preamble.outputs) }})"
echo "${{ toJSON(steps.vars.outputs) }})"
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create Build Image
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
file: ${{ needs.preamble.outputs.folder_platform }}/dockerfiles/vcpkg/${{ matrix.os }}.dockerfile
context: ${{ needs.preamble.outputs.folder_platform }}/dockerfiles/vcpkg
push: ${{ github.repository_owner == 'hpcc-systems' }}
load: ${{ github.repository_owner != 'hpcc-systems' }}
build-args: |
VCPKG_REF=${{ steps.vars.outputs.vcpkg_sha_short }}
tags: |
${{ steps.vars.outputs.docker_tag_candidate_base }}
cache-from: |
type=registry,ref=${{ steps.vars.outputs.docker_tag_candidate_base }}
type=registry,ref=${{ steps.vars.outputs.docker_tag }}
cache-to: type=inline
# Communtiy Build
- name: CMake Packages (community)
if: ${{ !matrix.ln && !matrix.ee && !matrix.container && !matrix.documentation }}
run: |
mkdir -p ${{ needs.preamble.outputs.folder_build }}
echo "${{ secrets.SIGNING_SECRET }}" > ${{ needs.preamble.outputs.folder_build }}/private.key
plugins=("CASSANDRAEMBED" "COUCHBASEEMBED" "ECLBLAS" "H3" "JAVAEMBED" "KAFKA" "MEMCACHED" "MONGODBEMBED" "MYSQLEMBED" "NLP" "PARQUETEMBED" "REDIS" "REMBED" "SQLITE3EMBED" "SQS" "WASMEMBED" "PLATFORM" "CLIENTTOOLS_ONLY")
for plugin in "${plugins[@]}"; do
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "${{ needs.preamble.outputs.gpg_import }} && \
cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/build ${{ needs.preamble.outputs.cmake_docker_config }} -DSIGN_MODULES_PASSPHRASE=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DSIGN_MODULES_KEYID=${{ secrets.SIGN_MODULES_KEYID }} -D$plugin=ON -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=OFF ${{ matrix.cmake_options_extra }} && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
# Disabled as not currently needed ---
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/build ${{ needs.preamble.outputs.cmake_docker_config }} -D$plugin=ON -DCONTAINERIZED=OFF -DCPACK_STRIP_FILES=ON"
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
done
cd ${{ needs.preamble.outputs.folder_build }}
packages=($(ls -1 hpccsystems-*))
for i in "${packages[@]}"; do
md5sum "$i" > "$i.md5sum"
done
- name: CMake Containerized Packages (community)
if: ${{ !matrix.ln && !matrix.ee && matrix.container && !matrix.documentation }}
run: |
mkdir -p ${{ needs.preamble.outputs.folder_build }}
echo "${{ secrets.SIGNING_SECRET }}" > ${{ needs.preamble.outputs.folder_build }}/private.key
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "${{ needs.preamble.outputs.gpg_import }} && \
cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/build ${{ needs.preamble.outputs.cmake_docker_config }} -DSIGN_MODULES_PASSPHRASE=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DSIGN_MODULES_KEYID=${{ secrets.SIGN_MODULES_KEYID }} -DINCLUDE_PLUGINS=ON -DCONTAINERIZED=ON -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=OFF ${{ matrix.cmake_options_extra }} && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "${{ needs.preamble.outputs.gpg_import }} && \
cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/build ${{ needs.preamble.outputs.cmake_docker_config }} -DSIGN_MODULES_PASSPHRASE=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DSIGN_MODULES_KEYID=${{ secrets.SIGN_MODULES_KEYID }} -DINCLUDE_PLUGINS=ON -DCONTAINERIZED=ON -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=ON ${{ matrix.cmake_options_extra }} && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
- name: CMake documentation (community)
if: ${{ !matrix.ln && !matrix.ee && !matrix.container && matrix.documentation }}
run: |
mkdir -p {${{needs.preamble.outputs.folder_build }},EN_US,PT_BR}
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "\
cmake -S /hpcc-dev/HPCC-Platform -B /hpcc-dev/build -DVCPKG_FILES_DIR=/hpcc-dev -DMAKE_DOCS_ONLY=ON -DUSE_NATIVE_LIBRARIES=ON -DDOCS_AUTO=ON -DDOC_LANGS=ALL && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target all"
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cd /hpcc-dev/build/Release/docs/EN_US && zip ALL_HPCC_DOCS_EN_US-$(echo '${{ needs.preamble.outputs.community_tag }}' | sed 's/community_//' ).zip *.pdf"
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cd /hpcc-dev/build/Release/docs/PT_BR && zip ALL_HPCC_DOCS_PT_BR-$(echo '${{ needs.preamble.outputs.community_tag }}' | sed 's/community_//' ).zip *.pdf"
- name: Upload Artifacts for ECLIDE build
if: ${{ !matrix.ln && !matrix.container && matrix.documentation }}
uses: actions/upload-artifact@v4
with:
name: html-help-documents
path: |
${{ needs.preamble.outputs.folder_build }}/docs/EN_US/EclipseHelp/*.zip
${{ needs.preamble.outputs.folder_build }}/docs/EN_US/HTMLHelp/*.zip
${{ needs.preamble.outputs.folder_build }}/docs/PT_BR/HTMLHelp/*.zip
compression-level: 0
- name: Upload Assets (community)
if: ${{ !matrix.ln && !matrix.ee }}
uses: ncipollo/[email protected]
with:
allowUpdates: true
generateReleaseNotes: false
prerelease: ${{ contains(github.ref, '-rc') }}
artifacts: |
${{ needs.preamble.outputs.folder_build }}/*.deb,
${{ needs.preamble.outputs.folder_build }}/*.rpm,
${{ needs.preamble.outputs.folder_build }}/Release/docs/*.zip,
${{ needs.preamble.outputs.folder_build }}/Release/docs/EN_US/*.zip,
${{ needs.preamble.outputs.folder_build }}/Release/docs/PT_BR/*.zip,
${{ needs.preamble.outputs.folder_build }}/docs/EN_US/EclipseHelp/*.zip,
${{ needs.preamble.outputs.folder_build }}/docs/EN_US/HTMLHelp/*.zip,
${{ needs.preamble.outputs.folder_build }}/docs/PT_BR/HTMLHelp/*.zip,
${{ needs.preamble.outputs.folder_build }}/*.md5sum
- name: Locate k8s deb file (community)
if: ${{ !matrix.ln && !matrix.ee && matrix.container && !matrix.documentation }}
id: container
run: |
k8s_pkg_path=$(ls -t ${{ needs.preamble.outputs.folder_build }}/*64_k8s.deb 2>/dev/null | head -1)
k8s_pkg_file=$(basename "$k8s_pkg_path")
echo "k8s_pkg_file=$k8s_pkg_file" >> $GITHUB_OUTPUT
echo "$k8s_pkg_file"
- name: Create Docker Image (community)
uses: docker/build-push-action@v5
if: ${{ !matrix.ln && !matrix.ee && matrix.container && !matrix.documentation }}
with:
builder: ${{ steps.buildx.outputs.name }}
file: ${{ needs.preamble.outputs.folder_platform }}/dockerfiles/vcpkg/platform-core-${{ matrix.os }}/Dockerfile
context: ${{ needs.preamble.outputs.folder_build }}
push: ${{ github.repository_owner == 'hpcc-systems' }}
build-args: |
PKG_FILE=${{ steps.container.outputs.k8s_pkg_file }}
tags: |
hpccsystems/platform-core-${{ matrix.os }}:${{ needs.preamble.outputs.community_tag }}
hpccsystems/platform-core-${{ matrix.os }}:${{ needs.preamble.outputs.candidate_base_branch }}
cache-from: |
type=registry,ref=hpccsystems/platform-core-${{ matrix.os }}:${{ needs.preamble.outputs.candidate_base_branch }}
# Internal Build ---
- name: Login to JFrog (internal)
if: ${{ matrix.ln && matrix.container && github.repository_owner == 'hpcc-systems' }}
uses: docker/login-action@v3
with:
registry: ${{ secrets.JFROG_REGISTRY }}
username: ${{ secrets.JFROG_USERNAME }}
password: ${{ secrets.JFROG_PASSWORD }}
- name: Setup JFrog CLI (internal)
if: ${{ matrix.ln && matrix.container && github.repository_owner == 'hpcc-systems' }}
uses: jfrog/setup-jfrog-cli@v3
env:
JF_URL: https://${{ secrets.JFROG_REGISTRY }}
JF_USER: ${{ secrets.JFROG_USERNAME }}
JF_PASSWORD: ${{ secrets.JFROG_PASSWORD }}
- name: CMake Packages (internal)
if: ${{ matrix.ln && !matrix.container && !matrix.documentation }}
run: |
mkdir -p ${{ needs.preamble.outputs.folder_build }}
echo "${{ secrets.SIGNING_SECRET }}" > ${{ needs.preamble.outputs.folder_build }}/private.key
plugins=("PLATFORM" "CLIENTTOOLS_ONLY")
for plugin in "${plugins[@]}"; do
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "${{ needs.preamble.outputs.gpg_import }} && \
cmake -S /hpcc-dev/LN -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform ${{ needs.preamble.outputs.cmake_docker_config }} -DSIGN_MODULES_PASSPHRASE=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DSIGN_MODULES_KEYID=${{ secrets.SIGN_MODULES_KEYID }} -D$plugin=ON -DINCLUDE_PLUGINS=ON -DCONTAINERIZED=OFF -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=OFF ${{ matrix.cmake_options_extra }} && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
# Disabled as not currently needed ---
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cmake -S /hpcc-dev/LN -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform ${{ needs.preamble.outputs.cmake_docker_config }} -DINCLUDE_PLUGINS=ON -DCONTAINERIZED=OFF -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=ON"
# docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
done
- name: CMake Containerized Packages (internal)
if: ${{ matrix.ln && matrix.container && !matrix.documentation }}
run: |
mkdir -p ${{ needs.preamble.outputs.folder_build }}
echo "${{ secrets.SIGNING_SECRET }}" > ${{ needs.preamble.outputs.folder_build }}/private.key
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "${{ needs.preamble.outputs.gpg_import }} && \
cmake -S /hpcc-dev/LN -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform ${{ needs.preamble.outputs.cmake_docker_config }} -DSIGN_MODULES_PASSPHRASE=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DSIGN_MODULES_KEYID=${{ secrets.SIGN_MODULES_KEYID }} -DINCLUDE_PLUGINS=ON -DCONTAINERIZED=ON -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=OFF ${{ matrix.cmake_options_extra }} && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "${{ needs.preamble.outputs.gpg_import }} && \
cmake -S /hpcc-dev/LN -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform ${{ needs.preamble.outputs.cmake_docker_config }} -DSIGN_MODULES_PASSPHRASE=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DSIGN_MODULES_KEYID=${{ secrets.SIGN_MODULES_KEYID }} -DINCLUDE_PLUGINS=ON -DCONTAINERIZED=ON -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=ON ${{ matrix.cmake_options_extra }} && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
- name: Upload Assets to Jfrog (debian internal)
if: ${{ matrix.ln && !matrix.container && contains(matrix.os, 'ubuntu') && github.repository_owner == 'hpcc-systems'}}
shell: bash
run: |
cd ${{ needs.preamble.outputs.folder_build }}
version=$(echo "${{ needs.preamble.outputs.internal_tag }}" | sed 's/internal_//')
packages=($(ls -1 hpccsystems-*.deb ))
for _package in ${packages[@]}; do
distribution=$( echo "${_package}" | sed "s/^.*${version}//" | awk -F '_' '{print $1;}' )
curl -u${{ secrets.JFROG_USERNAME }}:${{ secrets.JFROG_PASSWORD }} -XPUT "https://${{ secrets.JFROG_REGISTRY }}/hpccpl-debian-local/pool/LN/${_package};deb.distribution=${distribution};deb.component=LN;deb.architecture=amd64" -T ${{ needs.preamble.outputs.folder_build }}/${_package}
done
- name: Upload Assets to Jfrog (centos internal)
if: ${{ matrix.ln && !matrix.container && !contains(matrix.os, 'ubuntu') && github.repository_owner == 'hpcc-systems'}}
shell: bash
run: |
cd ${{ needs.preamble.outputs.folder_build }}
packages=($(ls -1 hpccsystems-*.rpm ))
for _package in ${packages[@]}; do
distribution=$( echo "${_package}" | awk -F '.' '{print $4;}' )
curl -u${{ secrets.JFROG_USERNAME }}:${{ secrets.JFROG_PASSWORD }} -XPUT "https://${{ secrets.JFROG_REGISTRY }}/hpccpl-rpm-local/LN/${distribution}/x86_64/${_package}" -T ${{ needs.preamble.outputs.folder_build }}/${_package}
done
- name: Locate k8s deb file (internal)
if: ${{ matrix.ln && matrix.container && !matrix.documentation }}
id: ln-container
run: |
k8s_pkg_path=$(ls -t ${{ needs.preamble.outputs.folder_build }}/*64_k8s.deb 2>/dev/null | head -1)
k8s_pkg_file=$(basename "$k8s_pkg_path")
echo "k8s_pkg_file=$k8s_pkg_file" >> $GITHUB_OUTPUT
echo "$k8s_pkg_file"
- name: Create Docker Image (internal)
uses: docker/build-push-action@v5
if: ${{ matrix.ln && matrix.container && !matrix.documentation }}
with:
builder: ${{ steps.buildx.outputs.name }}
file: ${{ needs.preamble.outputs.folder_platform }}/dockerfiles/vcpkg/platform-core-${{ matrix.os }}/Dockerfile
context: ${{ needs.preamble.outputs.folder_build }}
push: false
load: true
build-args: |
PKG_FILE=${{ steps.ln-container.outputs.k8s_pkg_file }}
tags: |
${{ secrets.JFROG_REGISTRY || 'dummy.io' }}/hpccpl-docker-local/platform-core-ln:${{ needs.preamble.outputs.hpcc_version }}
cache-from: |
type=registry,ref=hpccsystems/platform-core-${{ matrix.os }}:${{ needs.preamble.outputs.candidate_base_branch }}
- name: JFrog Docker Push and Publish
if: ${{ matrix.ln && matrix.container && !matrix.documentation && github.repository_owner == 'hpcc-systems' }}
run: |
jf docker push ${{ secrets.JFROG_REGISTRY || 'dummy.io' }}/hpccpl-docker-local/platform-core-ln:${{ needs.preamble.outputs.hpcc_version }} --build-name=platform-core-ln --build-number=${{ needs.preamble.outputs.hpcc_version }} --project=hpccpl
jf rt bp platform-core-ln ${{ needs.preamble.outputs.hpcc_version }} --project=hpccpl
# Enterprise Build ---
- name: CMake Packages (enterprise)
if: ${{ matrix.ee }}
run: |
mkdir -p ${{ needs.preamble.outputs.folder_build }}
echo "${{ secrets.SIGNING_SECRET }}" > ${{ needs.preamble.outputs.folder_build }}/private.key
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_ln }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "${{ needs.preamble.outputs.gpg_import }} && \
cmake -S /hpcc-dev/LN -B /hpcc-dev/build -DHPCC_SOURCE_DIR=/hpcc-dev/HPCC-Platform ${{ needs.preamble.outputs.cmake_docker_config }} -DBUILD_LEVEL=ENTERPRISE -DSIGN_MODULES_PASSPHRASE=${{ secrets.SIGN_MODULES_PASSPHRASE }} -DSIGN_MODULES_KEYID=${{ secrets.SIGN_MODULES_KEYID }} -DPLATFORM=ON -DINCLUDE_PLUGINS=ON -DCONTAINERIZED=OFF -DSUPPRESS_REMBED=ON -DSUPPRESS_V8EMBED=ON -DSUPPRESS_SPARK=ON -DCPACK_STRIP_FILES=OFF && \
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
# Common ---
- name: Cleanup Environment
if: always()
run: rm -f ${{ needs.preamble.outputs.folder_build }}/private.key
- name: Upload error logs
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.ln }}-${{ matrix.container }}-${{ matrix.documentation }}-logs
path: ${{ needs.preamble.outputs.folder_build }}/**/*.log
build-bare-metal:
name: Build Bare Metal
# if: github.repository == 'hpcc-systems/HPCC-Platform'
needs: preamble
strategy:
matrix:
include:
- os: "windows-2022"
mono: ""
sudo: ""
cmake_config_options: '-T host=x64 -A x64 -DUSE_OPTIONAL=OFF -DCLIENTTOOLS_ONLY=ON -DUSE_AZURE=OFF -DUSE_CASSANDRA=OFF -DUSE_PARQUET=OFF -DUSE_JAVA=OFF -DUSE_OPENLDAP=OFF'
cmake_build_options: "--config Release --parallel $NUMBER_OF_PROCESSORS"
- os: "macos-12"
mono: "mono"
sudo: "sudo"
cmake_config_options: "-DCMAKE_BUILD_TYPE=Release -DUSE_OPTIONAL=OFF -DCLIENTTOOLS_ONLY=ON -DUSE_AZURE=OFF -DUSE_CASSANDRA=OFF -DUSE_PARQUET=OFF -DUSE_JAVA=OFF -DUSE_OPENLDAP=OFF"
cmake_build_options: "--parallel $(nproc)"
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Print vars
shell: "bash"
run: |
echo ${{ matrix.os }}
echo "${{ toJSON(needs.preamble.outputs) }})"
- name: OSX Dependencies
if: ${{ contains(matrix.os, 'macos') }}
shell: "bash"
run: |
brew install bison flex pkg-config autoconf autoconf-archive automake libtool cmake openjdk@11
- name: "Remove builtin vcpkg (old)"
working-directory: .
shell: "bash"
run: |
${{ matrix.sudo }} rm -rf "$VCPKG_INSTALLATION_ROOT"
- name: Checkout HPCC-Platform
uses: actions/checkout@v4
with:
ref: ${{ needs.preamble.outputs.community_ref }}
submodules: recursive
path: ./HPCC-Platform
- name: Checkout LN
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/LN
token: ${{ secrets.LNB_TOKEN }}
ref: ${{ needs.preamble.outputs.internal_ref }}
submodules: recursive
path: ./LN
- name: "Create code signing"
if: ${{ contains(matrix.os,'windows') }}
shell: "pwsh"
run: |
mkdir -p ./sign
cd sign
$pfxPath = "hpcc_code_signing.pfx"
$encodedBytes = [System.Convert]::FromBase64String("${{ secrets.SIGNING_CERTIFICATE }}")
$currentDirectory = Get-Location
$certificatePath = Join-Path -Path $currentDirectory -ChildPath $pfxPath
[IO.File]::WriteAllBytes("$certificatePath", $encodedBytes)
CertUtil -p ${{ secrets.SIGNING_CERTIFICATE_PASSPHRASE }} hpcc_code_signing.pfx
- name: "vcpkg Bootstrap"
shell: "bash"
run: |
./HPCC-Platform/vcpkg/bootstrap-vcpkg.sh
- name: "Setup NuGet credentials"
shell: "bash"
run: |
${{ matrix.mono }} `./HPCC-Platform/vcpkg/vcpkg fetch nuget | tail -n 1` \
sources add \
-name "GitHub" \
-source "https://nuget.pkg.github.com/hpcc-systems/index.json" \
-storepasswordincleartext \
-username "${{ github.repository_owner }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
- name: CMake Packages
shell: "bash"
run: |
mkdir -p ./build
cmake -S ./HPCC-Platform -B ./build ${{ matrix.cmake_config_options }}
cmake --build ./build ${{ matrix.cmake_build_options }} --target package
- name: Sign Windows Package
if: ${{ contains(matrix.os,'windows') }}
shell: "pwsh"
run: |
cd ./build
C:\"Program Files (x86)"\"Microsoft SDKs"\ClickOnce\SignTool\signtool.exe sign /debug /f ../sign/hpcc_code_signing.pfx /p ${{ secrets.SIGNING_CERTIFICATE_PASSPHRASE }} /t http://timestamp.digicert.com /fd SHA256 hpccsystems-clienttools*.exe
- name: Upload Artifact for ECLIDE build
if: ${{ contains(matrix.os, 'windows') }}
uses: actions/upload-artifact@v4
with:
name: Windows-Clienttools
path: ./build/hpccsystems-clienttools*.exe
compression-level: 0
- name: Upload Assets
uses: ncipollo/[email protected]
with:
allowUpdates: true
generateReleaseNotes: false
prerelease: ${{ contains(github.ref, '-rc') }}
artifacts: "./build/*.exe,./build/*.msi,./build/*.dmg,./build/*.pkg,./build/*.tar.gz"
- name: CMake LN Packages
shell: "bash"
run: |
${{ matrix.sudo }} rm -f ./build/CMakeCache.txt
${{ matrix.sudo }} rm -rf ./build/CMakeFiles
cmake -S ./LN -B ./build ${{ matrix.cmake_config_options }}
cmake --build ./build ${{ matrix.cmake_build_options }} --target package
- name: Sign LN Windows Package
if: ${{ contains(matrix.os,'windows') }}
shell: "pwsh"
run: |
cd ./build
C:\"Program Files (x86)"\"Microsoft SDKs"\ClickOnce\SignTool\signtool.exe sign /debug /f ../sign/hpcc_code_signing.pfx /p ${{ secrets.SIGNING_CERTIFICATE_PASSPHRASE }} /t http://timestamp.digicert.com /fd SHA256 hpccsystems-clienttools*.exe
- name: Upload Assets to Jfrog (windows)
if: ${{ contains(matrix.os, 'windows') && github.repository_owner == 'hpcc-systems' }}
shell: bash
run: |
cd ./build
packages=($(ls -1 hpccsystems-*.exe ))
for _package in ${packages[@]}; do
curl -u${{ secrets.JFROG_USERNAME }}:${{ secrets.JFROG_PASSWORD }} "https://${{ secrets.JFROG_REGISTRY }}/hpccpl-windows-local/LN/windows/x86_64/${_package}" -T ${_package}
done
- name: Upload Assets to Jfrog (macos)
if: ${{ contains(matrix.os, 'macos') && github.repository_owner == 'hpcc-systems' }}
shell: bash
run: |
cd ./build
packages=($(ls -1 hpccsystems-*.pkg ))
for _package in ${packages[@]}; do
curl -u${{ secrets.JFROG_USERNAME }}:${{ secrets.JFROG_PASSWORD }} "https://${{ secrets.JFROG_REGISTRY }}/hpccpl-macos-local/LN/macos/x86_64/${_package}" -T ${_package}
done
- name: Upload error logs
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-logs
path: ./build/**/*.log
build-bare-metal-eclide:
name: Build Bare Metal ECLIDE
needs: [ preamble, build-docker, build-bare-metal ]
runs-on: "windows-2022"
steps:
- name: Print vars
shell: "bash"
run: |
echo "${{ toJSON(needs.preamble.outputs) }})"
- name: Checkout HPCC-Platform
uses: actions/checkout@v4
with:
ref: ${{ needs.preamble.outputs.community_ref }}
submodules: recursive
path: ./HPCC-Platform
- name: Checkout ECLIDE
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/ECLIDE
ref: ${{ needs.preamble.outputs.eclide_ref }}
submodules: recursive
path: ./ECLIDE
fetch-depth: 0
- name: "Install html-help-workshop"
shell: "bash"
run: |
choco install html-help-workshop
mkdir -p ./ECLIDE/docs }}
- name: "Fetch html artifacts"
uses: actions/download-artifact@v4
with:
name: html-help-documents
merge-multiple: true
- name: "Fetch clienttools artifact"
uses: actions/download-artifact@v4
with:
name: Windows-Clienttools
merge-multiple: true
- name: "Create EN_US CHM file"
shell: "bash"
run: |
html_doc=$(find . -type f -name "html_help_EN_US-*")
mkdir html_help_EN_US
7z x $html_doc -ohtml_help_EN_US
cd html_help_EN_US/html_help
# Chocolate install a package but it is not in PATH variable. Use path full of hhc.exe
# hhc.exe return non-zero. Appending "true" to work-around
C:/"Program Files (x86)"/"HTML Help Workshop"/hhc.exe htmlhelp.hhp || true
mv htmlhelp.chm ECLReference.chm
cp ECLReference.chm ../../ECLIDE/docs/
- name: "Create PT_BR CHM file"
shell: "bash"
run: |
html_doc=$(find . -type f -name "html_help_PT_BR-*")
mkdir html_help_PT_BR
7z x $html_doc -ohtml_help_PT_BR
cd html_help_PT_BR/html_help
# Chocolate install a package but it is not in PATH variable. Use path full of hhc.exe
# hhc.exe return non-zero. Appending "true" to work-around
C:/"Program Files (x86)"/"HTML Help Workshop"/hhc.exe htmlhelp.hhp || true
mv htmlhelp.chm ECLReference_PT_BR.chm
cp ECLReference_PT_BR.chm ../../ECLIDE/docs/
- name: "Load code signing"
shell: "pwsh"
run: |
mkdir -p ./sign
cd sign
$pfxPath = "hpcc_code_signing.pfx"
$encodedBytes = [System.Convert]::FromBase64String("${{ secrets.SIGNING_CERTIFICATE }}")
$currentDirectory = Get-Location
$certificatePath = Join-Path -Path $currentDirectory -ChildPath $pfxPath
[IO.File]::WriteAllBytes("$certificatePath", $encodedBytes)
CertUtil -p ${{ secrets.SIGNING_CERTIFICATE_PASSPHRASE }} hpcc_code_signing.pfx
- name: "Build ECLIDE"
run: |
cd ECLIDE
mkdir -p ./build
cd ./build
cmake -A Win32 -S ../ -B .
cmake --build . --config RelWithDebInfo --target package --parallel
- name: Sign ECLIDE Package
shell: "pwsh"
run: |
cd ./ECLIDE/build
C:\"Program Files (x86)"\"Microsoft SDKs"\ClickOnce\SignTool\signtool.exe sign /debug /f ../../sign/hpcc_code_signing.pfx /p ${{ secrets.SIGNING_CERTIFICATE_PASSPHRASE}} /t http://timestamp.digicert.com /fd SHA256 hpccsystems-eclide*.exe
- name: Upload Assets
uses: ncipollo/[email protected]
with:
allowUpdates: true
generateReleaseNotes: false
prerelease: ${{ contains(github.ref, '-rc') }}
artifacts: "./ECLIDE/build/*.exe"
- name: Upload Assets to Jfrog (windows)
if: ${{ github.repository_owner == 'hpcc-systems' }}
shell: bash
run: |
cd ./ECLIDE/build
packages=($(ls -1 hpccsystems-*.exe ))
for _package in ${packages[@]}; do
curl -u${{ secrets.JFROG_USERNAME }}:${{ secrets.JFROG_PASSWORD }} "https://${{ secrets.JFROG_REGISTRY }}/hpccpl-windows-local/LN/windows/x86_64/${_package}" -T ${_package}
done
- name: Upload error logs
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v3
with:
name: windows-2022-logs
path: ./ECLIDE/build/**/*.log