From 560a8294f44307c69912befb080abc1c40e68457 Mon Sep 17 00:00:00 2001 From: Dennis Ameling Date: Wed, 18 Nov 2020 21:21:52 +0100 Subject: [PATCH] Switch CI to N-API builds --- .github/workflows/ci.yml | 17 +++++------------ .travis.yml | 7 +++---- appveyor.yml | 9 +++------ 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72582452..3e757011 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,24 +65,17 @@ jobs: if: ${{ matrix.os != 'ubuntu-16.04' }} name: Run tests (Windows/macOS) - - run: | - npm run prebuild-node - npm run prebuild-electron + - run: npm run prebuild-napi-x64 name: Prebuild (x64) - - run: npm run prebuild-electron-arm64 - if: ${{ matrix.os != 'macos-latest' }} - name: Prebuild for Electron (ARM64) - - run: | + npm run prebuild-napi-arm64 docker build -t node-keytar/i386 docker/i386 - docker run --rm -v ${PWD}:/project node-keytar/i386 /bin/bash -c "cd /project && npm run prebuild-node-ia32 && npm run prebuild-electron-ia32" + docker run --rm -v ${PWD}:/project node-keytar/i386 /bin/bash -c "cd /project && npm run prebuild-napi-ia32" if: ${{ matrix.os == 'ubuntu-16.04' }} - name: Prebuild (x86) + name: Prebuild (x86 and arm64) - - run: | - npm run prebuild-node-ia32 - npm run prebuild-electron-ia32 + - run: npm run prebuild-napi-ia32 if: ${{ matrix.os == 'windows-latest' }} name: Prebuild (x86) diff --git a/.travis.yml b/.travis.yml index 257d48c6..144ac249 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: node_js sudo: required -dist: trusty +dist: focal os: - linux - osx @@ -50,7 +50,6 @@ install: script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then xvfb-run ./script/cibuild; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm test; fi - - npm run prebuild-node - - npm run prebuild-electron - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t node-keytar/i386 docker/i386 && docker run --rm -v ${PWD}:/project node-keytar/i386 /bin/bash -c "cd /project && npm run prebuild-node-ia32 && npm run prebuild-electron-ia32 && npm run prebuild-electron-arm64"; fi + - npm run prebuild-napi-x64 + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run prebuild-napi-arm64 && docker build -t node-keytar/i386 docker/i386 && docker run --rm -v ${PWD}:/project node-keytar/i386 /bin/bash -c "cd /project && npm run prebuild-napi-ia32"; fi - if [[ -n "$TRAVIS_TAG" ]]; then npm run upload; fi diff --git a/appveyor.yml b/appveyor.yml index 2a85a35a..081996d5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ version: "{build}" -image: Visual Studio 2017 +image: Visual Studio 2019 platform: - x64 @@ -22,11 +22,8 @@ install: build_script: - npm test - - npm run prebuild-node - - npm run prebuild-node-ia32 - - npm run prebuild-electron - - npm run prebuild-electron-ia32 - - npm run prebuild-electron-arm64 + - npm run prebuild-napi-x64 + - npm run prebuild-napi-ia32 - if defined APPVEYOR_REPO_TAG_NAME (npm run upload) test: off