Skip to content

fixup! feat(core): CI pipeline to build and test CPP SDK #12

fixup! feat(core): CI pipeline to build and test CPP SDK

fixup! feat(core): CI pipeline to build and test CPP SDK #12

Workflow file for this run

name: CXX build
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'next'
- 'feature/cxx-build-workflow'
env:
HUSKY: 0
jobs:
install_thunder:
name: Build and install Thunder Library
runs-on: ubuntu-latest
container:
image: kevinshahfws/node-c:3.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clone and Install Thunder
id: install_thunder
run: |
.github/workflows/utils.sh cloneAndInstallThunder
pwd
ls /home
- name: Upload the library artifact
uses: actions/upload-artifact@v3
with:
name: thunder
path: /__w/firebolt-apis/install/
build_cxx_sdks:
name: Build and test CXX SDKs
needs: install_thunder
runs-on: ubuntu-latest
container:
image: kevinshahfws/node-c:3.0
steps:
# Checkout/install project
- name: Checkout
uses: actions/checkout@v2
- name: Install Gcovr
run: |
apt remove --purge gcovr -y
pip install --upgrade gcovr
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Build Artifacts
run: |
npm run dist
- name: Download Thunder
uses: actions/download-artifact@v3
with:
name: thunder
path: /__w/thunder/install/
- name: show thunder
run: |
pwd
ls -la /__w/thunder/install/
- name: Build CXX Core SDK
run: |
.github/workflows/utils.sh buildCoreCPPSDK
# - name: Build CXX Manage SDK
# run: |
# .github/workflows/utils.sh buildManageCPPSDK
# cd src/sdks/core/
# npm run cpp
# tar -zxvf src/sdks/core/build/cpp/src/firebolt-core-native-sdk-1.3.0-next.1.tgz -C ../
# cd ../firebolt-core-native-sdk-1.3.0-next.1
# cp -f ../firebolt-apis/external/CMakeLists.txt ./
# cp -f ../firebolt-apis/external/include/json_engine.h ./include/
# cp -f ../firebolt-apis/external/src/CMakeLists.txt ./src/
# cp -f ../firebolt-apis/external/src/Transport.h ./src/
# ./build.sh -s ${pwd}/../install
# - name: Build SDK
# run: |
# cp -f ../firebolt-apis/external/CMakeLists.txt ./
# cp -f ../firebolt-apis/external/include/json_engine.h ./include/
# cp -f ../firebolt-apis/external/src/CMakeLists.txt ./src/
# cp -f ../firebolt-apis/external/src/Transport.h ./src/
# ./build.sh -s ${pwd}/../install
# ls build/test/
# ctest --test-dir build/