mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Add infrastructure (CI, npm) for sharp-linux-s390x package
This commit is contained in:
parent
655da113c8
commit
0f24f0f214
29
.github/workflows/ci.yml
vendored
29
.github/workflows/ci.yml
vendored
@ -121,27 +121,42 @@ jobs:
|
||||
github-runner-qemu:
|
||||
permissions:
|
||||
contents: write
|
||||
name: linux-arm - Node.js 18 - prebuild
|
||||
name: ${{ matrix.platform }} - Node.js ${{ matrix.nodejs_version_major }} - prebuild
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux-arm
|
||||
run_on_arch: armv6
|
||||
nodejs_arch: armv6l
|
||||
nodejs_hostname: unofficial-builds.nodejs.org
|
||||
nodejs_version: "18.17.0"
|
||||
nodejs_version_major: 18
|
||||
- platform: linux-s390x
|
||||
run_on_arch: s390x
|
||||
nodejs_arch: s390x
|
||||
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
|
||||
with:
|
||||
arch: armv6
|
||||
arch: ${{ matrix.run_on_arch }}
|
||||
distro: buster
|
||||
env: |
|
||||
nodejs_version: "18.17.0"
|
||||
prebuild_upload: "${{ startsWith(github.ref, 'refs/tags/') && secrets.GITHUB_TOKEN || '' }}"
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y fontconfig fonts-noto-core g++ git libatomic1 make python3 xz-utils
|
||||
apt-get install -y curl g++ git libatomic1 make python3 xz-utils
|
||||
mkdir /opt/nodejs
|
||||
curl --silent https://unofficial-builds.nodejs.org/download/release/v${nodejs_version}/node-v${nodejs_version}-linux-armv6l.tar.xz | tar xJC /opt/nodejs --strip-components=1
|
||||
curl --silent https://${{ matrix.nodejs_hostname }}/download/release/v${{ matrix.nodejs_version}}/node-v${{ matrix.nodejs_version}}-linux-${{ matrix.nodejs_arch }}.tar.xz | tar xJC /opt/nodejs --strip-components=1
|
||||
export PATH=$PATH:/opt/nodejs/bin
|
||||
npm install --build-from-source
|
||||
npx mocha --no-config --spec=test/unit/io.js
|
||||
npx mocha --no-config --spec=test/unit/io.js --timeout=30000
|
||||
npm run package-from-local-build
|
||||
npm pkg set "optionalDependencies.@img/sharp-linux-arm=file:./npm/linux-arm"
|
||||
npm pkg set "optionalDependencies.@img/sharp-${{ matrix.platform }}=file:./npm/${{ matrix.platform }}"
|
||||
npm run clean
|
||||
npm install --ignore-scripts
|
||||
npx mocha --no-config --spec=test/unit/io.js --timeout=30000
|
||||
|
47
npm/linux-s390x/package.json
Normal file
47
npm/linux-s390x/package.json
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "@img/sharp-linux-s390x",
|
||||
"version": "0.33.0-alpha.9",
|
||||
"description": "Prebuilt sharp for use with Linux (glibc) s390x",
|
||||
"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-s390x"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"preferUnplugged": true,
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-s390x": "0.0.2"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"type": "commonjs",
|
||||
"exports": {
|
||||
"./sharp.node": "./lib/sharp-linux-s390x.node",
|
||||
"./package": "./package.json"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
|
||||
"npm": ">=9.6.5",
|
||||
"yarn": ">=3.2.0",
|
||||
"pnpm": ">=7.1.0",
|
||||
"glibc": ">=2.28"
|
||||
},
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"cpu": [
|
||||
"s390x"
|
||||
]
|
||||
}
|
@ -3,13 +3,14 @@
|
||||
"version": "0.33.0-alpha.9",
|
||||
"private": "true",
|
||||
"workspaces": [
|
||||
"darwin-x64",
|
||||
"darwin-arm64",
|
||||
"darwin-x64",
|
||||
"linux-arm",
|
||||
"linux-arm64",
|
||||
"linux-s390x",
|
||||
"linux-x64",
|
||||
"linuxmusl-arm64",
|
||||
"linuxmusl-x64",
|
||||
"linux-x64",
|
||||
"win32-ia32",
|
||||
"win32-x64"
|
||||
]
|
||||
|
@ -145,11 +145,13 @@
|
||||
"@img/sharp-libvips-darwin-x64": "0.0.1",
|
||||
"@img/sharp-libvips-linux-arm": "0.0.1",
|
||||
"@img/sharp-libvips-linux-arm64": "0.0.1",
|
||||
"@img/sharp-libvips-linux-s390x": "0.0.2",
|
||||
"@img/sharp-libvips-linux-x64": "0.0.1",
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "0.0.1",
|
||||
"@img/sharp-libvips-linuxmusl-x64": "0.0.1",
|
||||
"@img/sharp-linux-arm": "0.33.0-alpha.9",
|
||||
"@img/sharp-linux-arm64": "0.33.0-alpha.9",
|
||||
"@img/sharp-linux-s390x": "0.33.0-alpha.9",
|
||||
"@img/sharp-linux-x64": "0.33.0-alpha.9",
|
||||
"@img/sharp-linuxmusl-arm64": "0.33.0-alpha.9",
|
||||
"@img/sharp-linuxmusl-x64": "0.33.0-alpha.9",
|
||||
|
Loading…
x
Reference in New Issue
Block a user