Improve support for ppc64le architecture (#4203)

Includes CI and arch-specific npm package
This commit is contained in:
sumitd2 2024-09-06 17:15:47 +05:30 committed by GitHub
parent 7ee54810d4
commit c26b77683a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 56 additions and 1 deletions

View File

@ -144,6 +144,13 @@ jobs:
nodejs_hostname: nodejs.org nodejs_hostname: nodejs.org
nodejs_version: "18.17.0" nodejs_version: "18.17.0"
nodejs_version_major: 18 nodejs_version_major: 18
- platform: linux-ppc64
distro: bullseye
run_on_arch: ppc64le
nodejs_arch: ppc64le
nodejs_hostname: nodejs.org
nodejs_version: "18.17.0"
nodejs_version_major: 18
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2 - uses: uraimo/run-on-arch-action@v2

View File

@ -40,6 +40,7 @@ Ready-compiled sharp and libvips binaries are provided for use on the most commo
* macOS ARM64 * macOS ARM64
* Linux ARM (glibc >= 2.28) * Linux ARM (glibc >= 2.28)
* Linux ARM64 (glibc >= 2.26, musl >= 1.2.2) * Linux ARM64 (glibc >= 2.26, musl >= 1.2.2)
* Linux ppc64 (glibc >= 2.31)
* Linux s390x (glibc >= 2.31) * Linux s390x (glibc >= 2.31)
* Linux x64 (glibc >= 2.26, musl >= 1.2.2, CPU with SSE4.2) * Linux x64 (glibc >= 2.26, musl >= 1.2.2, CPU with SSE4.2)
* Windows x64 * Windows x64

View File

@ -0,0 +1,46 @@
{
"name": "@img/sharp-linux-ppc64",
"version": "0.33.5",
"description": "Prebuilt sharp for use with Linux (glibc) ppc64",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
"repository": {
"type": "git",
"url": "git+https://github.com/lovell/sharp.git",
"directory": "npm/linux-ppc64"
},
"license": "Apache-2.0",
"funding": {
"url": "https://opencollective.com/libvips"
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linux-ppc64": "1.0.4"
},
"files": [
"lib"
],
"publishConfig": {
"access": "public"
},
"type": "commonjs",
"exports": {
"./sharp.node": "./lib/sharp-linux-ppc64.node",
"./package": "./package.json"
},
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"config": {
"glibc": ">=2.31"
},
"os": [
"linux"
],
"libc": [
"glibc"
],
"cpu": [
"ppc64"
]
}

View File

@ -148,6 +148,7 @@
"@img/sharp-libvips-darwin-x64": "1.0.4", "@img/sharp-libvips-darwin-x64": "1.0.4",
"@img/sharp-libvips-linux-arm": "1.0.5", "@img/sharp-libvips-linux-arm": "1.0.5",
"@img/sharp-libvips-linux-arm64": "1.0.4", "@img/sharp-libvips-linux-arm64": "1.0.4",
"@img/sharp-libvips-linux-ppc64": "1.0.4",
"@img/sharp-libvips-linux-s390x": "1.0.4", "@img/sharp-libvips-linux-s390x": "1.0.4",
"@img/sharp-libvips-linux-x64": "1.0.4", "@img/sharp-libvips-linux-x64": "1.0.4",
"@img/sharp-libvips-linuxmusl-arm64": "1.0.4", "@img/sharp-libvips-linuxmusl-arm64": "1.0.4",

View File

@ -138,7 +138,7 @@ describe('libvips binaries', function () {
}); });
it('arch', () => { it('arch', () => {
const [, arch] = libvips.runtimePlatformArch().split('-'); const [, arch] = libvips.runtimePlatformArch().split('-');
assert.strict(['arm', 'arm64', 'ia32', 'x64'].includes(arch)); assert.strict(['arm', 'arm64', 'ia32', 'x64', 'ppc64'].includes(arch));
}); });
it('isUnsupportedNodeRuntime', () => { it('isUnsupportedNodeRuntime', () => {
assert.strictEqual(libvips.isUnsupportedNodeRuntime(), undefined); assert.strictEqual(libvips.isUnsupportedNodeRuntime(), undefined);