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

Do not render noise on DC planes. #12496

Do not render noise on DC planes.

Do not render noise on DC planes. #12496

# 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 and running tests.
name: Build/Test Cross
on:
merge_group:
push:
branches:
- main
- v*.*.x
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
SDE_ID: "813591"
SDE_VERSION: "9.33.0-2024-01-07"
jobs:
compile:
name: Cross-compiling ${{ matrix.identifier }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'CI:none') }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
identifier: [armhf, i386, x64]
include:
- arch: armhf
os: ubuntu-24.04-arm
identifier: armhf
test_in_pr: true
build_target: arm-linux-gnueabihf
- arch: i386
identifier: i386
test_in_pr: true
build_target: i686-linux-gnu
cflags: -m32
- arch: i686
identifier: x64
test_in_pr: true
cmake_args: >-
-DJPEGXL_ENABLE_HWY_AVX3=true
-DJPEGXL_ENABLE_HWY_AVX3_DL=true
-DJPEGXL_ENABLE_HWY_AVX3_SPR=true
-DJPEGXL_ENABLE_HWY_AVX3_ZEN4=true
env:
WILL_RUN_TESTS: ${{ (github.event_name == 'push' || (github.event_name == 'pull_request' && (matrix.test_in_pr || contains(github.event.pull_request.labels.*.name, 'CI:full')))) }}
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: 1
- name: Install build deps
run: |
sudo ARCH=${{ matrix.arch }} BUILD_TARGET=${{ matrix.build_target }} \
./tools/scripts/install_deps.sh ${{ matrix.arch != 'i686' && '--cross' || ''}} build extras
- name: Build
run: |
CC=clang CXX=clang++ \
CFLAGS='${{ matrix.cflags }}' CXXFLAGS='${{ matrix.cflags }}' \
BUILD_DIR=build BUILD_TARGET=${{ matrix.build_target }} \
SKIP_TEST=1 TARGETS='all_tests cjxl djxl hwy_list_targets libjxl.so libjxl_dec.so' \
./ci.sh release \
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
-DJPEGXL_ENABLE_JNI=OFF \
${{ matrix.cmake_args }}
- name: Build stats
run: |
tools/scripts/build_stats.py --save build/stats.json \
${{ matrix.build_target && format('--binutils {0}-', matrix.build_target) || ''}} \
--max-stack ${{ matrix.max_stack || '0' }} \
cjxl djxl libjxl.so libjxl_dec.so
- name: Prepare artefacts
if: env.WILL_RUN_TESTS == 'true'
run: |
find ./build -regextype egrep -type f -regex '.*\.(a|h|jar|json|log|o)' -delete
find ./build -type f -executable > executable.lst
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: env.WILL_RUN_TESTS == 'true'
with:
name: cross_binary-${{ matrix.identifier }}
path: |
build/
executable.lst
retention-days: 1
test:
name: Testing ${{ matrix.identifier }} shard ${{ matrix.shard_number }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'CI:none') }}
needs: compile
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
shard_number: [0, 1, 2, 3, 5, 6, 7, 8]
identifier: [armhf, i386, x64]
include:
- arch: armhf
os: ubuntu-24.04-arm
identifier: armhf
test_in_pr: true
last_shard: 2
- arch: i386
identifier: i386
test_in_pr: true
last_shard: 2
- arch: i686
identifier: x64
test_in_pr: true
last_shard: 8
env:
UPLOAD_TEST_COST: false
LAST_SHARD: ${{ false && 1 || matrix.last_shard}}
# Run the tests on push and when requested in pull_request.
WILL_RUN_TESTS: ${{ (github.event_name == 'push' || (github.event_name == 'pull_request' && (matrix.test_in_pr || contains(github.event.pull_request.labels.*.name, 'CI:full')))) }}
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: 1
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
if: (matrix.shard_number < env.LAST_SHARD) && (env.WILL_RUN_TESTS == 'true')
with:
name: cross_binary-${{ matrix.identifier }}
- name: Install build deps
if: (matrix.shard_number < env.LAST_SHARD) && (env.WILL_RUN_TESTS == 'true')
run: |
sudo ARCH=${{ matrix.arch }} \
./tools/scripts/install_deps.sh ${{ matrix.arch != 'i686' && '--cross' || ''}} extras_runtime runtime
- name: Test ranging
run: |
mkdir -p ./build/Testing/Temporary
unzip ./tools/scripts/test_cost-${{ matrix.identifier }}.zip -d ./build/Testing/Temporary
- name: Prepare
if: (env.UPLOAD_TEST_COST == 'true') && (matrix.shard_number == 0) && (env.WILL_RUN_TESTS == 'true')
run: |
rm build/Testing/Temporary/CTestCostData.txt
- name: Cache SDE
if: ${{ matrix.arch == 'i686' }}
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ github.workspace }}/sde
key: sde-${{ env.SDE_ID }}
- name: Download SDE ${{ env.SDE_VERSION }}
if: ${{ matrix.arch == 'i686' }}
run: |
mkdir -p sde
cd sde
SDE_ARCHIVE=sde.tar.xz
if [ ! -f "${SDE_ARCHIVE}" ]; then
curl -L --show-error -o "${SDE_ARCHIVE}" \
https://downloadmirror.intel.com/${{ env.SDE_ID }}/sde-external-${{ env.SDE_VERSION }}-lin.tar.xz
fi
tar --strip-components=1 -xJf "${SDE_ARCHIVE}"
cd ..
- name: Test
if: (matrix.shard_number < env.LAST_SHARD) && (env.WILL_RUN_TESTS == 'true')
run: |
EMULATOR=
if [[ -n '${{ matrix.arch == 'i686' && 'true' || '' }}' ]]; then
EMULATOR="sde/sde64 -spr --"
fi
chmod +x `cat executable.lst`
BUILD_DIR=build \
${EMULATOR} ./ci.sh test \
-I ${{ matrix.shard_number }},,${{ env.LAST_SHARD }} \
-E '(bash_test|conformance_tooling_test|test_jxl_jni_wrapper|test_jpegli_jni_wrapper)'
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
name: Upload test cost
if: (env.UPLOAD_TEST_COST == 'true') && (matrix.shard_number == 0) && (env.WILL_RUN_TESTS == 'true')
with:
name: test_cost-${{ matrix.identifier }}
path: |
build/Testing/Temporary/CTestCostData.txt
retention-days: 1