libjxl

FORK: libjxl patches used on blog
git clone https://git.neptards.moe/blog/libjxl.git
Log | Files | Refs | Submodules | README | LICENSE

debug_ci.yml (4175B)


      1 # Copyright (c) the JPEG XL Project Authors. All rights reserved.
      2 #
      3 # Use of this source code is governed by a BSD-style
      4 # license that can be found in the LICENSE file.
      5 
      6 # Workflow for building and then debugging on a specific commit.
      7 
      8 name: Build and Test debugging
      9 on:
     10   push:
     11     branches:
     12       - ci-*-debug
     13 
     14 permissions:
     15   contents: read
     16 
     17 jobs:
     18   cross_compile_ubuntu:
     19     name: Cross-compiling ${{ matrix.build_target }} ${{ matrix.variant }}
     20     runs-on: [ubuntu-latest]
     21     container:
     22       image: debian:bookworm
     23     strategy:
     24       fail-fast: false
     25       matrix:
     26         include:
     27           - arch: i386
     28             build_target: i686-linux-gnu
     29 
     30     env:
     31       BUILD_DIR: build
     32 
     33     steps:
     34     - name: Harden Runner
     35       uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
     36       with:
     37         egress-policy: audit
     38 
     39     - name: Setup apt
     40       shell: bash
     41       run: |
     42         set -x
     43         rm -f /var/lib/man-db/auto-update
     44         apt-get update -y
     45         apt-get install -y ca-certificates debian-ports-archive-keyring
     46 
     47         dpkg --add-architecture "${{ matrix.arch }}"
     48 
     49         # Update the sources.list with the split of supported architectures.
     50         bkplist="/etc/apt/sources.list.bkp"
     51         mv /etc/apt/sources.list "${bkplist}"
     52 
     53         newlist="/etc/apt/sources.list"
     54         rm -f "${newlist}"
     55 
     56         main_list="amd64,${{ matrix.arch }}"
     57         port_list=""
     58         if [[ "${{ matrix.arch }}" == "i386" ]]; then
     59           main_list="amd64,i386"
     60         else
     61           port_list="${{ matrix.arch }}"
     62         fi
     63 
     64         grep -v -E '^#' "${bkplist}" |
     65           sed -E "s;^deb (http[^ ]+) (.*)\$;deb [arch=${main_list}] \\1 \\2\ndeb-src [arch=${main_list}] \\1 \\2;" \
     66           | tee -a "${newlist}"
     67 
     68     - name: Install build deps
     69       shell: bash
     70       run: |
     71         set -x
     72         rm -f /var/lib/man-db/auto-update
     73         apt update
     74         pkgs=(
     75           # Build dependencies
     76           cmake
     77           doxygen
     78           git
     79           graphviz
     80           ninja-build
     81           pkg-config
     82           qemu-user-static
     83           xdg-utils
     84           xvfb
     85 
     86           # Toolchain for cross-compiling.
     87           clang-11
     88           g++-aarch64-linux-gnu
     89           libc6-dev-${{ matrix.arch }}-cross
     90           libstdc++-10-dev-${{ matrix.arch }}-cross
     91           libstdc++-10-dev:${{ matrix.arch }}
     92 
     93           # Dependencies
     94           libbrotli-dev:${{ matrix.arch }}
     95           libgif-dev:${{ matrix.arch }}
     96           libjpeg-dev:${{ matrix.arch }}
     97           libpng-dev:${{ matrix.arch }}
     98           libwebp-dev:${{ matrix.arch }}
     99 
    100           # For OpenEXR:
    101           libilmbase-dev:${{ matrix.arch }}
    102           libopenexr-dev:${{ matrix.arch }}
    103 
    104           # GTK plugins
    105           libgdk-pixbuf2.0-dev:${{ matrix.arch }}
    106           libgtk2.0-dev:${{ matrix.arch }}
    107         )
    108         if [[ "${{ matrix.build_target }}" != "x86_64-linux-gnu" ]]; then
    109           pkgs+=(
    110             binutils-${{ matrix.build_target }}
    111             gcc-${{ matrix.build_target }}
    112           )
    113         fi
    114         if [[ "${{ matrix.arch }}" != "i386" ]]; then
    115           pkgs+=(
    116             # TCMalloc
    117             libgoogle-perftools-dev:${{ matrix.arch }}
    118             libgoogle-perftools4:${{ matrix.arch }}
    119             libtcmalloc-minimal4:${{ matrix.arch }}
    120             libunwind-dev:${{ matrix.arch }}
    121           )
    122         fi
    123         DEBIAN_FRONTEND=noninteractive apt install -y "${pkgs[@]}"
    124         echo "CC=${{ matrix.c_compiler || 'clang-11' }}" >> $GITHUB_ENV
    125         echo "CXX=${{ matrix.cxx_compiler || 'clang++-11' }}" >> $GITHUB_ENV
    126     - name: Checkout the source
    127       uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
    128       with:
    129         submodules: true
    130         fetch-depth: 1
    131     - name: Configure
    132       run: |
    133         CMAKE_FLAGS="${{ matrix.cmake_flags }}" ./ci.sh release \
    134           -DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
    135           -DJPEGXL_ENABLE_JNI=OFF \
    136           ${{ join(matrix.cmake_args, ' ') }}
    137       env:
    138         SKIP_BUILD: 1
    139         BUILD_TARGET: ${{ matrix.build_target }}
    140     - name: Setup tmate session
    141       uses: mxschmitt/action-tmate@a283f9441d2d96eb62436dc46d7014f5d357ac22 # v3.17
    142 
    143 
    144