-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HPCC-30888 support ECLIDE build with github action
Also add code sign for Windows builds
- Loading branch information
Showing
1 changed file
with
165 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,7 +190,7 @@ jobs: | |
type=registry,ref=${{ steps.vars.outputs.docker_tag }} | ||
cache-to: type=inline | ||
|
||
# Communtiy Build | ||
# Communtiy Build | ||
- name: CMake Packages (community) | ||
if: ${{ !matrix.ln && !matrix.container && !matrix.documentation }} | ||
run: | | ||
|
@@ -202,10 +202,10 @@ jobs: | |
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" | ||
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" | ||
# 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 | ||
- name: CMake Containerized Packages (community) | ||
|
@@ -234,6 +234,17 @@ jobs: | |
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-${{ needs.preamble.outputs.community_tag }}.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-${{ needs.preamble.outputs.community_tag }}.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 }} | ||
uses: ncipollo/[email protected] | ||
|
@@ -284,7 +295,7 @@ jobs: | |
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: | | ||
|
@@ -296,9 +307,9 @@ jobs: | |
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" | ||
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 -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 | ||
|
@@ -311,10 +322,10 @@ jobs: | |
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" | ||
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" | ||
cmake --build /hpcc-dev/build --parallel $(nproc) --target package" | ||
- name: Upload Assets (internal) | ||
if: ${{ matrix.ln }} | ||
|
@@ -427,6 +438,19 @@ jobs: | |
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: | | ||
|
@@ -450,6 +474,21 @@ jobs: | |
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: | ||
|
@@ -466,6 +505,13 @@ jobs: | |
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 LN Assets | ||
uses: ncipollo/[email protected] | ||
with: | ||
|
@@ -484,3 +530,114 @@ jobs: | |
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@v3 | ||
with: | ||
ref: ${{ needs.preamble.outputs.community_ref }} | ||
submodules: recursive | ||
path: ./HPCC-Platform | ||
|
||
- name: Checkout ECLIDE | ||
uses: actions/checkout@v3 | ||
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 error logs | ||
if: ${{ failure() || cancelled() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: windows-2022-logs | ||
path: ./ECLIDE/build/**/*.log |