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

Commit 3c144c1

Browse files
Feat Installer and CICD nightly, beta, stable for cortexcpp (#1122)
Co-authored-by: Hien To <tominhhien97@gmail.com> Co-authored-by: Service Account <service@jan.ai>
1 parent c67d281 commit 3c144c1

37 files changed

+1602
-827
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/cortex-build.yml

Lines changed: 0 additions & 250 deletions
This file was deleted.

.github/workflows/cortex-cpp-quality-gate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,16 @@ jobs:
9292
- name: Upload Artifact
9393
uses: actions/upload-artifact@v4
9494
with:
95-
name: cortex-cpp-${{ matrix.os }}-${{ matrix.name }}
96-
path: ./engine/cortex-cpp
95+
name: cortex-${{ matrix.os }}-${{ matrix.name }}
96+
path: ./engine/cortex
9797

9898
- name: Upload ccache to s3
9999
continue-on-error: true
100100
if: always() && runner.os == 'Windows'
101101
run: |
102102
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
103103
refreshenv
104-
aws s3 cp ${{ matrix.ccache-dir }} s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-cpp-${{ matrix.os }}-${{ matrix.name }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
104+
aws s3 cp ${{ matrix.ccache-dir }} s3://${{ secrets.MINIO_BUCKET_NAME }}/cortex-${{ matrix.os }}-${{ matrix.name }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
105105
env:
106106
AWS_ACCESS_KEY_ID: "${{ secrets.MINIO_ACCESS_KEY_ID }}"
107107
AWS_SECRET_ACCESS_KEY: "${{ secrets.MINIO_SECRET_ACCESS_KEY }}"

0 commit comments

Comments
 (0)