-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #558 from GordonSmith/IDE-1050-GH_ACTIONS
IDE-1050 Upgrade GH Action to match HPCC-Platform pattern Reviewed-by: Gavin Halliday <[email protected]> Merged-by: Gavin Halliday <[email protected]>
- Loading branch information
Showing
22 changed files
with
200 additions
and
700 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 |
---|---|---|
@@ -0,0 +1,144 @@ | ||
name: Build Package (gh-runner) | ||
|
||
env: | ||
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,read" | ||
VCPKG_NUGET_REPOSITORY: "https://github.com/hpcc-systems/vcpkg" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
type: string | ||
description: 'Operating System' | ||
required: false | ||
default: 'windows-2022' | ||
build-type: | ||
type: string | ||
description: 'CMake Build Type' | ||
required: false | ||
default: 'RelWithDebInfo' | ||
cmake-configuration: | ||
type: string | ||
description: 'CMake Configuration' | ||
required: false | ||
default: '' | ||
cmake-configuration-ex: | ||
type: string | ||
description: 'CMake Configuration Extra' | ||
required: false | ||
default: '' | ||
update-cache: | ||
type: boolean | ||
description: 'Update Cache' | ||
required: false | ||
default: true | ||
upload-package: | ||
type: boolean | ||
description: 'Upload Package as Asset' | ||
required: false | ||
default: false | ||
asset-name: | ||
type: string | ||
description: 'Asset Name (if upload-package is true)' | ||
required: false | ||
default: 'build-package' | ||
secrets: | ||
LNB_TOKEN: | ||
required: false | ||
|
||
jobs: | ||
|
||
build-gh_runner: | ||
runs-on: ${{ inputs.os }} | ||
steps: | ||
- name: "Remove builtin vcpkg (old)" | ||
working-directory: . | ||
shell: "bash" | ||
run: | | ||
${{ !contains(inputs.os, 'windows') && 'sudo' || '' }} rm -rf "$VCPKG_INSTALLATION_ROOT" | ||
- name: Checkout ECLIDE | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
path: ${{ github.workspace }}/eclide | ||
|
||
- name: Fetch vcpkg history | ||
shell: "bash" | ||
working-directory: ${{ github.workspace }}/eclide/vcpkg | ||
run: | | ||
git fetch --unshallow | ||
- name: "vcpkg Bootstrap" | ||
shell: "bash" | ||
run: | | ||
./eclide/vcpkg/bootstrap-vcpkg.sh | ||
- name: "Setup NuGet credentials" | ||
shell: "bash" | ||
run: | | ||
`./eclide/vcpkg/vcpkg fetch nuget | tail -n 1` \ | ||
sources add \ | ||
-name "GitHub" \ | ||
-source "https://nuget.pkg.github.com/hpcc-systems/index.json" \ | ||
-storepasswordincleartext \ | ||
-username "${{ github.actor }}" \ | ||
-password "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Calculate vars | ||
id: vars | ||
working-directory: ${{ github.workspace }}/eclide/vcpkg | ||
shell: "bash" | ||
run: | | ||
branch_label_1=${{ github.base_ref }} | ||
branch_label_2=$(echo ${{ github.ref }} | cut -d'/' -f3) | ||
echo "branch_label=${branch_label_1:-$branch_label_2}" >> $GITHUB_OUTPUT | ||
vcpkg_sha_short=$(git rev-parse --short=8 HEAD) | ||
echo "vcpkg_sha_short=$vcpkg_sha_short" >> $GITHUB_OUTPUT | ||
- name: Print vars | ||
shell: "bash" | ||
run: | | ||
echo "${{ toJSON(steps.vars.outputs) }}" | ||
- uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: | | ||
${{github.workspace}}/build/vcpkg_installed | ||
key: vcpkg-${{ inputs.os }}-${{ steps.vars.outputs.vcpkg_sha_short }} | ||
|
||
- uses: hendrikmuhs/[email protected] | ||
with: | ||
save: ${{ inputs.update-cache == true }} | ||
key: gh-runner-${{ inputs.os }}-${{ inputs.build-type }}-${{ steps.vars.outputs.branch_label }}-eclide | ||
restore-keys: | | ||
gh-runner-${{ inputs.os }}-${{ inputs.build-type }}-${{ steps.vars.outputs.branch_label }}- | ||
gh-runner-${{ inputs.os }}-${{ inputs.build-type }}- | ||
gh-runner-${{ inputs.os }}- | ||
- name: CMake Configure | ||
shell: "bash" | ||
run: | | ||
mkdir -p ${{ github.workspace }}/build | ||
cmake -S ./eclide -B ./build -T host=x86 -A Win32 -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} | ||
- name: CMake Build | ||
run: | | ||
cmake --build ./build --config RelWithDebInfo --parallel ${{ inputs.upload-package == true && '--target package' || ''}} | ||
- name: Upload Package | ||
if: ${{ inputs.upload-package == true }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.asset-name }} | ||
path: | | ||
${{ github.workspace }}/build/*.exe | ||
if-no-files-found: error | ||
|
||
- name: Upload Error Logs | ||
if: ${{ failure() || cancelled() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.os }}-eclide-logs | ||
path: ${{ github.workspace }}/build/**/*.log |
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 |
---|---|---|
@@ -1,10 +1,20 @@ | ||
name: Test Build | ||
|
||
env: | ||
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,read" | ||
VCPKG_NUGET_REPOSITORY: "https://github.com/hpcc-systems/vcpkg" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
os: | ||
type: choice | ||
options: | ||
- 'windows-2022' | ||
- 'windows-2019' | ||
description: 'Operating System' | ||
required: false | ||
default: 'windows-2022' | ||
|
||
# Do not include "push" in final version (uncomment for testing on users own repo) | ||
# push: | ||
|
||
pull_request: | ||
branches: | ||
- "master" | ||
|
@@ -17,119 +27,28 @@ on: | |
- "!candidate-7.0.*" | ||
- "!candidate-6.*" | ||
|
||
jobs: | ||
preamble: | ||
name: Preamble | ||
runs-on: ubuntu-22.04 | ||
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 }} | ||
community_tag: ${{ steps.vars.outputs.community_tag }} | ||
internal_tag: ${{ steps.vars.outputs.internal_tag }} | ||
community_branch: ${{ steps.vars.outputs.community_branch }} | ||
cmake_docker_config: ${{ steps.vars.outputs.cmake_docker_config }} | ||
platform: "1" | ||
platform_testing_do_not_release: ${{ steps.skip_check.outputs.platform }} | ||
include_plugins: ${{ (steps.skip_check.outputs.plugins && 'ON') || 'OFF' }} | ||
steps: | ||
- name: Calculate vars | ||
id: vars | ||
run: | | ||
echo "folder_platform=${{ github.workspace }}/eclide" >> $GITHUB_OUTPUT | ||
echo 'mount_platform=source="${{ github.workspace }}/eclide",target=/hpcc-dev/eclide,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=${{ github.base_ref }}" >> $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 | ||
community_base_ref=${{ github.event.base_ref || github.ref }} | ||
echo "community_branch=$(echo $community_base_ref | cut -d'/' -f3)" >> $GITHUB_OUTPUT | ||
echo "cmake_docker_config=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF" >> $GITHUB_OUTPUT | ||
- name: Print vars | ||
run: | | ||
echo "${{ toJSON(steps.vars.outputs) }})" | ||
echo "${{ toJSON(steps.skip_check.outputs) }})" | ||
build-bare-metal: | ||
name: Build Bare Metal | ||
needs: preamble | ||
strategy: | ||
matrix: | ||
include: | ||
- os: "windows-2019" | ||
mono: "" | ||
sudo: "" | ||
cmake_config_options: '-G "Visual Studio 16 2019" -A Win32' | ||
cmake_build_options: "--config RelWithDebInfo --parallel $NUMBER_OF_PROCESSORS" | ||
event_name: "schedule" | ||
- os: "windows-2022" | ||
mono: "" | ||
sudo: "" | ||
cmake_config_options: '-G "Visual Studio 17 2022" -A Win32' | ||
cmake_build_options: "--config RelWithDebInfo --parallel $NUMBER_OF_PROCESSORS" | ||
event_name: "pull_request" | ||
fail-fast: false | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Print vars | ||
shell: "bash" | ||
run: | | ||
echo ${{ matrix.os }} | ||
echo "${{ toJSON(needs.preamble.outputs) }})" | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
- name: "Remove builtin vcpkg (old)" | ||
working-directory: . | ||
shell: "bash" | ||
run: | | ||
${{ matrix.sudo }} rm -rf "$VCPKG_INSTALLATION_ROOT" | ||
- name: Checkout eclide | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ needs.preamble.outputs.community_ref }} | ||
submodules: recursive | ||
path: ./eclide | ||
fetch-depth: 0 | ||
|
||
- name: "vcpkg Bootstrap" | ||
shell: "bash" | ||
run: | | ||
./eclide/vcpkg/bootstrap-vcpkg.sh | ||
- name: "Setup NuGet credentials" | ||
shell: "bash" | ||
run: | | ||
${{ matrix.mono }} `./eclide/vcpkg/vcpkg fetch nuget | tail -n 1` \ | ||
sources add \ | ||
-name "GitHub" \ | ||
-source "https://nuget.pkg.github.com/hpcc-systems/index.json" \ | ||
-storepasswordincleartext \ | ||
-username "${{ github.actor }}" \ | ||
-password "${{ secrets.GITHUB_TOKEN }}" | ||
- name: CMake Packages | ||
shell: "bash" | ||
run: | | ||
mkdir -p ./eclide/build | ||
cmake -S ./eclide -B ./eclide/build ${{ matrix.cmake_config_options }} | ||
cmake --build ./eclide/build ${{ matrix.cmake_build_options }} | ||
jobs: | ||
|
||
- name: Upload error logs | ||
if: ${{ failure() || cancelled() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.os }}-${{ matrix.package }}-logs | ||
path: ./build/**/*.log | ||
build-workflow-dispatch: | ||
if: ${{ contains('workflow_dispatch', github.event_name) }} | ||
uses: ./.github/workflows/build-gh_runner.yml | ||
with: | ||
os: ${{ inputs.os }} | ||
secrets: inherit | ||
|
||
build-gh_runner-windows-2022: | ||
if: ${{ contains('pull_request,push', github.event_name) }} | ||
uses: ./.github/workflows/build-gh_runner.yml | ||
with: | ||
os: windows-2022 | ||
secrets: inherit | ||
|
||
build-gh_runner-windows-2019: | ||
if: ${{ contains('schedule,push', github.event_name) }} | ||
uses: ./.github/workflows/build-gh_runner.yml | ||
with: | ||
os: windows-2019 | ||
secrets: inherit |
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
This file was deleted.
Oops, something went wrong.
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
Submodule vcpkg
updated
18 files
+93 −0 | .github/workflows/prebuild-gh_envs.yml | |
+0 −1 | .gitignore | |
+6 −0 | overlays/boost-signals/CONTROL | |
+16 −0 | overlays/boost-signals/portfile.cmake | |
+28 −0 | overlays/bugtrap/portfile.cmake | |
+8 −0 | overlays/bugtrap/vcpkg.json | |
+3 −0 | overlays/gsoap/CONTROL | |
+307 −0 | overlays/gsoap/fix-build-in-windows.patch | |
+47 −0 | overlays/gsoap/portfile.cmake | |
+3 −0 | overlays/scintilla/CONTROL | |
+23 −0 | overlays/scintilla/portfile.cmake | |
+15 −0 | overlays/scintilla/use-string-in-platwin.patch | |
+55 −0 | overlays/webview2/portfile.cmake | |
+21 −0 | overlays/webview2/unofficial-webview2-config.cmake | |
+13 −0 | overlays/webview2/vcpkg.json | |
+5 −0 | overlays/wtl/CONTROL | |
+18 −0 | overlays/wtl/portfile.cmake | |
+77 −0 | vcpkg.json |
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.