Skip to content

Commit

Permalink
Improve support for ppc64le architecture (#4203)
Browse files Browse the repository at this point in the history
Includes CI and arch-specific npm package
  • Loading branch information
sumitd2 authored Sep 6, 2024
1 parent 7ee5481 commit c26b776
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ jobs:
nodejs_hostname: nodejs.org
nodejs_version: "18.17.0"
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:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
Expand Down
1 change: 1 addition & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Ready-compiled sharp and libvips binaries are provided for use on the most commo
* macOS ARM64
* Linux ARM (glibc >= 2.28)
* Linux ARM64 (glibc >= 2.26, musl >= 1.2.2)
* Linux ppc64 (glibc >= 2.31)
* Linux s390x (glibc >= 2.31)
* Linux x64 (glibc >= 2.26, musl >= 1.2.2, CPU with SSE4.2)
* Windows x64
Expand Down
46 changes: 46 additions & 0 deletions npm/linux-ppc64/package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"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"
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
"@img/sharp-libvips-darwin-x64": "1.0.4",
"@img/sharp-libvips-linux-arm": "1.0.5",
"@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-x64": "1.0.4",
"@img/sharp-libvips-linuxmusl-arm64": "1.0.4",
Expand Down
2 changes: 1 addition & 1 deletion test/unit/libvips.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe('libvips binaries', function () {
});
it('arch', () => {
const [, arch] = libvips.runtimePlatformArch().split('-');
assert.strict(['arm', 'arm64', 'ia32', 'x64'].includes(arch));
assert.strict(['arm', 'arm64', 'ia32', 'x64', 'ppc64'].includes(arch));
});
it('isUnsupportedNodeRuntime', () => {
assert.strictEqual(libvips.isUnsupportedNodeRuntime(), undefined);
Expand Down

0 comments on commit c26b776

Please sign in to comment.