From f1ebbfd2459aa9e33828ac6002863e4805de92a0 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Thu, 30 Jun 2022 12:24:21 +0200 Subject: [PATCH] ci(crypto-nodejs): Create non-release build of version and upload everything as artifacts upon failure --- .github/workflows/bindings_ci.yml | 17 ++++++++++++++++- bindings/matrix-sdk-crypto-nodejs/package.json | 3 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bindings_ci.yml b/.github/workflows/bindings_ci.yml index c9d54b0fb..593f87062 100644 --- a/.github/workflows/bindings_ci.yml +++ b/.github/workflows/bindings_ci.yml @@ -61,14 +61,29 @@ jobs: working-directory: ${{ env.MATRIX_SDK_CRYPTO_NODEJS_PATH }} run: npm install + # Building in dev-mode and copy lib for potential failure case - name: Build the Node.js binding working-directory: ${{ env.MATRIX_SDK_CRYPTO_NODEJS_PATH }} - run: npm run build + run: | + npm run build + cp *.node non-release-mode-lib.node + + - name: Build the Node.js binding + working-directory: ${{ env.MATRIX_SDK_CRYPTO_NODEJS_PATH }} + run: npm run release-build - name: Test the Node.js binding working-directory: ${{ env.MATRIX_SDK_CRYPTO_NODEJS_PATH }} run: npm run test + - uses: actions/upload-artifact@v3 + if: failure() + with: + name: Failure Files + path: | + bindings/matrix-sdk-crypto-nodejs/*.node + /var/crash/*.crash + - if: ${{ matrix.build-doc }} name: Build the documentation working-directory: ${{ env.MATRIX_SDK_CRYPTO_NODEJS_PATH }} diff --git a/bindings/matrix-sdk-crypto-nodejs/package.json b/bindings/matrix-sdk-crypto-nodejs/package.json index 42e547faf..46b18cbcd 100644 --- a/bindings/matrix-sdk-crypto-nodejs/package.json +++ b/bindings/matrix-sdk-crypto-nodejs/package.json @@ -21,7 +21,8 @@ "node": ">= 14" }, "scripts": { - "build": "napi build --platform --release --strip", + "release-build": "napi build --platform --release --strip", + "build": "napi build --platform", "test": "jest --verbose --testTimeout 10000", "doc": "typedoc --tsconfig ." }