From 92d709a9957aa4eebaf4651db88bca2b22225a7b Mon Sep 17 00:00:00 2001 From: AdityaKasar Date: Fri, 11 Oct 2024 11:54:22 +0530 Subject: [PATCH] fixup! feat(core): CI pipeline to build and test CPP SDK --- .github/workflows/cxx-build.yml | 74 ++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/.github/workflows/cxx-build.yml b/.github/workflows/cxx-build.yml index 8d9913478..0ed85c13f 100644 --- a/.github/workflows/cxx-build.yml +++ b/.github/workflows/cxx-build.yml @@ -19,43 +19,57 @@ jobs: # Checkout/install project - name: Checkout uses: actions/checkout@v2 - - - name: Install Gcovr - run: | - apt remove --purge gcovr -y - pip install --upgrade gcovr - + with: + fetch-depth: 0 + repo-token: ${{ secrets.SEMANTIC_RELEASE_BOT_PAT }} + persist-credentials: false - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 'lts/*' - + - name: Set up NPM token + env: + NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }} # <-- allow npm publish for each workspace + run: 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc' - name: Install dependencies run: npm ci - - name: Clone and Install Thunder - id: install_thunder - run: | - .github/workflows/utils.sh cloneAndInstallThunder + # - 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: Build Artifacts - run: | - npm run dist + # - name: Build Artifacts + # run: | + # npm run dist - - name: Build CXX - run: | - cd src/sdks/core/ - ls - npm run cpp + # - name: Build CXX + # run: | + # cd src/sdks/core/ + # ls + # npm run cpp - - 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: 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