From 37306f82ad16f4493fa20179ab107b37cd180b0c Mon Sep 17 00:00:00 2001 From: Boris Verkhovskiy Date: Wed, 14 Jun 2023 19:37:01 +0100 Subject: [PATCH] Prebuild through GitHub Actions --- .github/workflows/build.yml | 42 +++++++++++++++++++++++++++++++++++-- binding.gyp | 7 ++++++- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 39608c80..7b9572e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,8 @@ on: - master env: - NODE_BUILD_CMD: npx --no-install prebuild -t 10.12.0 -t 12.13.0 --strip - ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 3.0.0 -t 4.0.0 -t 4.0.4 -t 5.0.0 --strip + NODE_PREBUILD_CMD: npx prebuild -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 --strip + ELECTRON_PREBUILD_CMD: npx prebuild -r electron -t 3.0.0 -t 4.0.0 -t 4.0.4 -t 5.0.0 --strip jobs: @@ -19,8 +19,15 @@ jobs: matrix: os: - windows-2019 + - ubuntu-latest + - macos-latest node: - 10 + - 12 + - 14 + - 16 + # - 18 + # - 20 fail-fast: false name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -35,3 +42,34 @@ jobs: - run: npm install - run: npm test + + prebuild: + strategy: + matrix: + os: + - ubuntu-latest + - windows-2019 + - macos-latest + fail-fast: false + name: Prebuild on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + # needs: test + steps: + - uses: actions/checkout@v3 + with: + submodules: true + fetch-depth: 0 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm install + - if: matrix.os == 'windows-latest' + run: | + ${{ env.NODE_PREBUILD_CMD }} --arch ia32 + ${{ env.ELECTRON_PREBUILD_CMD }} --arch ia32 + - if: matrix.os == 'macos-latest' + run: | + ${{ env.NODE_PREBUILD_CMD }} --arch arm64 + ${{ env.ELECTRON_PREBUILD_CMD }} --arch arm64 + - run: ${{ env.NODE_PREBUILD_CMD }} + - run: ${{ env.ELECTRON_PREBUILD_CMD }} diff --git a/binding.gyp b/binding.gyp index 8f93e64f..fef8edfe 100644 --- a/binding.gyp +++ b/binding.gyp @@ -49,7 +49,12 @@ ] } ], - 'variables': { 'runtime%': 'node' }, + 'variables': { + 'runtime%': 'node', + 'openssl_fips': '', + 'v8_enable_pointer_compression%': 0, + 'v8_enable_31bit_smis_on_64bit_arch%': 0, + }, 'conditions': [ ['runtime=="electron"', { 'defines': ['NODE_RUNTIME_ELECTRON=1'] }], ]