Skip to content

Commit

Permalink
fixup! chore: CI to test CPP SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaKasar committed Nov 18, 2024
1 parent a5f9f25 commit 9113832
Showing 1 changed file with 52 additions and 27 deletions.
79 changes: 52 additions & 27 deletions .github/workflows/cxx-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,23 +277,6 @@ jobs:
container:
image: node:latest
steps:
- name: Firebolt Openrpc
run: |
mkdir -p /__w/openrpc
cd /__w/openrpc
git init
git remote add -f origin https://github.com/rdkcentral/firebolt-openrpc.git
git config core.sparseCheckout true
echo "languages/cpp/src/shared/CMakeLists.txt" >> .git/info/sparse-checkout
echo "languages/cpp/templates/sdk/scripts/build.sh" >> .git/info/sparse-checkout
git pull origin chore/cpp-ci-unit-covorage-report
- name: Download Thunder
uses: actions/download-artifact@v3
with:
name: thunder
path: /__w/thunder/install/

- name: Checkout
uses: actions/checkout@v2
with:
Expand All @@ -316,10 +299,7 @@ jobs:
key: deps-node-modules-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
run: |
apt update
apt install -y cmake
npm install
run: npm install

- name: Set file permissions
run: |
Expand All @@ -330,15 +310,59 @@ jobs:
run: |
npm run dist
- name: Generate core SDK source code
run: |
.github/workflows/utils.sh generate_cpp_core_sdk_source_code
- name: Upload artifacts
- name: Upload Core SDK
uses: actions/upload-artifact@v3
with:
name: core
path: /__w/firebolt-apis/firebolt-apis/src/sdks/core/build/cpp/src/
path: src/sdks/core

core_sdk:
name: Build Core SDK
needs: [thunder, openrpc]
runs-on: ubuntu-latest
container:
image: node:latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Download Core SDK
uses: actions/download-artifact@v3
with:
name: core
path: /__w/firebolt-apis/firebolt-apis/src/sdks/core

- name: Download Thunder
uses: actions/download-artifact@v3
with:
name: thunder
path: /__w/thunder/install/

- name: Firebolt Openrpc
run: |
mkdir -p /__w/openrpc
cd /__w/openrpc
git init
git remote add -f origin https://github.com/rdkcentral/firebolt-openrpc.git
git config core.sparseCheckout true
echo "languages/cpp/src/shared/CMakeLists.txt" >> .git/info/sparse-checkout
git pull origin chore/cpp-ci-unit-covorage-report
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: deps-node-modules-${{ hashFiles('package-lock.json') }}

- name: Install npm dependencies
run: |
apt update
apt install -y cmake
npm install
- name: Generate core SDK source code
run: |
.github/workflows/utils.sh generate_cpp_core_sdk_source_code
- name: Build CXX Core SDK
run: |
Expand All @@ -347,3 +371,4 @@ jobs:
- name: Test CXX Core SDK
run: |
.github/workflows/utils.sh test_core_cpp_sdk

0 comments on commit 9113832

Please sign in to comment.