diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eefcee3c..ef2ce221 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: nodejs_version: 14 - os: ubuntu-20.04 container: centos:7 - nodejs_version: 15 + nodejs_version: 16 - os: ubuntu-20.04 container: node:10-alpine3.11 prebuild: true @@ -33,7 +33,7 @@ jobs: - os: ubuntu-20.04 container: node:14-alpine3.13 - os: ubuntu-20.04 - container: node:15-alpine3.11 + container: node:16-alpine3.11 - os: macos-10.15 nodejs_version: 10 prebuild: true @@ -42,7 +42,7 @@ jobs: - os: macos-10.15 nodejs_version: 14 - os: macos-10.15 - nodejs_version: 15 + nodejs_version: 16 - os: windows-2019 nodejs_version: 10 prebuild: true @@ -51,7 +51,7 @@ jobs: - os: windows-2019 nodejs_version: 14 - os: windows-2019 - nodejs_version: 15 + nodejs_version: 16 steps: - name: Dependencies (Linux glibc) if: contains(matrix.container, 'centos') diff --git a/.travis.yml b/.travis.yml index 307e9145..b2d74d58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ jobs: install: sudo docker exec sharp sh -c "npm install --build-from-source --unsafe-perm" script: sudo docker exec sharp sh -c "npm test" - - name: "Linux ARM64v8 (Debian 11, glibc 2.29) - Node.js 15" + - name: "Linux ARM64v8 (Debian 11, glibc 2.29) - Node.js 16" arch: arm64 os: linux dist: bionic @@ -53,7 +53,7 @@ jobs: - sudo docker run -dit --name sharp --volume "${PWD}:/mnt/sharp" --workdir /mnt/sharp arm64v8/debian:bullseye - sudo docker exec sharp sh -c "apt-get update && apt-get install -y build-essential git python3 curl" - sudo docker exec sharp sh -c "curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -" - - sudo docker exec sharp sh -c "echo 'deb https://deb.nodesource.com/node_15.x sid main' >/etc/apt/sources.list.d/nodesource.list" + - sudo docker exec sharp sh -c "echo 'deb https://deb.nodesource.com/node_16.x sid main' >/etc/apt/sources.list.d/nodesource.list" - sudo docker exec sharp sh -c "apt-get update && apt-get install -y nodejs" install: sudo docker exec sharp sh -c "npm install --build-from-source --unsafe-perm" script: sudo docker exec sharp sh -c "npm test" @@ -92,14 +92,14 @@ jobs: install: sudo docker exec sharp sh -c "npm install --build-from-source --unsafe-perm" script: sudo docker exec sharp sh -c "npm test" - - name: "Linux ARM64v8 (Alpine 3.11, musl 1.1.24) - Node.js 15" + - name: "Linux ARM64v8 (Alpine 3.11, musl 1.1.24) - Node.js 16" arch: arm64 os: linux dist: focal language: shell before_install: - sudo chown 0.0 ${PWD} - - sudo docker run -dit --name sharp --volume "${PWD}:/mnt/sharp" --workdir /mnt/sharp node:15-alpine3.11 + - sudo docker run -dit --name sharp --volume "${PWD}:/mnt/sharp" --workdir /mnt/sharp node:16-alpine3.11 - sudo docker exec sharp sh -c "apk add build-base git python3 --update-cache" install: sudo docker exec sharp sh -c "npm install --build-from-source --unsafe-perm" script: sudo docker exec sharp sh -c "npm test" diff --git a/appveyor.yml b/appveyor.yml index 8ddfa0e7..cc9202f7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,7 +8,7 @@ environment: prebuild: true - nodejs_version: "12" - nodejs_version: "14" - - nodejs_version: "15" + - nodejs_version: "16" install: - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) - npm install --build-from-source diff --git a/test/unit/platform.js b/test/unit/platform.js index 740de373..217504d9 100644 --- a/test/unit/platform.js +++ b/test/unit/platform.js @@ -32,23 +32,21 @@ describe('Platform-detection', function () { delete process.env.npm_config_arch; }); - it('Can detect ARM version via process.config', function () { - process.env.npm_config_arch = 'arm'; - const armVersion = process.config.variables.arm_version; - process.config.variables.arm_version = 'test'; - assert.strictEqual('armvtest', platform().split('-')[1]); - process.config.variables.arm_version = armVersion; - delete process.env.npm_config_arch; - }); + if (process.config.variables.arm_version) { + it('Can detect ARM version via process.config', function () { + process.env.npm_config_arch = 'arm'; + assert.strictEqual(`armv${process.config.variables.arm_version}`, platform().split('-')[1]); + delete process.env.npm_config_arch; + }); + } - it('Defaults to ARMv6 for 32-bit', function () { - process.env.npm_config_arch = 'arm'; - const armVersion = process.config.variables.arm_version; - delete process.config.variables.arm_version; - assert.strictEqual('armv6', platform().split('-')[1]); - process.config.variables.arm_version = armVersion; - delete process.env.npm_config_arch; - }); + if (!process.config.variables.arm_version) { + it('Defaults to ARMv6 for 32-bit', function () { + process.env.npm_config_arch = 'arm'; + assert.strictEqual('armv6', platform().split('-')[1]); + delete process.env.npm_config_arch; + }); + } it('Defaults to ARMv8 for 64-bit', function () { process.env.npm_config_arch = 'arm64';