diff --git a/.github/workflows/cxx-build.yml b/.github/workflows/cxx-build.yml index a465804ac..e5b279fe1 100644 --- a/.github/workflows/cxx-build.yml +++ b/.github/workflows/cxx-build.yml @@ -9,52 +9,84 @@ on: env: HUSKY: 0 jobs: - release: - name: Release + install_thunder: + name: Build and install Thunder Library 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: Clone and Install Thunder id: install_thunder run: | .github/workflows/utils.sh cloneAndInstallThunder + + - name: Upload the library artifact + uses: actions/upload-artifact@v2 + with: + name: Thunder + path: /home/aditya-v/work/keaton-sdk/install/usr/lib - - name: Build Artifacts - run: | - npm run dist + # 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: Build CXX - run: | - cd src/sdks/core/ - ls - npm run cpp + # - 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: Build SDK - run: | - 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 - ls build/test/ - ctest --test-dir build/ \ No newline at end of file + # - name: Install dependencies + # run: npm ci + + # - name: Clone and Install Thunder + # id: install_thunder + # run: | + # .github/workflows/utils.sh cloneAndInstallThunder + + # - name: Build Artifacts + # run: | + # npm run dist + + # - 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/ \ No newline at end of file diff --git a/.github/workflows/utils.sh b/.github/workflows/utils.sh index 9d4270d90..49e30feb3 100755 --- a/.github/workflows/utils.sh +++ b/.github/workflows/utils.sh @@ -270,6 +270,7 @@ function cloneAndInstallThunder() { -DVOLATILE_PATH="tmp" && echo "Thunder configure succeeded" || exit 9999 cmake --build build/Thunder --target install && echo "Thunder Build succeeded" || exit 9999 + } function buildCoreCPPSDK() { @@ -279,17 +280,12 @@ function buildCoreCPPSDK() { echo "The version from package.json is $FIREBOLT_VERSION" cd src/sdks/core - ls -la build/cpp/src - cp build/cpp/src/firebolt-core-native-sdk-${FIREBOLT_VERSION}.tgz $current_dir/data - cd $current_dir/data - tar -zxvf firebolt-core-native-sdk-${FIREBOLT_VERSION}.tgz - cd firebolt-core-native-sdk-${FIREBOLT_VERSION}/ + npm run cpp + FIREBOLT_VERSION=1.3.0-next.1 + tar -zxvf build/cpp/src/firebolt-core-native-sdk-${FIREBOLT_VERSION}.tgz -C $current_dir/data + cd $current_dir/data/firebolt-core-native-sdk-${FIREBOLT_VERSION}/ chmod +x ./build.sh sed -i -e 's/prefix=/prefix /g' build.sh - cat ./build.sh - - echo "***************** firebolt.h *****************" - cat include/firebolt.h ./build.sh -s "$current_dir/install" || exit 9999 ./build.sh -f "$current_dir/data/firebolt-core-native-sdk-${FIREBOLT_VERSION}/build/Firebolt" -s "$current_dir/install" @@ -304,20 +300,17 @@ function buildManageCPPSDK() { cd $current_apis_dir cd src/sdks/manage - ls -la build/cpp/src - cp build/cpp/src/firebolt-manage-native-sdk-${FIREBOLT_VERSION}.tgz $current_dir/data - cd $current_dir/data - tar -zxvf firebolt-manage-native-sdk-${FIREBOLT_VERSION}.tgz - cd firebolt-manage-native-sdk-${FIREBOLT_VERSION}/ + npm run cpp + FIREBOLT_VERSION=1.3.0-next.1 + tar -zxvf build/cpp/src/firebolt-manage-native-sdk-${FIREBOLT_VERSION}.tgz -C $current_dir/data + cd $current_dir/data/firebolt-manage-native-sdk-${FIREBOLT_VERSION}/ chmod +x ./build.sh sed -i -e 's/prefix=/prefix /g' build.sh - cat ./build.sh - - echo "***************** firebolt.h *****************" - cat include/firebolt.h ./build.sh -s "$current_dir/install" || exit 9999 ./build.sh -f "$current_dir/data/firebolt-manage-native-sdk-${FIREBOLT_VERSION}/build/Firebolt" -s "$current_dir/install" + + cd $current_apis_dir } function buildDiscoveryCPPSDK() {