Simplify ICC processing when retaining input profiles #4468 #1628
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| - push | |
| - pull_request | |
| permissions: {} | |
| jobs: | |
| lint: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: "24" | |
| - run: npm install --ignore-scripts | |
| - run: npm run lint-cpp | |
| - run: npm run lint-js | |
| - run: npm run lint-types | |
| build-native: | |
| permissions: | |
| contents: read | |
| needs: lint | |
| name: "build-${{ matrix.platform }} [Node.js ${{ matrix.nodejs_version_major }}] ${{ matrix.package && '[package]' }}" | |
| runs-on: ${{ matrix.os }} | |
| container: ${{ matrix.container }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| container: rockylinux:8 | |
| nodejs_arch: x64 | |
| nodejs_version: "^18.17.0" | |
| nodejs_version_major: 18 | |
| platform: linux-x64 | |
| package: true | |
| - os: ubuntu-24.04 | |
| container: rockylinux:8 | |
| nodejs_arch: x64 | |
| nodejs_version: "^20.3.0" | |
| nodejs_version_major: 20 | |
| platform: linux-x64 | |
| - os: ubuntu-24.04 | |
| container: rockylinux:8 | |
| nodejs_arch: x64 | |
| nodejs_version: "^22.9.0" | |
| nodejs_version_major: 22 | |
| platform: linux-x64 | |
| - os: ubuntu-24.04 | |
| container: node:18-alpine3.17 | |
| nodejs_version_major: 18 | |
| platform: linuxmusl-x64 | |
| package: true | |
| - os: ubuntu-24.04 | |
| container: node:20-alpine3.18 | |
| nodejs_version_major: 20 | |
| platform: linuxmusl-x64 | |
| - os: ubuntu-24.04 | |
| container: node:22-alpine3.20 | |
| nodejs_version_major: 22 | |
| platform: linuxmusl-x64 | |
| - os: ubuntu-24.04-arm | |
| container: arm64v8/rockylinux:8 | |
| nodejs_arch: arm64 | |
| nodejs_version: "^18.17.0" | |
| nodejs_version_major: 18 | |
| platform: linux-arm64 | |
| package: true | |
| - os: ubuntu-24.04-arm | |
| container: arm64v8/rockylinux:8 | |
| nodejs_arch: arm64 | |
| nodejs_version: "^20.3.0" | |
| nodejs_version_major: 20 | |
| platform: linux-arm64 | |
| - os: macos-15-intel | |
| nodejs_arch: x64 | |
| nodejs_version: "^18.17.0" | |
| nodejs_version_major: 18 | |
| platform: darwin-x64 | |
| package: true | |
| - os: macos-15-intel | |
| nodejs_arch: x64 | |
| nodejs_version: "^20.3.0" | |
| nodejs_version_major: 20 | |
| platform: darwin-x64 | |
| - os: macos-15-intel | |
| nodejs_arch: x64 | |
| nodejs_version: "^22.9.0" | |
| nodejs_version_major: 22 | |
| platform: darwin-x64 | |
| - os: macos-15 | |
| nodejs_arch: arm64 | |
| nodejs_version: "^18.17.0" | |
| nodejs_version_major: 18 | |
| platform: darwin-arm64 | |
| package: true | |
| - os: macos-15 | |
| nodejs_arch: arm64 | |
| nodejs_version: "^20.3.0" | |
| nodejs_version_major: 20 | |
| platform: darwin-arm64 | |
| - os: macos-15 | |
| nodejs_arch: arm64 | |
| nodejs_version: "^22.9.0" | |
| nodejs_version_major: 22 | |
| platform: darwin-arm64 | |
| - os: windows-2022 | |
| nodejs_arch: x86 | |
| nodejs_version: "18.18.2" # pinned to avoid 18.19.0 and npm 10 | |
| nodejs_version_major: 18 | |
| platform: win32-ia32 | |
| package: true | |
| - os: windows-2022 | |
| nodejs_arch: x86 | |
| nodejs_version: "^20.3.0" | |
| nodejs_version_major: 20 | |
| platform: win32-ia32 | |
| - os: windows-2022 | |
| nodejs_arch: x86 | |
| nodejs_version: "^22.9.0" | |
| nodejs_version_major: 22 | |
| platform: win32-ia32 | |
| - os: windows-2022 | |
| nodejs_arch: x64 | |
| nodejs_version: "^18.17.0" | |
| nodejs_version_major: 18 | |
| platform: win32-x64 | |
| package: true | |
| - os: windows-2022 | |
| nodejs_arch: x64 | |
| nodejs_version: "^20.3.0" | |
| nodejs_version_major: 20 | |
| platform: win32-x64 | |
| - os: windows-2022 | |
| nodejs_arch: x64 | |
| nodejs_version: "^22.9.0" | |
| nodejs_version_major: 22 | |
| platform: win32-x64 | |
| - os: windows-11-arm | |
| nodejs_arch: arm64 | |
| nodejs_version: "^20.3.0" | |
| nodejs_version_major: 20 | |
| platform: win32-arm64 | |
| package: true | |
| - os: windows-11-arm | |
| nodejs_arch: arm64 | |
| nodejs_version: "^22.9.0" | |
| nodejs_version_major: 22 | |
| platform: win32-arm64 | |
| steps: | |
| - name: Dependencies (Rocky Linux glibc) | |
| if: contains(matrix.container, 'rockylinux') | |
| run: | | |
| dnf install -y gcc-toolset-14-gcc-c++ make git python3.12 fontconfig google-noto-sans-fonts | |
| echo "/opt/rh/gcc-toolset-14/root/usr/bin" >> $GITHUB_PATH | |
| - name: Dependencies (Linux musl) | |
| if: contains(matrix.container, 'alpine') | |
| run: apk add build-base git python3 font-noto --update-cache | |
| - name: Dependencies (Python 3.11 - macOS, Windows) | |
| if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows') | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Dependencies (Node.js) | |
| if: "!contains(matrix.platform, 'linuxmusl')" | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ matrix.nodejs_version }} | |
| architecture: ${{ matrix.nodejs_arch }} | |
| - uses: actions/checkout@v4 | |
| - run: npm install | |
| - run: npm run build | |
| - run: npm run test-unit | |
| - if: matrix.package | |
| run: npm run package-from-local-build | |
| - uses: actions/upload-artifact@v4 | |
| if: matrix.package | |
| with: | |
| name: ${{ matrix.platform }} | |
| path: npm/${{ matrix.platform }} | |
| retention-days: 1 | |
| if-no-files-found: error | |
| build-linuxmusl-arm64: | |
| permissions: | |
| contents: read | |
| needs: lint | |
| name: "build-linuxmusl-arm64 [Node.js ${{ matrix.nodejs_version_major }}] ${{ matrix.package && '[package]' }}" | |
| runs-on: ubuntu-24.04-arm | |
| container: | |
| image: ${{ matrix.container }} | |
| volumes: | |
| - /opt:/opt:rw,rshared | |
| - /opt:/__e/node20:ro,rshared | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - container: node:18-alpine3.17 | |
| nodejs_version_major: 18 | |
| package: true | |
| - container: node:20-alpine3.18 | |
| nodejs_version_major: 20 | |
| steps: | |
| - name: Allow Linux musl containers on ARM64 runners # https://github.com/actions/runner/issues/801#issuecomment-2394425757 | |
| shell: sh | |
| run: | | |
| sed -i "/^ID=/s/alpine/NotpineForGHA/" /etc/os-release | |
| apk add nodejs --update-cache | |
| mkdir /opt/bin | |
| ln -s /usr/bin/node /opt/bin/node | |
| - name: Dependencies | |
| run: apk add build-base git python3 font-noto --update-cache | |
| - uses: actions/checkout@v4 | |
| - run: npm install | |
| - run: npm run build | |
| - run: npm run test-unit | |
| - if: matrix.package | |
| run: npm run package-from-local-build | |
| - uses: actions/upload-artifact@v4 | |
| if: matrix.package | |
| with: | |
| name: linuxmusl-arm64 | |
| path: npm/linuxmusl-arm64 | |
| retention-days: 1 | |
| if-no-files-found: error | |
| build-qemu: | |
| permissions: | |
| contents: read | |
| needs: lint | |
| name: "build-${{ matrix.platform }} [Node.js ${{ matrix.nodejs_version_major }}] [package]" | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: linux-arm | |
| base_image: "balenalib/rpi-raspbian:bullseye" | |
| nodejs_arch: armv6l | |
| nodejs_hostname: unofficial-builds.nodejs.org | |
| nodejs_version: "18.17.0" | |
| nodejs_version_major: 18 | |
| - platform: linux-s390x | |
| base_image: "--platform=linux/s390x s390x/debian:bookworm" | |
| nodejs_arch: s390x | |
| nodejs_hostname: nodejs.org | |
| nodejs_version: "18.17.0" | |
| nodejs_version_major: 18 | |
| - platform: linux-ppc64 | |
| base_image: "--platform=linux/ppc64le ppc64le/debian:bookworm" | |
| nodejs_arch: ppc64le | |
| nodejs_hostname: nodejs.org | |
| nodejs_version: "18.17.0" | |
| nodejs_version_major: 18 | |
| - platform: linux-riscv64 | |
| base_image: "--platform=linux/riscv64 riscv64/debian:trixie" | |
| compiler_flags: "-march=rv64gc" | |
| nodejs_arch: riscv64 | |
| nodejs_hostname: unofficial-builds.nodejs.org | |
| nodejs_version: "20.19.5" | |
| nodejs_version_major: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: uraimo/run-on-arch-action@v3 | |
| with: | |
| arch: none | |
| distro: none | |
| base_image: ${{ matrix.base_image }} | |
| env: | | |
| CFLAGS: "${{ matrix.compiler_flags }}" | |
| CXXFLAGS: "${{ matrix.compiler_flags }}" | |
| run: | | |
| apt-get update | |
| apt-get install -y curl g++ git libatomic1 make python3 xz-utils | |
| mkdir /opt/nodejs | |
| 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 | |
| npm run build | |
| node --test test/unit/io.js | |
| npm run package-from-local-build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform }} | |
| path: npm/${{ matrix.platform }} | |
| retention-days: 1 | |
| if-no-files-found: error | |
| build-emscripten: | |
| permissions: | |
| contents: read | |
| needs: lint | |
| name: "build-wasm32 [package]" | |
| runs-on: ubuntu-24.04 | |
| container: "emscripten/emsdk:4.0.18" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Dependencies | |
| run: apt-get update && apt-get install -y pkg-config | |
| - name: Dependencies (Node.js) | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: "20" | |
| - run: npm install | |
| - run: emmake npm run build | |
| - name: Verify emscripten versions match | |
| run: | | |
| EMSCRIPTEN_VERSION_LIBVIPS=$(node -p "require('@img/sharp-libvips-dev-wasm32/versions').emscripten") | |
| EMSCRIPTEN_VERSION_SHARP=$(emcc -dumpversion) | |
| echo "libvips built with emscripten $EMSCRIPTEN_VERSION_LIBVIPS" | |
| echo "sharp built with emscripten $EMSCRIPTEN_VERSION_SHARP" | |
| test "$EMSCRIPTEN_VERSION_LIBVIPS" = "$EMSCRIPTEN_VERSION_SHARP" | |
| - run: emmake npm run test-unit | |
| - run: emmake npm run package-from-local-build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wasm32 | |
| path: npm/wasm32 | |
| retention-days: 1 | |
| if-no-files-found: error | |
| release: | |
| permissions: | |
| contents: write | |
| id-token: write | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - build-native | |
| - build-linuxmusl-arm64 | |
| - build-qemu | |
| - build-emscripten | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: npm | |
| - name: Create npm workspace tarball | |
| run: tar -vcaf npm-workspace.tar.xz --directory npm --exclude=from-local-build.js . | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: '24' | |
| - name: Create release notes | |
| run: npm run package-release-notes | |
| - name: Create GitHub release for tag | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: npm-workspace.tar.xz | |
| artifactContentType: application/x-xz | |
| prerelease: ${{ contains(github.ref, '-rc') }} | |
| makeLatest: ${{ !contains(github.ref, '-rc') }} | |
| bodyFile: release-notes.md | |
| - name: Publish platform-specific npm packages | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: cd npm && npm publish --workspaces --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }} | |
| - name: Publish sharp npm package | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: npm publish --tag=${{ contains(github.ref, '-rc') && 'next' || 'latest' }} |