fix: handle certlut allocation failures in lookup creation #649
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: libsixel CI (build & test) | |
| on: | |
| push: | |
| branches: ['**'] | |
| pull_request: | |
| branches: ['**'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ci-autotools: | |
| name: Autotools • ${{ matrix.os }} ${{ matrix.sys || 'native' }} | |
| runs-on: ${{ matrix.runner || matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| runner: ubuntu-latest | |
| sys: x86_64 | |
| - os: ubuntu-latest | |
| runner: ubuntu-latest | |
| sys: i686 | |
| - os: macos-latest | |
| runner: macos-latest | |
| sys: aarch64 | |
| - os: macos-15 | |
| runner: macos-15 | |
| sys: x86_64 | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: MINGW64 | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: UCRT64 | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: clang | |
| sys: CLANG64 | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: cl | |
| sys: MSVC | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: MINGW32 | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: MSYS | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: CYGWIN | |
| steps: | |
| - name: Configure git EOL | |
| if: runner.os == 'Windows' | |
| run: git config --global core.autocrlf false | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Normalize line endings (Windows) | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| git config core.autocrlf false | |
| git reset --hard | |
| - name: Install multilib toolchain (Linux i686) | |
| if: runner.os == 'Linux' && (matrix.sys || '') == 'i686' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-multilib | |
| - name: Fix Homebrew taps/cache | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew update-reset | |
| rm -f ~/Library/Caches/Homebrew/downloads/* || true | |
| brew update -f | |
| brew doctor || true | |
| - name: Install lcov (macOS) | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: | | |
| brew update | |
| brew install lcov | |
| - name: Setup MSVC developer env (vcvars) | |
| if: ${{ runner.os == 'Windows' && matrix.sys == 'MSVC' }} | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Setup MSYS2 (Windows, MinGW/UCRT/Clang) | |
| if: runner.os == 'Windows' && matrix.sys != 'MSVC' && matrix.sys != 'MSYS' && matrix.sys != 'CYGWIN' && matrix.sys != 'MINGW32' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.sys }} | |
| update: true | |
| install: >- | |
| make | |
| pacboy: >- | |
| cc:p | |
| lcov:p | |
| - name: Setup MSYS2 (Windows, MinGW/UCRT/Clang) | |
| if: matrix.sys == 'MINGW32' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.sys }} | |
| update: true | |
| install: >- | |
| make | |
| pacboy: >- | |
| cc:p | |
| - name: Setup MSYS2 (Windows, MSYS gcc) | |
| if: runner.os == 'Windows' && matrix.sys == 'MSYS' && matrix.compiler == 'gcc' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MSYS | |
| update: true | |
| install: >- | |
| make | |
| gcc | |
| pkgconf | |
| python-pip | |
| lcov | |
| - name: Setup MSYS2 (Windows, MSVC) | |
| if: runner.os == 'Windows' && matrix.sys == 'MSVC' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MSYS | |
| update: true | |
| install: >- | |
| make | |
| - name: Setup Cygwin | |
| if: runner.os == 'Windows' && matrix.sys == 'CYGWIN' | |
| uses: cygwin/cygwin-install-action@v4 | |
| with: | |
| packages: gcc-core,make,pkg-config,python3,python3-pip,ninja | |
| - name: Install gcovr | |
| if: runner.os != 'Windows' | |
| run: | | |
| python3 -m venv .venv | |
| . .venv/bin/activate | |
| pip install -U pip gcovr | |
| echo "$PWD/.venv/bin" >> "$GITHUB_PATH" | |
| - name: Install gcc-14 (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-14 | |
| - name: Configure and build (non-Windows) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| if [ '${{ matrix.sys || '' }}' = 'i686' ]; then | |
| export CC="gcc -m32" | |
| export PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig | |
| export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig | |
| fi | |
| if [ "${{ runner.os }}" = "Linux" ]; then | |
| export CC=gcc-14 | |
| fi | |
| ./configure \ | |
| --without-png \ | |
| --without-jpeg \ | |
| --without-libcurl \ | |
| --without-bashcompletiondir \ | |
| --without-zshcompletiondir \ | |
| --disable-python \ | |
| --enable-debug \ | |
| --enable-tests \ | |
| --enable-gcov \ | |
| --disable-dependency-tracking | |
| cat config.log | |
| make V=1 | |
| - name: Configure and build (Windows, not MSVC/Cygwin) | |
| if: ${{ runner.os == 'Windows' && matrix.sys != 'MSVC' && matrix.sys != 'CYGWIN' }} | |
| shell: msys2 {0} | |
| run: | | |
| ./configure CC=${{ matrix.compiler }} \ | |
| --without-png \ | |
| --without-jpeg \ | |
| --without-libcurl \ | |
| --without-bashcompletiondir \ | |
| --without-zshcompletiondir \ | |
| --disable-python \ | |
| --enable-debug \ | |
| --enable-tests \ | |
| --enable-gcov \ | |
| --disable-dependency-tracking | |
| cat config.log | |
| make V=1 | |
| - name: Configure and build (Windows, Cygwin) | |
| if: ${{ runner.os == 'Windows' && matrix.sys == 'CYGWIN' }} | |
| shell: pwsh | |
| run: | | |
| $cygwinRoot = 'C:\cygwin' | |
| if (-not (Test-Path $cygwinRoot)) { $cygwinRoot = 'C:\cygwin64' } | |
| $workspace = &"$cygwinRoot\bin\cygpath.exe" -u $env:GITHUB_WORKSPACE | |
| $scriptLines = @( | |
| 'set -eu', | |
| 'set -o pipefail 2>/dev/null || true', | |
| "export GITHUB_WORKSPACE=`"$workspace`"", | |
| "cd `"$workspace`"", | |
| './configure CC=${{ matrix.compiler }} --without-png --without-jpeg --without-libcurl --without-bashcompletiondir --without-zshcompletiondir --disable-python --enable-debug --enable-tests --enable-gcov --disable-dependency-tracking', | |
| 'cat config.log', | |
| 'make V=1' | |
| ) | |
| $script = [string]::Join("`n", $scriptLines) | |
| &"$cygwinRoot\bin\bash.exe" --login -c $script | |
| - name: Configure and build (Windows, MSVC) | |
| if: ${{ runner.os == 'Windows' && matrix.compiler == 'cl' }} | |
| shell: msys2 {0} | |
| run: | | |
| VCVARS="$(cygpath -w "$VSINSTALLDIR")\\VC\\Auxiliary\\Build\\vcvarsall.bat" | |
| cmd //c call "${VCVARS}" x64 \>nul \&\& set | |
| eval $( | |
| cmd //c call "${VCVARS}" x64 \>nul \&\& set | | |
| grep -i '^\(PATH\|INCLUDE\|LIB\|LIBPATH\)' | | |
| while IFS== read -r key val; do | |
| case "$key" in PATH|Path) | |
| echo export PATH=\"$(echo "$val" | tr \; \\n | while read -r p; do cygpath "$p"; done | grep ^/ | tr \\n :)\"\; | |
| ;; | |
| *) | |
| echo export "$key"=\""$val"\"\; | |
| ;; | |
| esac; | |
| done | |
| ) | |
| ./configure CC=cl LD=link AR="${SHELL} $(pwd)/ar-lib lib" ARFLAGS=cr NM="dumpbin -symbols" STRIP=: RANLIB=: \ | |
| --host=x86_64-pc-windows-msvc \ | |
| --without-png \ | |
| --without-jpeg \ | |
| --without-libcurl \ | |
| --without-bashcompletiondir \ | |
| --without-zshcompletiondir \ | |
| --disable-python \ | |
| --enable-debug \ | |
| --enable-tests \ | |
| --disable-dependency-tracking | |
| cat config.log | |
| make V=1 | |
| - name: Run tests (non-Windows) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: make check | |
| - name: Run tests (Windows, not MSVC/Cygwin/CLANG64) | |
| if: runner.os == 'Windows' && matrix.sys != 'CLANG64' && matrix.sys != 'MSVC' && matrix.sys != 'CYGWIN' | |
| shell: msys2 {0} | |
| run: make check | |
| - name: Run tests (Windows, CLANG64) | |
| if: runner.os == 'Windows' && matrix.sys == 'CLANG64' | |
| shell: msys2 {0} | |
| run: | | |
| LLVM_PROFILE_FILE="%p-%m.profraw" make check | |
| find . -name \*.profraw || true | |
| llvm-profdata merge -sparse coverage/*.profraw -o coverage/coverage.profdata || true | |
| find . -type f \( -name '*.exe' -o -name '*.dll' \) | | |
| xargs llvm-cov export -format=lcov \ | |
| -instr-profile=coverage/coverage.profdata > coverage.info || true | |
| - name: Run tests (Windows, MSVC) | |
| if: runner.os == 'Windows' && matrix.compiler == 'cl' | |
| shell: msys2 {0} | |
| run: | | |
| VCVARS="$(cygpath -w "$VSINSTALLDIR")\\VC\\Auxiliary\\Build\\vcvarsall.bat" | |
| cmd //c call "${VCVARS}" x64 \>nul \&\& set | |
| eval $( | |
| cmd //c call "${VCVARS}" x64 \>nul \&\& set | | |
| grep -i '^\(PATH\|INCLUDE\|LIB\|LIBPATH\)' | | |
| while IFS== read -r key val; do | |
| case "$key" in PATH|Path) | |
| echo export PATH=\"$(echo "$val" | tr \; \\n | while read -r p; do cygpath "$p"; done | grep ^/ | tr \\n :)\"\; | |
| ;; | |
| *) | |
| echo export "$key"=\""$val"\"\; | |
| ;; | |
| esac; | |
| done | |
| ) | |
| make check V=1 | |
| - name: Run tests (Windows, Cygwin) | |
| if: runner.os == 'Windows' && matrix.sys == 'CYGWIN' | |
| shell: pwsh | |
| run: | | |
| $cygwinRoot = 'C:\cygwin' | |
| if (-not (Test-Path $cygwinRoot)) { $cygwinRoot = 'C:\cygwin64' } | |
| $workspace = &"$cygwinRoot\bin\cygpath.exe" -u $env:GITHUB_WORKSPACE | |
| $scriptLines = @( | |
| 'set -eu', | |
| 'set -o pipefail 2>/dev/null || true', | |
| "export GITHUB_WORKSPACE=`"$workspace`"", | |
| "cd `"$workspace`"", | |
| 'make check' | |
| ) | |
| $script = [string]::Join("`n", $scriptLines) | |
| &"$cygwinRoot\bin\bash.exe" --login -c $script | |
| - name: Capture coverage (Linux) | |
| if: runner.os == 'Linux' | |
| shell: bash | |
| run: | | |
| gcovr -r . --lcov -o coverage.info \ | |
| --gcov-executable gcov-14 | |
| - name: Capture coverage (non-MSVC) | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: | | |
| lcov -c \ | |
| -d "$PWD/src/.libs" \ | |
| -d "$PWD/converters" \ | |
| --rc branch_coverage=1 \ | |
| -o coverage.info | |
| - name: Capture coverage (Windows MSYS2/MinGW/UCRT/Clang) | |
| if: runner.os == 'Windows' && matrix.sys != 'MSVC' && matrix.sys != 'CYGWIN' && matrix.sys != 'MINGW32' | |
| shell: msys2 {0} | |
| run: | | |
| lcov -c \ | |
| -d "$PWD/src/.libs" \ | |
| -d "$PWD/converters" \ | |
| --rc branch_coverage=1 \ | |
| -o coverage.info | |
| # - name: Capture coverage (Windows Cygwin via gcovr) | |
| # if: ${{ runner.os == 'Windows' && matrix.sys == 'CYGWIN' }} | |
| # shell: pwsh | |
| # run: | | |
| # $cygwinRoot = 'C:\cygwin' | |
| # if (-not (Test-Path $cygwinRoot)) { $cygwinRoot = 'C:\cygwin64' } | |
| # $workspace = &"$cygwinRoot\bin\cygpath.exe" -u $env:GITHUB_WORKSPACE | |
| # $scriptLines = @( | |
| # 'set -eu', | |
| # 'set -o pipefail 2>/dev/null || true', | |
| # "export GITHUB_WORKSPACE=`"$workspace`"", | |
| # "cd `"$workspace`"", | |
| # 'python3 -m pip install gcovr', | |
| # 'gcovr -r . --lcov -o coverage.info --gcov-executable /usr/bin/gcov' | |
| # ) | |
| # $script = [string]::Join("`n", $scriptLines) | |
| # &"$cygwinRoot\bin\bash.exe" --login -c $script | |
| - name: Upload to Coveralls (per-flag, parallel) | |
| if: ${{ runner.os != 'Windows' && matrix.os != 'macos-15' }} | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: coverage.info | |
| flag-name: ${{ matrix.cfg }} | |
| parallel: true | |
| ci-autotools-finish: | |
| needs: ci-autotools | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Finalize Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| parallel-finished: true | |
| ci-dist-autotools: | |
| name: Autotools dist tarball • ${{ matrix.label }} | |
| runs-on: ${{ matrix.runner || matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - label: Linux thumbnailer command | |
| os: ubuntu-latest | |
| runner: ubuntu-latest | |
| configure_flags: >- | |
| --without-png --without-jpeg --without-libcurl | |
| --without-bashcompletiondir --without-zshcompletiondir | |
| --disable-python --enable-debug --enable-tests | |
| --disable-dependency-tracking --enable-thumbnailer-command | |
| - label: macOS Quick Look extension | |
| os: macos-latest | |
| runner: macos-latest | |
| configure_flags: >- | |
| --without-png --without-jpeg --without-libcurl | |
| --without-bashcompletiondir --without-zshcompletiondir | |
| --disable-python --enable-debug --enable-tests | |
| --disable-dependency-tracking --enable-quicklook-extension | |
| --enable-quicklook-preview | |
| - label: Windows WIC codec (MinGW) | |
| os: windows-latest | |
| runner: windows-latest | |
| msystem: MINGW64 | |
| configure_flags: >- | |
| --without-png --without-jpeg --without-libcurl | |
| --without-bashcompletiondir --without-zshcompletiondir | |
| --disable-python --enable-debug --enable-tests | |
| --disable-dependency-tracking --enable-wiccodec | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Prepare Homebrew cache | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew update-reset | |
| rm -f ~/Library/Caches/Homebrew/downloads/* || true | |
| brew update -f | |
| - name: Setup MSYS2 (Windows) | |
| if: runner.os == 'Windows' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.msystem }} | |
| update: true | |
| install: >- | |
| make | |
| pacboy: >- | |
| cc:p | |
| - name: Create Autotools dist archive (non-Windows) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| ./configure ${{ matrix.configure_flags }} | |
| make -j$(sysctl -n hw.ncpu 2>/dev/null || nproc) | |
| make dist | |
| ls -l libsixel-*.tar.* | |
| - name: Create Autotools dist archive (Windows) | |
| if: runner.os == 'Windows' | |
| shell: msys2 {0} | |
| run: | | |
| set -euxo pipefail | |
| ./configure ${{ matrix.configure_flags }} | |
| make -j$(nproc) | |
| make dist | |
| ls -l libsixel-*.tar.* | |
| - name: Build from Autotools dist archive (non-Windows) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| tarball=$(ls libsixel-*.tar.* | head -n1) | |
| mkdir dist-build | |
| tar -xf "$tarball" -C dist-build | |
| distdir=$(find dist-build -maxdepth 1 -type d -name 'libsixel-*' | head -n1) | |
| cd "$distdir" | |
| ./configure ${{ matrix.configure_flags }} | |
| make -j$(sysctl -n hw.ncpu 2>/dev/null || nproc) | |
| make check | |
| - name: Build from Autotools dist archive (Windows) | |
| if: runner.os == 'Windows' | |
| shell: msys2 {0} | |
| run: | | |
| set -euxo pipefail | |
| tarball=$(ls libsixel-*.tar.* | head -n1) | |
| mkdir dist-build | |
| tar -xf "$tarball" -C dist-build | |
| distdir=$(find dist-build -maxdepth 1 -type d -name 'libsixel-*' | head -n1) | |
| cd "$distdir" | |
| ./configure ${{ matrix.configure_flags }} | |
| make -j$(nproc) | |
| make check | |
| ci-autotools-asan: | |
| name: Autotools ASan • ${{ matrix.os }} clang${{ matrix.variant_suffix }} | |
| runs-on: ${{ matrix.runner || matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| runner: ubuntu-latest | |
| variant_suffix: '' | |
| configure_extra: '' | |
| apt: '' | |
| - os: ubuntu-latest | |
| runner: ubuntu-latest | |
| variant_suffix: ' • with-gd' | |
| configure_extra: '--with-gd' | |
| apt: 'libgd-dev' | |
| - os: ubuntu-latest | |
| runner: ubuntu-latest | |
| variant_suffix: ' • with-gdk-pixbuf2' | |
| configure_extra: '--with-gdk-pixbuf2' | |
| apt: 'libgdk-pixbuf2.0-dev' | |
| - os: ubuntu-latest | |
| runner: ubuntu-latest | |
| variant_suffix: ' • with-png' | |
| configure_extra: '--with-png' | |
| apt: 'libpng-dev' | |
| - os: ubuntu-latest | |
| runner: ubuntu-latest | |
| variant_suffix: ' • with-jpeg' | |
| configure_extra: '--with-jpeg' | |
| apt: 'libjpeg-turbo8-dev' | |
| - os: ubuntu-latest | |
| runner: ubuntu-latest | |
| variant_suffix: ' • with-libcurl' | |
| configure_extra: '--with-libcurl' | |
| apt: 'libcurl4-openssl-dev' | |
| - os: macos-latest | |
| runner: macos-latest | |
| variant_suffix: '' | |
| configure_extra: '' | |
| apt: '' | |
| - os: macos-latest | |
| runner: macos-latest | |
| variant_suffix: ' • enable-quicklook-extension' | |
| configure_extra: '--enable-quicklook-extension' | |
| apt: '' | |
| - os: macos-latest | |
| runner: macos-latest | |
| variant_suffix: ' • with-coregraphics' | |
| configure_extra: '--with-coregraphics' | |
| apt: '' | |
| - os: macos-15 | |
| runner: macos-15 | |
| variant_suffix: '' | |
| configure_extra: '' | |
| apt: '' | |
| - os: windows-latest | |
| runner: windows-latest | |
| sys: CLANG64 | |
| variant_suffix: '' | |
| configure_extra: '' | |
| apt: '' | |
| - os: windows-latest | |
| runner: windows-latest | |
| sys: CLANG64 | |
| variant_suffix: ' • with-wic' | |
| configure_extra: '--with-wic' | |
| apt: '' | |
| - os: windows-latest | |
| runner: windows-latest | |
| sys: CLANG64 | |
| variant_suffix: ' • enable-wiccodec' | |
| configure_extra: '--enable-wiccodec' | |
| apt: '' | |
| - os: windows-latest | |
| runner: windows-latest | |
| sys: CLANG64 | |
| variant_suffix: ' • with-winhttp' | |
| configure_extra: '--with-winhttp' | |
| apt: '' | |
| env: | |
| ASAN_CFLAGS: "-fsanitize=address -O1 -g -fno-omit-frame-pointer" | |
| ASAN_LDFLAGS: "-fsanitize=address" | |
| steps: | |
| - name: Configure git EOL | |
| if: runner.os == 'Windows' | |
| run: git config --global core.autocrlf false | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Normalize line endings (Windows) | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| git config core.autocrlf false | |
| git reset --hard | |
| - name: Install clang (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang | |
| - name: Install dependencies (Ubuntu variant) | |
| if: runner.os == 'Linux' && matrix.apt != '' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ${{ matrix.apt }} | |
| - name: Setup MSYS2 (Windows, clang) | |
| if: runner.os == 'Windows' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.sys }} | |
| update: true | |
| install: >- | |
| make | |
| pkgconf | |
| pacboy: >- | |
| cc:p | |
| - name: Configure and build (ASan, non-Windows) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| extra='${{ matrix.configure_extra }}' | |
| CC=clang \ | |
| CFLAGS="$ASAN_CFLAGS" \ | |
| LDFLAGS="$ASAN_LDFLAGS" \ | |
| ./configure \ | |
| --without-png \ | |
| --without-jpeg \ | |
| --without-libcurl \ | |
| --without-bashcompletiondir \ | |
| --without-zshcompletiondir \ | |
| --disable-python \ | |
| --enable-debug \ | |
| --enable-tests \ | |
| --disable-dependency-tracking \ | |
| ${extra:+$extra} | |
| cat config.log | |
| make V=1 | |
| - name: Configure and build (ASan, Windows) | |
| if: runner.os == 'Windows' | |
| shell: msys2 {0} | |
| run: | | |
| extra='${{ matrix.configure_extra }}' | |
| CC=clang CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_LDFLAGS" ./configure \ | |
| --without-png \ | |
| --without-jpeg \ | |
| --without-libcurl \ | |
| --without-bashcompletiondir \ | |
| --without-zshcompletiondir \ | |
| --disable-python \ | |
| --enable-debug \ | |
| --enable-tests \ | |
| --disable-dependency-tracking \ | |
| ${extra:+$extra} | |
| cat config.log | |
| make V=1 | |
| ci-dist-meson: | |
| name: Meson dist tarball • ${{ matrix.label }} | |
| runs-on: ${{ matrix.runner || matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - label: Linux thumbnailer command | |
| os: ubuntu-latest | |
| runner: ubuntu-latest | |
| setup_flags: >- | |
| -Dpng=disabled -Djpeg=disabled -Dcurl=disabled | |
| -Dbashcompletiondir= -Dzshcompletiondir= | |
| -Dpython=disabled -Druby=disabled -Dtests=true | |
| -Dthumbnailer_command=enabled | |
| - label: macOS Quick Look extension | |
| os: macos-latest | |
| runner: macos-latest | |
| setup_flags: >- | |
| -Dpng=disabled -Djpeg=disabled -Dcurl=disabled | |
| -Dbashcompletiondir= -Dzshcompletiondir= | |
| -Dpython=disabled -Druby=disabled -Dtests=true | |
| -Dquicklook_extension=enabled -Dquicklook_preview=enabled | |
| - label: Windows WIC codec (MinGW) | |
| os: windows-latest | |
| runner: windows-latest | |
| msystem: MINGW64 | |
| setup_flags: >- | |
| --default-library static --wrap-mode=nodownload | |
| -Dpng=disabled -Djpeg=disabled -Dcurl=disabled | |
| -Dbashcompletiondir= -Dzshcompletiondir= | |
| -Dpython=disabled -Druby=disabled -Dtests=true | |
| -Dwic=enabled -Dwiccodec=enabled | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Meson toolchain (non-Windows) | |
| if: runner.os != 'Windows' | |
| run: | | |
| python3 -m venv .meson-venv | |
| . .meson-venv/bin/activate | |
| pip install --upgrade pip | |
| pip install meson ninja | |
| echo "$PWD/.meson-venv/bin" >> "$GITHUB_PATH" | |
| - name: Setup MSYS2 with Meson (Windows) | |
| if: runner.os == 'Windows' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.msystem }} | |
| update: true | |
| install: >- | |
| python | |
| ninja | |
| git | |
| pacboy: >- | |
| cc:p | |
| meson:p | |
| ninja:p | |
| - name: Create Meson dist archive (Linux/macOS) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| meson setup builddir --wrap-mode=nodownload ${{ matrix.setup_flags }} | |
| meson compile -C builddir | |
| meson dist -C builddir | |
| ls -l builddir/meson-dist | |
| - name: Create Meson dist archive (Windows) | |
| if: runner.os == 'Windows' | |
| shell: msys2 {0} | |
| run: | | |
| set -euxo pipefail | |
| meson setup builddir ${{ matrix.setup_flags }} | |
| meson compile -C builddir | |
| meson dist -C builddir --allow-dirty | |
| ls -l builddir/meson-dist | |
| - name: Build from Meson dist archive (Linux/macOS) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| tarball=$(ls builddir/meson-dist/libsixel-*.tar.* | head -n1) | |
| mkdir dist-build | |
| tar -xf "$tarball" -C dist-build | |
| distdir=$(find dist-build -maxdepth 1 -type d -name 'libsixel-*' | head -n1) | |
| cd "$distdir" | |
| meson setup build --wrap-mode=nodownload ${{ matrix.setup_flags }} | |
| meson compile -C build | |
| meson test -C build || { cat build/meson-logs/testlog.txt || true; exit 1; } | |
| - name: Build from Meson dist archive (Windows) | |
| if: runner.os == 'Windows' | |
| shell: msys2 {0} | |
| run: | | |
| set -euxo pipefail | |
| tarball=$(ls builddir/meson-dist/libsixel-*.tar.* | head -n1) | |
| mkdir dist-build | |
| tar -xf "$tarball" -C dist-build | |
| distdir=$(find dist-build -maxdepth 1 -type d -name 'libsixel-*' | head -n1) | |
| cd "$distdir" | |
| meson setup build ${{ matrix.setup_flags }} | |
| meson compile -C build | |
| meson test -C build || { cat build/meson-logs/testlog.txt || true; exit 1; } | |
| ci-meson: | |
| name: Meson • ${{ matrix.os }} ${{ matrix.sys || 'native' }} | |
| runs-on: ${{ matrix.runner || matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| runner: ubuntu-latest | |
| - os: ubuntu-latest | |
| runner: ubuntu-latest | |
| sys: i686 | |
| - os: macos-latest | |
| runner: macos-latest | |
| - os: macos-15 | |
| runner: macos-15 | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: MINGW64 | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: UCRT64 | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: clang | |
| sys: CLANG64 | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: cl | |
| sys: MSVC | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: MINGW32 | |
| - os: windows-latest | |
| runner: windows-latest | |
| compiler: gcc | |
| sys: MSYS | |
| # - os: windows-latest | |
| # runner: windows-latest | |
| # compiler: gcc | |
| # sys: CYGWIN | |
| steps: | |
| - name: Configure git EOL | |
| if: runner.os == 'Windows' | |
| run: git config --global core.autocrlf false | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Normalize line endings (Windows) | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| git config core.autocrlf false | |
| git reset --hard | |
| - name: Install multilib toolchain (Linux i686) | |
| if: runner.os == 'Linux' && (matrix.sys || '') == 'i686' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-multilib | |
| - name: Setup MSVC developer env (vcvars) | |
| if: ${{ runner.os == 'Windows' && matrix.compiler == 'cl' }} | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Setup MSYS2 (Windows, MinGW/UCRT/Clang) | |
| if: runner.os == 'Windows' && matrix.compiler != 'cl' && matrix.sys != 'MSYS' && matrix.sys != 'CYGWIN' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.sys }} | |
| update: true | |
| install: >- | |
| python | |
| ninja | |
| pacboy: >- | |
| cc:p | |
| meson:p | |
| ninja:p | |
| - name: Setup MSYS2 (Windows, MSYS gcc) | |
| if: runner.os == 'Windows' && matrix.sys == 'MSYS' && matrix.compiler == 'gcc' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MSYS | |
| update: true | |
| install: >- | |
| python | |
| ninja | |
| meson | |
| gcc | |
| pkgconf | |
| - name: Setup Cygwin | |
| if: runner.os == 'Windows' && matrix.sys == 'CYGWIN' | |
| uses: cygwin/cygwin-install-action@v4 | |
| with: | |
| packages: gcc-core,make,pkg-config,python3,python3-pip,ninja | |
| - name: Install Meson (non-Windows) | |
| if: runner.os != 'Windows' | |
| run: | | |
| python3 -m venv .meson-venv | |
| . .meson-venv/bin/activate | |
| pip install --upgrade pip | |
| pip install meson ninja | |
| echo "$PWD/.meson-venv/bin" >> "$GITHUB_PATH" | |
| - name: Install Meson (Cygwin) | |
| if: runner.os == 'Windows' && matrix.sys == 'CYGWIN' | |
| shell: pwsh | |
| run: | | |
| $cygwinRoot = 'C:\cygwin' | |
| if (-not (Test-Path $cygwinRoot)) { $cygwinRoot = 'C:\cygwin64' } | |
| $scriptLines = @( | |
| 'set -eu', | |
| 'set -o pipefail 2>/dev/null || true', | |
| 'python3 -m pip install --upgrade pip', | |
| 'python3 -m pip install meson ninja', | |
| 'gp_posix=$(cygpath -u "$GITHUB_PATH")', | |
| 'echo "$HOME/.local/bin" >> "$gp_posix"' | |
| ) | |
| $script = [string]::Join("`n", $scriptLines) | |
| &"$cygwinRoot\bin\bash.exe" --login -c $script | |
| - name: Configure, build, and test (Meson, non-Windows) | |
| if: runner.os != 'Windows' | |
| run: | | |
| if [ '${{ matrix.sys || '' }}' = 'i686' ]; then | |
| export CC=gcc | |
| export CFLAGS="-m32" | |
| export LDFLAGS="-m32" | |
| export PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig | |
| export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig | |
| fi | |
| meson setup builddir \ | |
| --wrap-mode=nodownload \ | |
| -Dpng=disabled \ | |
| -Djpeg=disabled \ | |
| -Dcurl=disabled \ | |
| -Dbashcompletiondir= \ | |
| -Dzshcompletiondir= \ | |
| -Dpython=disabled \ | |
| -Dtests=true | |
| meson compile -C builddir | |
| meson test -C builddir || { cat builddir/meson-logs/testlog.txt || true; exit 1; } | |
| - name: Configure, build, and test (Meson, Windows, not MSVC/Cygwin) | |
| if: ${{ runner.os == 'Windows' && matrix.sys != 'MSVC' && matrix.sys != 'CYGWIN' }} | |
| shell: msys2 {0} | |
| run: | | |
| meson setup builddir \ | |
| --wrap-mode=nodownload \ | |
| --default-library static \ | |
| -Dpng=disabled \ | |
| -Djpeg=disabled \ | |
| -Dcurl=disabled \ | |
| -Dbashcompletiondir= \ | |
| -Dzshcompletiondir= \ | |
| -Dpython=disabled \ | |
| -Dtests=true | |
| meson compile -C builddir | |
| meson test -C builddir || { cat builddir/meson-logs/testlog.txt || true; exit 1; } | |
| - name: Configure, build, and test (Meson, Windows, Cygwin) | |
| if: ${{ runner.os == 'Windows' && matrix.sys == 'CYGWIN' }} | |
| shell: pwsh | |
| run: | | |
| $cygwinRoot = 'C:\cygwin' | |
| if (-not (Test-Path $cygwinRoot)) { $cygwinRoot = 'C:\cygwin64' } | |
| $workspace = &"$cygwinRoot\bin\cygpath.exe" -u $env:GITHUB_WORKSPACE | |
| $scriptLines = @( | |
| 'set -eu', | |
| 'set -o pipefail 2>/dev/null || true', | |
| "export GITHUB_WORKSPACE=`"$workspace`"", | |
| "cd `"$workspace`"", | |
| 'meson setup builddir --wrap-mode=nodownload --default-library static -Dpng=disabled -Djpeg=disabled -Dcurl=disabled -Dbashcompletiondir= -Dzshcompletiondir= -Dpython=disabled -Dtests=true', | |
| 'meson compile -C builddir', | |
| 'meson test -C builddir -v || { cat builddir/meson-logs/testlog.txt || true; exit 1; }' | |
| ) | |
| $script = [string]::Join("`n", $scriptLines) | |
| &"$cygwinRoot\bin\bash.exe" --login -c $script | |
| - name: Configure, build, and test (Meson, Windows, MSVC) | |
| if: ${{ runner.os == 'Windows' && matrix.compiler == 'cl' }} | |
| shell: cmd | |
| run: | | |
| setlocal ENABLEDELAYEDEXPANSION | |
| call "%VSINSTALLDIR%\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
| python -m pip install --upgrade pip | |
| python -m pip install meson ninja | |
| python -m mesonbuild.mesonmain setup builddir ^ | |
| --wrap-mode=nodownload ^ | |
| --default-library static ^ | |
| -Dpng=disabled ^ | |
| -Djpeg=disabled ^ | |
| -Dcurl=disabled ^ | |
| -Dbashcompletiondir= ^ | |
| -Dzshcompletiondir= ^ | |
| -Dpython=disabled ^ | |
| -Dtests=true | |
| if errorlevel 1 exit /b !errorlevel! | |
| python -m mesonbuild.mesonmain compile -C builddir | |
| if errorlevel 1 exit /b !errorlevel! | |
| python -m mesonbuild.mesonmain test -C builddir -v | |
| if errorlevel 1 ( | |
| if exist builddir\meson-logs\testlog.txt type builddir\meson-logs\testlog.txt | |
| exit /b !errorlevel! | |
| ) | |
| endlocal | |
| # emacs Local Variables: | |
| # emacs mode: c | |
| # emacs tab-width: 4 | |
| # emacs indent-tabs-mode: nil | |
| # emacs c-basic-offset: 4 | |
| # emacs End: | |
| # vim: set ft=awk et ts=4 sw=0 sts=-1 fdm=marker fdl=0: |