Skip to content

Commit

Permalink
Add Github account settings
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
xwang2713 committed Feb 28, 2024
1 parent a5a1e7e commit 6c777c6
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 36 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build-ce-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
env:
COMMUNITY_REF: "dc1cdacdbdda6e5ca1c5b836e130c2deb2d2fe62"
#COMMUNITY_REF: <GIT REF>
GITHUB_ACCOUNT: ${{ github.repository_owner }}
runs-on: ubuntu-22.04
permissions:
contents: write
Expand All @@ -29,10 +30,13 @@ jobs:
candidate_branch: ${{ steps.vars.outputs.candidate_branch }}
cmake_docker_config: ${{ steps.vars.outputs.cmake_docker_config }}
gpg_import: ${{ steps.vars.outputs.gpg_import }}
github_account: ${{ steps.vars.outputs.github_account }}
steps:
- name: Calculate vars
id: vars
run: |
github_account=${{ env.GITHUB_ACCOUNT }}
echo "github_account=$github_account" >> $GITHUB_OUTPUT
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_build=${{ github.workspace }}/build" >> $GITHUB_OUTPUT
Expand All @@ -46,7 +50,7 @@ jobs:
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 "cmake_docker_config=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DSIGN_MODULES=${{ env.GITHUB_ACCOUNT == 'hpcc-systems' && 'ON' || 'OFF' }}" >> $GITHUB_OUTPUT
echo 'gpg_import=gpg --batch --import /hpcc-dev/build/private.key' >> $GITHUB_OUTPUT
- name: Print vars
Expand Down Expand Up @@ -87,7 +91,7 @@ jobs:
- name: Checkout HPCC-Platform
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/HPCC-Platform
repository: ${{ needs.preamble.outputs.github_account }}/HPCC-Platform
ref: ${{ needs.preamble.outputs.community_ref }}
submodules: recursive
path: ${{ needs.preamble.outputs.folder_platform }}
Expand Down Expand Up @@ -124,8 +128,8 @@ jobs:
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' }}
push: ${{ needs.preamble.outputs.github_account == 'hpcc-systems' }}
load: ${{ needs.preamble.outputs.github_account != 'hpcc-systems' }}
build-args: |
VCPKG_REF=${{ steps.vars.outputs.vcpkg_sha_short }}
tags: |
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/build-ce-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ jobs:
preamble:
name: Publish Release
env:
COMMUNITY_REF: "dc1cdacdbdda6e5ca1c5b836e130c2deb2d2fe62"
#COMMUNITY_REF: <GIT REF>
#COMMUNITY_REF: "dc1cdacdbdda6e5ca1c5b836e130c2deb2d2fe62"
COMMUNITY_REF: <GIT REF>
GITHUB_ACCOUNT: ${{ github.repository_owner }}
runs-on: ubuntu-22.04
permissions:
contents: write
Expand All @@ -29,10 +30,14 @@ jobs:
candidate_branch: ${{ steps.vars.outputs.candidate_branch }}
cmake_docker_config: ${{ steps.vars.outputs.cmake_docker_config }}
gpg_import: ${{ steps.vars.outputs.gpg_import }}
github_account: ${{ steps.vars.outputs.github_account }}
steps:
- name: Calculate vars
id: vars
run: |
github_account=${{ env.GITHUB_ACCOUNT }}
echo "github_account=$github_account" >> $GITHUB_OUTPUT
echo "folder_platform=${{ github.workspace }}/HPCC-Platform" >> $GITHUB_OUTPUT
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_build=${{ github.workspace }}/build" >> $GITHUB_OUTPUT
Expand All @@ -46,7 +51,7 @@ jobs:
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 "cmake_docker_config=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DSIGN_MODULES=${{ env.GITHUB_ACCOUNT == 'hpcc-systems' && 'ON' || 'OFF' }}" >> $GITHUB_OUTPUT
echo 'gpg_import=gpg --batch --import /hpcc-dev/build/private.key' >> $GITHUB_OUTPUT
- name: Print vars
Expand Down Expand Up @@ -87,7 +92,7 @@ jobs:
- name: Checkout HPCC-Platform
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/HPCC-Platform
repository: ${{ needs.preamble.outputs.github_account }}/HPCC-Platform
ref: ${{ needs.preamble.outputs.community_ref }}
submodules: recursive
path: ${{ needs.preamble.outputs.folder_platform }}
Expand Down Expand Up @@ -124,8 +129,8 @@ jobs:
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' }}
push: ${{ needs.preamble.outputs.github_account == 'hpcc-systems' }}
load: ${{ needs.preamble.outputs.github_account != 'hpcc-systems' }}
build-args: |
VCPKG_REF=${{ steps.vars.outputs.vcpkg_sha_short }}
tags: |
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
env:
#COMMUNITY_REF: "dc1cdacdbdda6e5ca1c5b836e130c2deb2d2fe62"
COMMUNITY_REF: <GIT REF>
GITHUB_ACCOUNT: ${{ github.repository_owner }}
runs-on: ubuntu-22.04
permissions:
contents: write
Expand All @@ -29,10 +30,13 @@ jobs:
candidate_branch: ${{ steps.vars.outputs.candidate_branch }}
cmake_docker_config: ${{ steps.vars.outputs.cmake_docker_config }}
gpg_import: ${{ steps.vars.outputs.gpg_import }}
github_account: ${{ steps.vars.outputs.github_account }}
steps:
- name: Calculate vars
id: vars
run: |
github_account=${{ env.GITHUB_ACCOUNT }}
echo "github_account=$github_account" >> $GITHUB_OUTPUT
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_build=${{ github.workspace }}/build" >> $GITHUB_OUTPUT
Expand All @@ -46,7 +50,7 @@ jobs:
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 "cmake_docker_config=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DSIGN_MODULES=${{ env.GITHUB_ACCOUNT == 'hpcc-systems' && 'ON' || 'OFF' }}" >> $GITHUB_OUTPUT
echo 'gpg_import=gpg --batch --import /hpcc-dev/build/private.key' >> $GITHUB_OUTPUT
- name: Print vars
Expand Down Expand Up @@ -87,7 +91,7 @@ jobs:
- name: Checkout HPCC-Platform
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/HPCC-Platform
repository: ${{ needs.preamble.outputs.github_account }}/HPCC-Platform
ref: ${{ needs.preamble.outputs.community_ref }}
submodules: recursive
path: ${{ needs.preamble.outputs.folder_platform }}
Expand Down Expand Up @@ -124,8 +128,8 @@ jobs:
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' }}
push: ${{ needs.preamble.outputs.github_account == 'hpcc-systems' }}
load: ${{ needs.preamble.outputs.github_account != 'hpcc-systems' }}
build-args: |
VCPKG_REF=${{ steps.vars.outputs.vcpkg_sha_short }}
tags: |
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/build-ide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ env:
VCPKG_NUGET_REPOSITORY: "https://github.com/hpcc-systems/vcpkg"

on:
#workflow_dispatch
push:
workflow_dispatch
#push:

jobs:
preamble:
name: Publish Release
env:
COMMUNITY_REF: "3eb770915a09815ab4342d157a25ef306f2b1523"
ECLIDE_REF: "97207e7283550c3d6205333b8322498eddfddc8b"
#COMMUNITY_REF: "3eb770915a09815ab4342d157a25ef306f2b1523"
#ECLIDE_REF: "97207e7283550c3d6205333b8322498eddfddc8b"
COMMUNITY_REF: <GIT REF>
ECLIDE_REF: <GIT REF>
GITHUB_ACCOUNT: ${{ github.repository_owner }}
runs-on: ubuntu-22.04
permissions:
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/build-ln.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ jobs:
preamble:
name: Publish Release
env:
COMMUNITY_REF: "7f95c5258d514633cf5a859139b89e40cd4a457b"
LN_REF: "12c5cba2d2add550b932eaa65f62675fb8e165ce"
#COMMUNITY_REF: <GIT REF>
#COMMUNITY_REF: "7f95c5258d514633cf5a859139b89e40cd4a457b"
#LN_REF: "12c5cba2d2add550b932eaa65f62675fb8e165ce"
COMMUNITY_REF: <GIT REF>
LN_REF: <GIT REF>
GITHUB_ACCOUNT: ${{ github.repository_owner }}
runs-on: ubuntu-22.04
permissions:
contents: write
Expand All @@ -34,10 +36,13 @@ jobs:
candidate_branch: ${{ steps.vars.outputs.candidate_branch }}
cmake_docker_config: ${{ steps.vars.outputs.cmake_docker_config }}
gpg_import: ${{ steps.vars.outputs.gpg_import }}
github_account: ${{ steps.vars.outputs.github_account }}
steps:
- name: Calculate vars
id: vars
run: |
github_account=${{ env.GITHUB_ACCOUNT }}
echo "github_account=$github_account" >> $GITHUB_OUTPUT
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
Expand All @@ -57,7 +62,7 @@ jobs:
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 "cmake_docker_config=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DSIGN_MODULES=${{ env.GITHUB_ACCOUNT == 'hpcc-systems' && 'ON' || 'OFF' }}" >> $GITHUB_OUTPUT
echo 'gpg_import=gpg --batch --import /hpcc-dev/build/private.key' >> $GITHUB_OUTPUT
- name: Print vars
Expand Down Expand Up @@ -100,15 +105,15 @@ jobs:
- name: Checkout HPCC-Platform
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/HPCC-Platform
repository: ${{ needs.preamble.outputs.github_account }}/HPCC-Platform
ref: ${{ needs.preamble.outputs.community_ref }}
submodules: recursive
path: ${{ needs.preamble.outputs.folder_platform }}

- name: Checkout LN
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/LN
repository: ${{ needs.preamble.outputs.github_account }}/LN
token: ${{ secrets.LNB_TOKEN }}
ref: ${{ needs.preamble.outputs.internal_ref }}
submodules: recursive
Expand Down Expand Up @@ -146,8 +151,8 @@ jobs:
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' }}
push: ${{ needs.preamble.outputs.github_account == 'hpcc-systems' }}
load: ${{ needs.preamble.outputs.github_account != 'hpcc-systems' }}
build-args: |
VCPKG_REF=${{ steps.vars.outputs.vcpkg_sha_short }}
tags: |
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/build-win-osx-ct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ jobs:
preamble:
name: Publish Release
env:
COMMUNITY_REF: "3eb770915a09815ab4342d157a25ef306f2b1523"
LN_REF: "bfe0d6a9fce8d0caa73417b0b9be748fab9f75ab"
#COMMUNITY_REF: "3eb770915a09815ab4342d157a25ef306f2b1523"
#LN_REF: "bfe0d6a9fce8d0caa73417b0b9be748fab9f75ab"
COMMUNITY_REF: <GIT REF>
LN_REF: <GIT REF>
GITHUB_ACCOUNT: ${{ github.repository_owner }}
runs-on: ubuntu-22.04
permissions:
contents: write
Expand All @@ -33,10 +36,13 @@ jobs:
candidate_branch: ${{ steps.vars.outputs.candidate_branch }}
cmake_docker_config: ${{ steps.vars.outputs.cmake_docker_config }}
gpg_import: ${{ steps.vars.outputs.gpg_import }}
github_account: ${{ steps.vars.outputs.github_account }}
steps:
- name: Calculate vars
id: vars
run: |
github_account=${{ env.GITHUB_ACCOUNT }}
echo "github_account=$github_account" >> $GITHUB_OUTPUT
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
Expand All @@ -56,7 +62,7 @@ jobs:
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 "cmake_docker_config=-DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_FILES_DIR=/hpcc-dev -DCPACK_THREADS=0 -DUSE_OPTIONAL=OFF -DSIGN_MODULES=${{ env.GITHUB_ACCOUNT == 'hpcc-systems' && 'ON' || 'OFF' }}" >> $GITHUB_OUTPUT
echo 'gpg_import=gpg --batch --import /hpcc-dev/build/private.key' >> $GITHUB_OUTPUT
- name: Print vars
Expand Down Expand Up @@ -110,15 +116,15 @@ jobs:
- name: Checkout HPCC-Platform
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/HPCC-Platform
repository: ${{ needs.preamble.outputs.github_account }}/HPCC-Platform
ref: ${{ needs.preamble.outputs.community_ref }}
submodules: recursive
path: ./HPCC-Platform

- name: Checkout LN
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/LN
repository: ${{ needs.preamble.outputs.github_account }}/LN
token: ${{ secrets.LNB_TOKEN }}
ref: ${{ needs.preamble.outputs.internal_ref }}
submodules: recursive
Expand Down
35 changes: 30 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# github-action-dev-build

Build individual HPCC-Platform Project with Github Action
To use this clone this repo to your Github account, pick a github action script under .github/workflows/
Replace the <GIT REF> for the HPCC-Platform/LN/ECLIDE branch. You also can replace GITHUB_ACCOUNT if users
want to build with other Github account.
Users can modify the CMake options as they wish

Requirement: following Michael's instruction to create SECRETS.



Pick a workflow script and uncommts push and disable workflow_dispatch:
To trigger a build automatically uncommts push and disable workflow_dispatch:
```code
on:
#workflow_dispatch:
push:
```
Update <GIT_REF> and related settings following each build case

To trigger the build:
Commit the change and submit this branch to start the build:
If you don't set "push" you can pick a script from .github/workflow/ and manually run the workflow Github Action
```console
git add <workspaces>/<script>
git commit
Expand Down Expand Up @@ -62,6 +65,28 @@ Get the first line first column and replace <GIT CE REF> and <GIT LN REF> in .gi
COMMUNITY_REF: <GIT CE REF>
LN_REF: <GIT LN REF>
```
The default artifact file name: LN-Packages-<os>.mzip
The default artifact file name: LN-Packages-<os>.zip

## Windows and OSX Community/LN Clienttools
Get LN and Platform git reference
```console
git show-ref --head <branch name>
```
Get the first line first column and replace <GIT CE REF> and <GIT LN REF> in .github/workflows/build-win-osx.yml
```code
COMMUNITY_REF: <GIT CE REF>
LN_REF: <GIT LN REF>
```
The default artifact file names: WinOSX-Clienttools.zip and WinOSX-LN-Clienttools.zip

## ECLIDE Build
Get LN and Platform git reference
```console
git show-ref --head <branch name>
```
Get the first line first column and replace <GIT CE REF> and <GIT LN REF> in .github/workflows/build-ide.yml
```code
COMMUNITY_REF: <GIT CE REF>
LN_REF: <GIT LN REF>
```
The default artifact file names: ECLIDE.zip

0 comments on commit 6c777c6

Please sign in to comment.