这是indexloc提供的服务,不要输入任何密码
Skip to content

🤖 Continuous update highway testing 🛣️ #12222

🤖 Continuous update highway testing 🛣️

🤖 Continuous update highway testing 🛣️ #12222

Workflow file for this run

# Copyright (c) the JPEG XL Project Authors. All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Workflow for building the release binaries.
#
# This workflow runs as a post-submit step, when pushing to main or the release
# branches (v*.*.x), and when creating a release in GitHub.
#
# In the GitHub release case, in addition to build the release binaries it also
# uploads the binaries to the given release automatically.
name: Release build / upload
on:
merge_group:
push:
branches:
- main
- v*.*.x
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]
paths-ignore:
- '**.md'
- 'AUTHORS'
release:
types: [ published ]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ubuntu_static_x86_64:
name: linux x86_64 static
if: ${{ !contains(github.event.pull_request.labels.*.name, 'CI:none') }}
runs-on: [ubuntu-latest]
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: Install build deps
run: |
sudo rm -f /var/lib/man-db/auto-update
sudo apt update
sudo apt install -y \
asciidoc \
clang \
cmake \
doxygen \
graphviz \
libbrotli-dev \
libgdk-pixbuf2.0-dev \
libgif-dev \
libgtest-dev \
libgtk2.0-dev \
libjpeg-dev \
libopenexr-dev \
libpng-dev \
libwebp-dev \
ninja-build \
pkg-config \
xdg-utils \
#
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Checkout the source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: true
fetch-depth: 1
- name: Build
run: |
SKIP_TEST=1 \
./ci.sh release \
-DJPEGXL_DEP_LICENSE_DIR=/usr/share/doc \
-DJPEGXL_STATIC=ON \
-DBUILD_TESTING=OFF \
-DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF \
-DJPEGXL_ENABLE_VIEWERS=OFF \
-DJPEGXL_ENABLE_PLUGINS=OFF \
-DJPEGXL_ENABLE_OPENEXR=OFF \
-DJPEGXL_ENABLE_DEVTOOLS=ON \
- name: Package release tarball
run: |
ROOT=`pwd`
cd build
tar -zcvf ${ROOT}/jxl-linux-x86_64-static.tar.gz \
LICENSE* tools/{cjxl,djxl,benchmark_xl,cjpegli,djpegli,jxlinfo,butteraugli_main,ssimulacra2}
- name: Upload release tarball
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: jxl-linux-x86_64-static
path: jxl-linux-x86_64-static.tar.gz
compression-level: 0
# Build .deb packages Ubuntu/Debian
release_ubuntu_pkg:
name: .deb / ${{ matrix.os }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'CI:none') }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- ubuntu:24.04
- ubuntu:22.04
- ubuntu:20.04
- debian:bullseye
- debian:bookworm
- debian:trixie
- debian:sid
include:
- os: debian:trixie
exclude_debian_packages: libjxl-gimp-plugin
- os: debian:sid
exclude_debian_packages: libjxl-gimp-plugin
container:
image: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: Install build deps
run: |
rm -f /var/lib/man-db/auto-update
apt update
DEBIAN_FRONTEND=noninteractive apt install -y \
build-essential \
devscripts \
python3 \
sed \
#
- name: Calculate artifact suffix
shell: python3 {0}
run: |
import os
artifact_suffix="${{ matrix.os}}".replace(':', '-')
open(os.getenv("GITHUB_ENV"), "a").write(f"ARTIFACT_SUFFIX={artifact_suffix}\n")
- name: Set git safe dir
run: |
export GIT_CEILING_DIRECTORIES=/__w # only work before git v2.35.2
git config --global --add safe.directory /__w/libjxl/libjxl
- name: Checkout the source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: true
fetch-depth: 1
- name: Stamp non-release versions
# Stamps the built package with the commit date as part of the version
# after the version number so newer release candidates can override older
# ones.
if: github.event_name != 'release'
shell: 'bash'
run: |
# Committer timestamp.
set -x
commit_timestamp=$(git show -s --format=%ct)
commit_datetime=$(date --utc "--date=@${commit_timestamp}" '+%Y%m%d%H%M%S')
commit_ref=$(git rev-parse --short HEAD)
sem_version=$(dpkg-parsechangelog --show-field Version)
sem_version="${sem_version%%-*}"
deb_version="${sem_version}~alpha${commit_datetime}-0+git${commit_ref}"
dch -M --distribution unstable -b --newversion "${deb_version}" \
"Stamping build with version ${deb_version}"
- name: Stamp release versions
# Mark the version as released
if: github.event_name == 'release'
shell: 'bash'
run: |
if head -n1 debian/changelog | grep UNRELEASED; then
dch -M --distribution unstable --release ''
fi
- name: Configure hwy
if: ${{ github.event_name == 'schedule' || github.event_name == 'release' || contains(github.event.pull_request.labels.*.name, 'CI:full') }}
run: |
echo "HWY_PKG_OPTIONS=" >> $GITHUB_ENV
- name: Build hwy
run: |
apt build-dep -y ./third_party/highway
./ci.sh debian_build highway
dpkg -i build/debs/libhwy-dev_*_amd64.deb
- name: Build libjxl
run: |
apt build-dep -y .
EXCLUDE_DEBIAN_PACKAGES="${{ matrix.exclude_debian_packages || '' }}" ./ci.sh debian_build jpeg-xl
- name: Stats
run: |
./ci.sh debian_stats
- name: Package release tarball
run: |
ROOT=`pwd`
cd build/debs/
tar -zcvf ${ROOT}/jxl-debs-amd64-${{ env.ARTIFACT_SUFFIX }}.tar.gz *jxl*.*
- name: Upload release tarball
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: jxl-debs-amd64-${{ env.ARTIFACT_SUFFIX }}
path: jxl-debs-amd64-${{ env.ARTIFACT_SUFFIX }}.tar.gz
compression-level: 0
windows_build:
name: vcpkg / ${{ matrix.triplet }} ${{ matrix.build_type || 'Release'}}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'CI:none') }}
runs-on: [windows-latest]
strategy:
fail-fast: false
matrix:
include:
- triplet: x86-windows-static
arch: '-A Win32'
- triplet: x64-windows-static
arch: '-A x64'
run_benchmark: true
- triplet: x64-windows-static
arch: '-A x64'
build_type: Debug
upload: 'OFF'
- triplet: x86-windows
arch: '-A Win32'
static: 'OFF'
- triplet: x64-windows
arch: '-A x64'
static: 'OFF'
env:
VCPKG_VERSION: '2025.10.17'
VCPKG_ROOT: vcpkg
VCPKG_DISABLE_METRICS: 1
BUILD_TYPE: ${{ matrix.build_type || 'Release' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
with:
egress-policy: audit
- name: Checkout the source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: true
fetch-depth: 2
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
id: cache-vcpkg
with:
path: vcpkg
key: release-${{ runner.os }}-vcpkg-${{ env.VCPKG_VERSION }}-${{ matrix.triplet }}
- name: Download vcpkg
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
# wget doesn't seem to work under bash.
shell: 'powershell'
run: |
C:\msys64\usr\bin\wget.exe -nv `
https://github.com/microsoft/vcpkg/archive/refs/tags/${{ env.VCPKG_VERSION }}.zip `
-O vcpkg.zip
- name: Bootstrap vcpkg
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
shell: 'bash'
run: |
set -x
unzip -q vcpkg.zip
rm -rf ${VCPKG_ROOT}
mv vcpkg-${VCPKG_VERSION} ${VCPKG_ROOT}
${VCPKG_ROOT}/bootstrap-vcpkg.sh
- name: Install libraries with vcpkg
shell: 'bash'
run: |
set -x
${VCPKG_ROOT}/vcpkg --triplet ${{ matrix.triplet }} install \
giflib \
libjpeg-turbo \
libpng \
libwebp \
pkgconf \
#
- name: Configure
shell: 'bash'
run: |
set -x
mkdir build
cmake -Bbuild -H. ${{ matrix.arch }} \
-DJPEGXL_STATIC=${{ matrix.static || 'ON'}} \
-DJPEGXL_ENABLE_TOOLS='ON' \
-DBUILD_TESTING=OFF \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=`pwd`/prefix \
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF \
-DJPEGXL_ENABLE_OPENEXR=OFF \
-DJPEGXL_ENABLE_PLUGINS=OFF \
-DJPEGXL_ENABLE_TCMALLOC=OFF \
-DJPEGXL_ENABLE_VIEWERS=OFF \
-DJPEGXL_ENABLE_DEVTOOLS='ON' \
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
#
- name: Build
shell: 'bash'
run: |
set -x
cmake --build build --config ${{ env.BUILD_TYPE }}
- name: Install
shell: 'bash'
run: |
set -x
cmake --build build --config ${{ env.BUILD_TYPE }} --target install
for pkg in giflib libjpeg-turbo libpng libwebp zlib; do
cp vcpkg/installed/${{matrix.triplet}}/share/${pkg}/copyright \
prefix/bin/LICENSE.${pkg}
done
cp third_party/sjpeg/COPYING prefix/bin/LICENSE.sjpeg
cp third_party/skcms/LICENSE prefix/bin/LICENSE.skcms
cp third_party/highway/LICENSE prefix/bin/LICENSE.highway
cp third_party/brotli/LICENSE prefix/bin/LICENSE.brotli
cp LICENSE prefix/bin/LICENSE.libjxl
- name: Fast benchmark ${{ matrix.triplet }}
shell: 'bash'
if: matrix.run_benchmark && true
run: |
systeminfo | grep -A 1 Processor
powershell -c "Get-CimInstance -ClassName Win32_Processor | Select-Object Name, NumberOfCores, NumberOfLogicalProcessors, MaxClockSpeed"
mkdir tmp
export TMPDIR=`pwd`/tmp
export PATH=$PATH:`pwd`/build/lib
BUILD_CONFIG=Release/ BENCHMARK_NUM_THREADS=2 STORE_IMAGES=0 ./ci.sh fast_benchmark
- name: Package release zip
if: matrix.upload != 'OFF'
shell: 'powershell'
run: |
Compress-Archive -Path prefix\bin\*, prefix\lib\* `
-DestinationPath jxl-${{matrix.triplet}}.zip
- name: Upload release zip
if: matrix.upload != 'OFF'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: jxl-${{matrix.triplet}}
path: jxl-${{matrix.triplet}}.zip
compression-level: 0
publish_release_assets:
name: Publish release assets
needs: [ubuntu_static_x86_64, release_ubuntu_pkg, windows_build]
if: github.event_name == 'release'
runs-on: [ubuntu-latest]
permissions:
contents: write
steps:
- name: Checkout the source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
submodules: true
fetch-depth: 1
- name: Download all artifacts
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
path: release_assets
merge-multiple: true
- name: Publish assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} ./release_assets/*