Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 4fdec02

Browse files
committed
Add CI beta and stable build
1 parent 2815191 commit 4fdec02

File tree

9 files changed

+258
-16
lines changed

9 files changed

+258
-16
lines changed

.github/workflows/beta-build.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: CI Cortex CPP Beta Build
2+
3+
on:
4+
push:
5+
tags: ["v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"]
6+
7+
jobs:
8+
# Job create Update app version based on latest release tag with build number and save to output
9+
get-update-version:
10+
uses: ./.github/workflows/template-get-update-version.yml
11+
12+
create-draft-release:
13+
runs-on: ubuntu-latest
14+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
15+
outputs:
16+
upload_url: ${{ steps.create_release.outputs.upload_url }}
17+
version: ${{ steps.get_version.outputs.version }}
18+
permissions:
19+
contents: write
20+
steps:
21+
- name: Extract tag name without v prefix
22+
id: get_version
23+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV && echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
24+
env:
25+
GITHUB_REF: ${{ github.ref }}
26+
- name: Create Draft Release
27+
id: create_release
28+
uses: softprops/action-gh-release@v2
29+
with:
30+
tag_name: ${{ github.ref_name }}
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
name: "${{ env.VERSION }}"
33+
draft: true
34+
prerelease: false
35+
36+
build-macos-x64:
37+
uses: ./.github/workflows/template-build-macos.yml
38+
needs: [get-update-version, create-draft-release]
39+
secrets: inherit
40+
with:
41+
ref: ${{ github.ref }}
42+
public_provider: github
43+
new_version: ${{ needs.get-update-version.outputs.new_version }}
44+
runs-on: macos-12
45+
cmake-flags: "-DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
46+
channel: beta
47+
arch: amd64
48+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
49+
50+
build-macos-arm64:
51+
uses: ./.github/workflows/template-build-macos.yml
52+
needs: [get-update-version, create-draft-release]
53+
secrets: inherit
54+
with:
55+
ref: ${{ github.ref }}
56+
public_provider: github
57+
new_version: ${{ needs.get-update-version.outputs.new_version }}
58+
runs-on: macos-latest
59+
cmake-flags: "-DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DMAC_ARM64=ON -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
60+
channel: beta
61+
arch: arm64
62+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
63+
64+
build-windows-x64:
65+
uses: ./.github/workflows/template-build-windows-x64.yml
66+
secrets: inherit
67+
needs: [get-update-version, create-draft-release]
68+
with:
69+
ref: ${{ github.ref }}
70+
public_provider: github
71+
new_version: ${{ needs.get-update-version.outputs.new_version }}
72+
runs-on: windows-cuda-11-7
73+
cmake-flags: "-DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DBUILD_SHARED_LIBS=OFF -DCMAKE_TOOLCHAIN_FILE=C:/w/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
74+
build-deps-cmake-flags: "-DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
75+
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
76+
channel: beta
77+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
78+
79+
build-linux-x64:
80+
uses: ./.github/workflows/template-build-linux-x64.yml
81+
secrets: inherit
82+
needs: [get-update-version, create-draft-release]
83+
with:
84+
ref: ${{ github.ref }}
85+
public_provider: github
86+
new_version: ${{ needs.get-update-version.outputs.new_version }}
87+
runs-on: ubuntu-20-04
88+
cmake-flags: "-DCORTEX_VARIANT=beta -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
89+
channel: beta
90+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
91+
92+
update_release_draft:
93+
needs: [build-macos-x64, build-macos-arm64, build-windows-x64, build-linux-x64]
94+
permissions:
95+
# write permission is required to create a github release
96+
contents: write
97+
# write permission is required for autolabeler
98+
# otherwise, read permission is required at least
99+
pull-requests: write
100+
runs-on: ubuntu-latest
101+
steps:
102+
# (Optional) GitHub Enterprise requires GHE_HOST variable set
103+
#- name: Set GHE_HOST
104+
# run: |
105+
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
106+
107+
# Drafts your next Release notes as Pull Requests are merged into "master"
108+
- uses: release-drafter/release-drafter@v5
109+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
110+
# with:
111+
# config-name: my-config.yml
112+
# disable-autolabeler: true
113+
env:
114+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/nightly-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
- name: Update latest version
103103
id: update-latest-version
104104
run: |
105-
echo "{\"tag_name\": \"v${{ needs.get-update-version.outputs.new_version }}\"}" > version.json
105+
echo "{\"tag_name\": \"${{ needs.get-update-version.outputs.new_version }}\"}" > version.json
106106
aws s3 cp version.json s3://${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}/cortex/latest/version.json
107107
env:
108108
AWS_ACCESS_KEY_ID: ${{ secrets.DELTA_AWS_ACCESS_KEY_ID }}

.github/workflows/stable-build.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: CI Cortex CPP Stable Build
2+
3+
on:
4+
push:
5+
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
6+
7+
jobs:
8+
# Job create Update app version based on latest release tag with build number and save to output
9+
get-update-version:
10+
uses: ./.github/workflows/template-get-update-version.yml
11+
12+
create-draft-release:
13+
runs-on: ubuntu-latest
14+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
15+
outputs:
16+
upload_url: ${{ steps.create_release.outputs.upload_url }}
17+
version: ${{ steps.get_version.outputs.version }}
18+
permissions:
19+
contents: write
20+
steps:
21+
- name: Extract tag name without v prefix
22+
id: get_version
23+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV && echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
24+
env:
25+
GITHUB_REF: ${{ github.ref }}
26+
- name: Create Draft Release
27+
id: create_release
28+
uses: softprops/action-gh-release@v2
29+
with:
30+
tag_name: ${{ github.ref_name }}
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
name: "${{ env.VERSION }}"
33+
draft: true
34+
prerelease: false
35+
36+
build-macos-x64:
37+
uses: ./.github/workflows/template-build-macos.yml
38+
needs: [get-update-version, create-draft-release]
39+
secrets: inherit
40+
with:
41+
ref: ${{ github.ref }}
42+
public_provider: github
43+
new_version: ${{ needs.get-update-version.outputs.new_version }}
44+
runs-on: macos-12
45+
cmake-flags: "-DCORTEX_VARIANT=prod -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
46+
channel: stable
47+
arch: amd64
48+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
49+
50+
build-macos-arm64:
51+
uses: ./.github/workflows/template-build-macos.yml
52+
needs: [get-update-version, create-draft-release]
53+
secrets: inherit
54+
with:
55+
ref: ${{ github.ref }}
56+
public_provider: github
57+
new_version: ${{ needs.get-update-version.outputs.new_version }}
58+
runs-on: macos-latest
59+
cmake-flags: "-DCORTEX_VARIANT=prod -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DMAC_ARM64=ON -DCMAKE_TOOLCHAIN_FILE=/Users/runner/work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
60+
channel: stable
61+
arch: arm64
62+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
63+
64+
build-windows-x64:
65+
uses: ./.github/workflows/template-build-windows-x64.yml
66+
secrets: inherit
67+
needs: [get-update-version, create-draft-release]
68+
with:
69+
ref: ${{ github.ref }}
70+
public_provider: github
71+
new_version: ${{ needs.get-update-version.outputs.new_version }}
72+
runs-on: windows-cuda-11-7
73+
cmake-flags: "-DCORTEX_VARIANT=prod -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DBUILD_SHARED_LIBS=OFF -DCMAKE_TOOLCHAIN_FILE=C:/w/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
74+
build-deps-cmake-flags: "-DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CUDA_COMPILER_LAUNCHER=ccache -GNinja"
75+
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
76+
channel: stable
77+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
78+
79+
build-linux-x64:
80+
uses: ./.github/workflows/template-build-linux-x64.yml
81+
secrets: inherit
82+
needs: [get-update-version, create-draft-release]
83+
with:
84+
ref: ${{ github.ref }}
85+
public_provider: github
86+
new_version: ${{ needs.get-update-version.outputs.new_version }}
87+
runs-on: ubuntu-20-04
88+
cmake-flags: "-DCORTEX_VARIANT=prod -DCORTEX_CPP_VERSION=${{ needs.get-update-version.outputs.new_version }} -DCMAKE_TOOLCHAIN_FILE=/home/runner/actions-runner/_work/cortex.cpp/cortex.cpp/engine/vcpkg/scripts/buildsystems/vcpkg.cmake"
89+
channel: stable
90+
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
91+
92+
update_release_draft:
93+
needs: [build-macos-x64, build-macos-arm64, build-windows-x64, build-linux-x64]
94+
permissions:
95+
# write permission is required to create a github release
96+
contents: write
97+
# write permission is required for autolabeler
98+
# otherwise, read permission is required at least
99+
pull-requests: write
100+
runs-on: ubuntu-latest
101+
steps:
102+
# (Optional) GitHub Enterprise requires GHE_HOST variable set
103+
#- name: Set GHE_HOST
104+
# run: |
105+
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
106+
107+
# Drafts your next Release notes as Pull Requests are merged into "master"
108+
- uses: release-drafter/release-drafter@v5
109+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
110+
# with:
111+
# config-name: my-config.yml
112+
# disable-autolabeler: true
113+
env:
114+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/template-build-linux-x64.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
if [ "${{ inputs.channel }}" == "stable" ]; then
8080
echo "::set-output name=package_name::cortexcpp"
8181
echo "::set-output name=destination_binary_name::cortex"
82-
echo "::set-output name=data_folder_name::.cortex"
82+
echo "::set-output name=data_folder_name::cortexcpp"
8383
echo "::set-output name=configuration_file_name::.cortexrc"
8484
echo "::set-output name=uninstaller_file_name::cortex-uninstall.sh"
8585
echo "::set-output name=iss_file_name::installer.iss"
@@ -89,7 +89,7 @@ jobs:
8989
if [ "${{ inputs.channel }}" == "beta" ]; then
9090
echo "::set-output name=package_name::cortexcpp-beta"
9191
echo "::set-output name=destination_binary_name::cortex-beta"
92-
echo "::set-output name=data_folder_name::.cortex-beta"
92+
echo "::set-output name=data_folder_name::cortexcpp-beta"
9393
echo "::set-output name=configuration_file_name::.cortexrc-beta"
9494
echo "::set-output name=uninstaller_file_name::cortex-beta-uninstall.sh"
9595
echo "::set-output name=iss_file_name::installer-beta.iss"
@@ -99,7 +99,7 @@ jobs:
9999
if [ "${{ inputs.channel }}" == "nightly" ]; then
100100
echo "::set-output name=package_name::cortexcpp-nightly"
101101
echo "::set-output name=destination_binary_name::cortex-nightly"
102-
echo "::set-output name=data_folder_name::.cortex-nightly"
102+
echo "::set-output name=data_folder_name::cortexcpp-nightly"
103103
echo "::set-output name=configuration_file_name::.cortexrc-nightly"
104104
echo "::set-output name=uninstaller_file_name::cortex-nightly-uninstall.sh"
105105
echo "::set-output name=iss_file_name::installer-nightly.iss"
@@ -167,6 +167,8 @@ jobs:
167167
- name: Upload release assert if public provider is github
168168
if: inputs.public_provider == 'github'
169169
uses: actions/[email protected]
170+
env:
171+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170172
with:
171173
upload_url: ${{ inputs.upload_url }}
172174
asset_path: ./engine/cortex.tar.gz
@@ -175,6 +177,8 @@ jobs:
175177

176178
- name: Upload release assert if public provider is github
177179
if: inputs.public_provider == 'github'
180+
env:
181+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
178182
uses: actions/[email protected]
179183
with:
180184
upload_url: ${{ inputs.upload_url }}

.github/workflows/template-build-macos.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
if [ "${{ inputs.channel }}" == "stable" ]; then
9898
echo "::set-output name=package_name::cortexcpp"
9999
echo "::set-output name=destination_binary_name::cortex"
100-
echo "::set-output name=data_folder_name::.cortex"
100+
echo "::set-output name=data_folder_name::cortexcpp"
101101
echo "::set-output name=configuration_file_name::.cortexrc"
102102
echo "::set-output name=uninstaller_file_name::cortex-uninstall.sh"
103103
echo "::set-output name=iss_file_name::installer.iss"
@@ -107,7 +107,7 @@ jobs:
107107
if [ "${{ inputs.channel }}" == "beta" ]; then
108108
echo "::set-output name=package_name::cortexcpp-beta"
109109
echo "::set-output name=destination_binary_name::cortex-beta"
110-
echo "::set-output name=data_folder_name::.cortex-beta"
110+
echo "::set-output name=data_folder_name::cortexcpp-beta"
111111
echo "::set-output name=configuration_file_name::.cortexrc-beta"
112112
echo "::set-output name=uninstaller_file_name::cortex-beta-uninstall.sh"
113113
echo "::set-output name=iss_file_name::installer-beta.iss"
@@ -117,7 +117,7 @@ jobs:
117117
if [ "${{ inputs.channel }}" == "nightly" ]; then
118118
echo "::set-output name=package_name::cortexcpp-nightly"
119119
echo "::set-output name=destination_binary_name::cortex-nightly"
120-
echo "::set-output name=data_folder_name::.cortex-nightly"
120+
echo "::set-output name=data_folder_name::cortexcpp-nightly"
121121
echo "::set-output name=configuration_file_name::.cortexrc-nightly"
122122
echo "::set-output name=uninstaller_file_name::cortex-nightly-uninstall.sh"
123123
echo "::set-output name=iss_file_name::installer-nightly.iss"
@@ -215,6 +215,8 @@ jobs:
215215

216216
- name: Upload release assert if public provider is github
217217
if: inputs.public_provider == 'github'
218+
env:
219+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
218220
uses: actions/[email protected]
219221
with:
220222
upload_url: ${{ inputs.upload_url }}
@@ -224,6 +226,8 @@ jobs:
224226

225227
- name: Upload release assert if public provider is github
226228
if: inputs.public_provider == 'github'
229+
env:
230+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
227231
uses: actions/[email protected]
228232
with:
229233
upload_url: ${{ inputs.upload_url }}

.github/workflows/template-build-windows-x64.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
if [ "${{ inputs.channel }}" == "stable" ]; then
101101
echo "::set-output name=package_name::cortexcpp"
102102
echo "::set-output name=destination_binary_name::cortex"
103-
echo "::set-output name=data_folder_name::.cortex"
103+
echo "::set-output name=data_folder_name::cortexcpp"
104104
echo "::set-output name=configuration_file_name::.cortexrc"
105105
echo "::set-output name=uninstaller_file_name::cortex-uninstall.sh"
106106
echo "::set-output name=iss_file_name::installer.iss"
@@ -110,7 +110,7 @@ jobs:
110110
if [ "${{ inputs.channel }}" == "beta" ]; then
111111
echo "::set-output name=package_name::cortexcpp-beta"
112112
echo "::set-output name=destination_binary_name::cortex-beta"
113-
echo "::set-output name=data_folder_name::.cortex-beta"
113+
echo "::set-output name=data_folder_name::cortexcpp-beta"
114114
echo "::set-output name=configuration_file_name::.cortexrc-beta"
115115
echo "::set-output name=uninstaller_file_name::cortex-beta-uninstall.sh"
116116
echo "::set-output name=iss_file_name::installer-beta.iss"
@@ -120,7 +120,7 @@ jobs:
120120
if [ "${{ inputs.channel }}" == "nightly" ]; then
121121
echo "::set-output name=package_name::cortexcpp-nightly"
122122
echo "::set-output name=destination_binary_name::cortex-nightly"
123-
echo "::set-output name=data_folder_name::.cortex-nightly"
123+
echo "::set-output name=data_folder_name::cortexcpp-nightly"
124124
echo "::set-output name=configuration_file_name::.cortexrc-nightly"
125125
echo "::set-output name=uninstaller_file_name::cortex-nightly-uninstall.sh"
126126
echo "::set-output name=iss_file_name::installer-nightly.iss"
@@ -230,6 +230,8 @@ jobs:
230230

231231
- name: Upload release assert if public provider is github
232232
if: inputs.public_provider == 'github'
233+
env:
234+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
233235
uses: actions/[email protected]
234236
with:
235237
upload_url: ${{ inputs.upload_url }}
@@ -239,6 +241,8 @@ jobs:
239241

240242
- name: Upload release assert if public provider is github
241243
if: inputs.public_provider == 'github'
244+
env:
245+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
242246
uses: actions/[email protected]
243247
with:
244248
upload_url: ${{ inputs.upload_url }}

.github/workflows/template-get-update-version.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
2121
id: tag
2222
uses: dawidd6/action-get-tag@v1
23+
with:
24+
strip_v: true
2325

2426
- name: Update app version based on latest release tag with build number
2527
id: version_update

0 commit comments

Comments
 (0)