Skip to content

Commit 0acd42c

Browse files
authored
Merge pull request #4 from g-pan/main
Merge Gregs Repo changes
2 parents 577b87c + a1883ec commit 0acd42c

File tree

6 files changed

+582
-22
lines changed

6 files changed

+582
-22
lines changed

.github/workflows/build-ce-platform.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ jobs:
3535
- name: Calculate vars
3636
id: vars
3737
run: |
38-
github_account=${{ env.GITHUB_ACCOUNT }}
39-
echo "github_account=$github_account" >> $GITHUB_OUTPUT
4038
echo "folder_platform=${{ github.workspace }}/HPCC-Platform" >> $GITHUB_OUTPUT
4139
echo 'mount_platform=source="${{ github.workspace }}/HPCC-Platform",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached' >> $GITHUB_OUTPUT
4240
echo "folder_build=${{ github.workspace }}/build" >> $GITHUB_OUTPUT
@@ -131,6 +129,7 @@ jobs:
131129
builder: ${{ steps.buildx.outputs.name }}
132130
file: ${{ needs.preamble.outputs.folder_platform }}/dockerfiles/vcpkg/${{ matrix.os }}.dockerfile
133131
context: ${{ needs.preamble.outputs.folder_platform }}/dockerfiles/vcpkg
132+
134133
push: ${{ needs.preamble.outputs.github_account == 'hpcc-systems' }}
135134
load: ${{ needs.preamble.outputs.github_account != 'hpcc-systems' }}
136135
build-args: |

.github/workflows/build-docs.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@ name: Build Documentation
33
env:
44
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,read"
55
VCPKG_NUGET_REPOSITORY: "https://github.com/hpcc-systems/vcpkg"
6-
6+
#uncommented push
77
on:
8-
workflow_dispatch
9-
#push:
8+
#possibly comment this
9+
#workflow_dispatch
10+
push:
1011

1112
jobs:
13+
Test-hyperlinks:
14+
uses: ./.github/workflows/test-hyperlinks.yml
15+
with:
16+
file-path: "docs/"
17+
file-type: "xml"
18+
debug-mode: false
19+
1220
preamble:
1321
name: Publish Release
1422
env:
@@ -149,7 +157,7 @@ jobs:
149157
- name: CMake documentation (community)
150158
if: ${{ !matrix.ln && !matrix.ee && !matrix.container && matrix.documentation }}
151159
run: |
152-
mkdir -p {${{needs.preamble.outputs.folder_build }},EN_US,PT_BR}
160+
mkdir -p {${{needs.preamble.outputs.folder_build }},EN_US,PT_BR,vcpkg_downloads}
153161
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
154162
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
155163
docker run --rm --mount ${{ needs.preamble.outputs.mount_platform }} --mount ${{ needs.preamble.outputs.mount_build }} ${{ steps.vars.outputs.docker_tag_candidate_base }} "\
@@ -162,7 +170,7 @@ jobs:
162170
if: ${{ !matrix.ln && !matrix.container && matrix.documentation }}
163171
uses: actions/upload-artifact@v4
164172
with:
165-
name: html-help-documents
173+
name: HPCC-Docs
166174
path: |
167175
${{ needs.preamble.outputs.folder_build }}/Release/docs/*.zip
168176
${{ needs.preamble.outputs.folder_build }}/Release/docs/EN_US/*.zip
@@ -171,3 +179,4 @@ jobs:
171179
${{ needs.preamble.outputs.folder_build }}/docs/EN_US/HTMLHelp/*.zip
172180
${{ needs.preamble.outputs.folder_build }}/docs/PT_BR/HTMLHelp/*.zip
173181
compression-level: 0
182+
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
name: Build LN Platform
2+
3+
env:
4+
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,read"
5+
VCPKG_NUGET_REPOSITORY: "https://github.com/hpcc-systems/vcpkg"
6+
7+
on:
8+
#workflow_dispatch
9+
push:
10+
11+
jobs:
12+
preamble:
13+
name: Publish Release
14+
env:
15+
COMMUNITY_REF: "dc1cdacdbdda6e5ca1c5b836e130c2deb2d2fe62"
16+
LN_REF: "9e672fa4dfb323569459f466bddda77638930abe"
17+
#COMMUNITY_REF: <GIT REF>
18+
runs-on: ubuntu-22.04
19+
permissions:
20+
contents: write
21+
outputs:
22+
folder_platform: ${{ steps.vars.outputs.folder_platform }}
23+
mount_platform: ${{ steps.vars.outputs.mount_platform }}
24+
folder_ln: ${{ steps.vars.outputs.folder_ln }}
25+
mount_ln: ${{ steps.vars.outputs.mount_ln }}
26+
folder_build: ${{ steps.vars.outputs.folder_build }}
27+
mount_build: ${{ steps.vars.outputs.mount_build }}
28+
community_ref: ${{ steps.vars.outputs.community_ref }}
29+
community_tag: ${{ steps.vars.outputs.community_tag }}
30+
internal_tag: ${{ steps.vars.outputs.internal_tag }}
31+
hpcc_version: ${{ steps.vars.outputs.hpcc_version }}
32+
candidate_base_branch: ${{ steps.vars.outputs.candidate_base_branch }}
33+
candidate_branch: ${{ steps.vars.outputs.candidate_branch }}
34+
cmake_docker_config: ${{ steps.vars.outputs.cmake_docker_config }}
35+
gpg_import: ${{ steps.vars.outputs.gpg_import }}
36+
steps:
37+
- name: Calculate vars
38+
id: vars
39+
run: |
40+
echo "folder_platform=${{ github.workspace }}/HPCC-Platform" >> $GITHUB_OUTPUT
41+
echo 'mount_platform=source="${{ github.workspace }}/HPCC-Platform",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached' >> $GITHUB_OUTPUT
42+
echo "folder_ln=${{ github.workspace }}/LN" >> $GITHUB_OUTPUT
43+
echo 'mount_ln=source="${{ github.workspace }}/LN",target=/hpcc-dev/LN,type=bind,consistency=cached' >> $GITHUB_OUTPUT
44+
echo "folder_build=${{ github.workspace }}/build" >> $GITHUB_OUTPUT
45+
echo 'mount_build=source="${{ github.workspace }}/build",target=/hpcc-dev/build,type=bind,consistency=cached' >> $GITHUB_OUTPUT
46+
community_ref=${{ env.COMMUNITY_REF }}
47+
echo "community_ref=$community_ref" >> $GITHUB_OUTPUT
48+
ln_ref=${{ env.LN_REF }}
49+
community_tag=$(echo $ln_ref | cut -d'/' -f3)
50+
echo "community_tag=$community_tag" >> $GITHUB_OUTPUT
51+
echo "internal_tag=$(echo $community_tag | sed 's/community/internal/')" >> $GITHUB_OUTPUT
52+
echo "hpcc_version=$(echo $community_tag | sed 's/community_//' | sed 's/-[0-9]$//')" >> $GITHUB_OUTPUT
53+
community_base_ref=${{ github.event.base_ref || github.ref }}
54+
candidate_branch=$(echo $community_base_ref | cut -d'/' -f3)
55+
echo "candidate_branch=$candidate_branch" >> $GITHUB_OUTPUT
56+
echo "candidate_base_branch=$(echo $candidate_branch | awk -F'.' -v OFS='.' '{ $3="x"; print }')" >> $GITHUB_OUTPUT
57+
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
58+
echo 'gpg_import=gpg --batch --import /hpcc-dev/build/private.key' >> $GITHUB_OUTPUT
59+
60+
- name: Print vars
61+
run: |
62+
echo "${{ toJSON(steps.vars.outputs) }})"
63+
64+
build-docker:
65+
name: Build Docker
66+
needs: preamble
67+
runs-on: ubuntu-22.04
68+
strategy:
69+
matrix:
70+
include:
71+
- os: ubuntu-22.04
72+
name: LN
73+
- os: centos-7
74+
name: LN
75+
cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic"
76+
fail-fast: false
77+
78+
steps:
79+
- name: Free additional disk space (remove Android SDK + Tools)
80+
continue-on-error: true
81+
run: |
82+
df -h
83+
sudo rm -rf ${ANDROID_HOME}
84+
sudo rm -rf ${JAVA_HOME_8_X64}
85+
sudo rm -rf ${JAVA_HOME_11_X64}
86+
sudo rm -rf ${JAVA_HOME_17_X64}
87+
sudo rm -rf ${JAVA_HOME_21_X64}
88+
sudo rm -rf ${CHROMEWEBDRIVER}
89+
sudo rm -rf ${EDGEWEBDRIVER}
90+
sudo rm -rf ${GECKOWEBDRIVER}
91+
sudo rm -rf ${SELENIUM_JAR_PATH}
92+
93+
- name: Display disk space (post free)
94+
run: |
95+
df -h
96+
97+
- name: Checkout HPCC-Platform
98+
uses: actions/checkout@v3
99+
with:
100+
repository: ${{ github.repository_owner }}/HPCC-Platform
101+
ref: ${{ needs.preamble.outputs.community_ref }}
102+
submodules: recursive
103+
path: ${{ needs.preamble.outputs.folder_platform }}
104+
105+
- name: Checkout LN
106+
uses: actions/checkout@v4
107+
with:
108+
repository: ${{ github.repository_owner }}/LN
109+
token: ${{ secrets.LNB_TOKEN }}
110+
ref: ${{ needs.preamble.outputs.internal_ref }}
111+
submodules: recursive
112+
path: ${{ needs.preamble.outputs.folder_ln }}
113+
114+
- name: Calculate vars
115+
id: vars
116+
working-directory: ${{ needs.preamble.outputs.folder_platform }}/vcpkg
117+
run: |
118+
vcpkg_sha_short=$(git rev-parse --short=8 HEAD)
119+
echo "vcpkg_sha_short=$vcpkg_sha_short" >> $GITHUB_OUTPUT
120+
docker_build_label=hpccsystems/platform-build-${{ matrix.os }}
121+
echo "docker_build_label=$docker_build_label" >> $GITHUB_OUTPUT
122+
echo "docker_tag=$docker_build_label:$vcpkg_sha_short" >> $GITHUB_OUTPUT
123+
echo "docker_tag_candidate_base=$docker_build_label:${{ needs.preamble.outputs.candidate_base_branch }}" >> $GITHUB_OUTPUT
124+
125+
- name: Print vars
126+
run: |
127+
echo "${{ toJSON(needs.preamble.outputs) }})"
128+
echo "${{ toJSON(steps.vars.outputs) }})"
129+
130+
- name: Set up Docker Buildx
131+
id: buildx
132+
uses: docker/setup-buildx-action@v2
133+
134+
- name: Login to DockerHub
135+
uses: docker/login-action@v2
136+
with:
137+
username: ${{ secrets.DOCKER_USERNAME }}
138+
password: ${{ secrets.DOCKER_PASSWORD }}
139+
140+
- name: Create Build Image
141+
uses: docker/build-push-action@v4
142+
with:
143+
builder: ${{ steps.buildx.outputs.name }}
144+
file: ${{ needs.preamble.outputs.folder_platform }}/dockerfiles/vcpkg/${{ matrix.os }}.dockerfile
145+
context: ${{ needs.preamble.outputs.folder_platform }}/dockerfiles/vcpkg
146+
push: ${{ github.repository_owner == 'hpcc-systems' }}
147+
load: ${{ github.repository_owner != 'hpcc-systems' }}
148+
build-args: |
149+
VCPKG_REF=${{ steps.vars.outputs.vcpkg_sha_short }}
150+
tags: |
151+
${{ steps.vars.outputs.docker_tag_candidate_base }}
152+
cache-from: |
153+
type=registry,ref=${{ steps.vars.outputs.docker_tag_candidate_base }}
154+
type=registry,ref=${{ steps.vars.outputs.docker_tag }}
155+
cache-to: type=inline
156+
157+
# Internal Build
158+
- name: CMake Containerized Packages (internal)
159+
run: |
160+
mkdir -p ${{ needs.preamble.outputs.folder_build }}
161+
echo "${{ secrets.SIGNING_SECRET }}" > ${{ needs.preamble.outputs.folder_build }}/private.key
162+
sudo rm -f ${{ needs.preamble.outputs.folder_build }}/CMakeCache.txt
163+
sudo rm -rf ${{ needs.preamble.outputs.folder_build }}/CMakeFiles
164+
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 }} && \
165+
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 }} && \
166+
cmake --build /hpcc-dev/build --parallel $(nproc) --target package"
167+
168+
- name: Upload Artifacts LN Platform
169+
uses: actions/upload-artifact@v4
170+
with:
171+
name: LN-HPCC-Platform-${{ matrix.os }}
172+
path: |
173+
${{ needs.preamble.outputs.folder_build }}/*.deb
174+
${{ needs.preamble.outputs.folder_build }}/*.rpm
175+
compression-level: 0

0 commit comments

Comments
 (0)