Skip to content

FIXUP more pkg-conf #25

FIXUP more pkg-conf

FIXUP more pkg-conf #25

Workflow file for this run

# SPDX-FileCopyrightText: 2025 Dan Fandrich
#
# SPDX-License-Identifier: CC0-1.0
name: CI
'on':
push:
branches:
- master
- '*/ci'
paths-ignore:
- '**/*.md'
- '.appveyor.yml'
pull_request:
branches:
- master
paths-ignore:
- '**/*.md'
- '.appveyor.yml'
permissions: {}
jobs:
linux:
name: ${{ matrix.os }} ${{ matrix.cc }} ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
MAKEFLAGS: -j 5
DEBIAN_FRONTEND: noninteractive
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-22.04]
cc: [gcc, clang]
packages: [build-essential clang autoconf automake autopoint libtool gettext libpopt-dev]
cflags: [-Wall -Wextra -O2]
include:
# This uses ASAN and UBSAN, enables more warnings, plus errors out on any warnings
- name: sanitize
os: ubuntu-24.04
packages: clang build-essential autoconf automake autopoint libtool gettext libpopt-dev
cc: clang
# TODO: fix the code to eliminate the -Wno-... disables
cflags: -fsanitize=address -fsanitize=undefined -fsanitize-address-use-after-scope -fsanitize-undefined-trap-on-error -g -Wall -Wextra -Wno-assign-enum -Wno-switch -Wno-implicit-fallthrough -Wno-shorten-64-to-32 -Wno-conversion -Wno-sign-conversion -Wno-format-nonliteral -Wlong-long -Wmultichar -Wimplicit-function-declaration -Wpointer-arith -Wwrite-strings -Wshadow -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wfloat-equal -Wsign-compare -Wundef -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wcast-align -Wunused -Waddress -Wattributes -Wbad-function-cast -Wdiv-by-zero -Wformat-security -Wempty-body -Wmissing-field-initializers -Wmissing-noreturn -Wold-style-definition -Wredundant-decls -Wtype-limits -Wunreachable-code -Wunused-parameter -Wignored-qualifiers -Wvla -Wshift-sign-overflow -Wlanguage-extension-token -Wenum-conversion -Wsometimes-uninitialized -Wmissing-variable-declarations -Wheader-guard -Wunused-const-variable -Wpragmas -Wunreachable-code-break -Wdouble-promotion -Wcomma -Wextra-semi-stmt
ldflags: -fsanitize=address -fsanitize=undefined -fsanitize-address-use-after-scope -fsanitize-undefined-trap-on-error -g
mflags: AM_CFLAGS=-Werror
- name: C90
os: ubuntu-24.04
packages: build-essential autoconf automake autopoint libtool gettext libpopt-dev
cc: gcc
cflags: -Wall -Wextra -O2 -std=iso9899:1990 -D_XOPEN_SOURCE=500
- name: disable-nls
os: ubuntu-24.04
packages: build-essential autoconf automake autopoint libtool gettext libpopt-dev
cc: gcc
cflags: -Wall -Wextra -O2
configure: --disable-nls
steps:
- uses: actions/checkout@v4
- name: 'install prereqs'
run: sudo apt-get install -y --no-install-suggests --no-install-recommends ${{ matrix.packages }}
- name: 'install & build libexif'
run: git clone --depth=1 https://github.com/libexif/libexif.git /tmp/libexif && cd /tmp/libexif && autoreconf -sivf && ./configure --prefix=/tmp/libexif/install CC="${{ matrix.cc }}" && make V=1 && make V=1 install
- name: 'configure'
run: autoreconf -sfiv && ./configure --disable-dependency-tracking --prefix="${PWD}/install" CFLAGS="$CFLAGS" PKG_CONFIG_PATH="/tmp/libexif/install/lib/pkgconfig" CFLAGS="${{ matrix.cflags }}" LDFLAGS="${{ matrix.ldflags }}" CC="${{ matrix.cc }}" ${{ matrix.configure }} || { tail -400 config.log; false; }
- name: 'make'
run: make V=1 ${{ matrix.mflags }}
- name: 'test'
if: matrix.skiptests != true
env:
ASAN_OPTIONS: strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_leaks=1
run: make V=1 check || { tail -n 500 test*/test-suite.log; false; }
- name: 'install'
run: make V=1 install
coverage:
name: Linux code coverage
runs-on: ${{ matrix.os }}
env:
MAKEFLAGS: -j 5
DEBIAN_FRONTEND: noninteractive
strategy:
matrix:
include:
- os: ubuntu-24.04
packages: build-essential autoconf automake autopoint libtool gettext libpopt-dev lcov
cflags: -g -O0 --coverage
ldflags: -g -O0 --coverage
steps:
- uses: actions/checkout@v4
- name: 'install prereqs'
run: sudo apt-get install -y --no-install-suggests --no-install-recommends ${{ matrix.packages }}
- name: 'install libexif-testsuite'
run: |
git clone --depth=1 https://github.com/libexif/libexif-testsuite.git
cd libexif-testsuite
mkdir src
# point to the exif code checked out in actions/checkout above
ln -s "${GITHUB_WORKSPACE}" src/exif
./build-config.sh
autoreconf -sivf
- name: 'configure'
run: cd libexif-testsuite && ./configure --prefix="$PWD"/install --disable-dependency-tracking CFLAGS="${{ matrix.cflags }}" LDFLAGS="${{ matrix.ldflags }}" || { tail -n 500 config.log; false; }
- name: 'build'
run: |
# Build exif via its checkout path, not through the symlink at
# libexif-testsuite/src/exif, so that Coveralls can find the
# source code. This means we need to build libexif first
# so it can be available for exif.
make -C libexif-testsuite/src/libexif V=1
make V=1
make -C libexif-testsuite V=1
- name: 'coverage tests'
run: make -C libexif-testsuite V=1 check || { tail -n 500 test*/test-suite.log src/libexif/test*/test-suite.log; false; }
- name: 'coverage analysis'
run: cd libexif-testsuite && lcov -c -d src/exif/exif/ -o lcov.info
- name: push to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
file: libexif-testsuite/lcov.info
freebsd:
runs-on: ubuntu-latest
defaults:
run:
shell: cpa.sh {0}
strategy:
fail-fast: false
matrix:
osver: ['13.5', '14.3', '15.0']
arch: ['x86_64', 'aarch64']
cflags: [-Wall -Wextra -O2]
steps:
- uses: actions/checkout@v6
- name: start VM
uses: cross-platform-actions/action@v1
with:
operating_system: 'freebsd'
version: ${{ matrix.osver }}
architecture: ${{ matrix.arch }}
- name: install deps
run: sudo pkg install -y autoconf automake libtool gettext-tools gettext-runtime popt pkgconf git
- name: build libexif
run: |
git clone --depth=1 https://github.com/libexif/libexif.git /tmp/libexif
cd /tmp/libexif
autoreconf -sivf
./configure --prefix=/tmp/libexif/install --disable-dependency-tracking
make -j 3 V=1
make -j 3 V=1 install
- name: autoconf
run: autoreconf -sivf
- name: TEST PKG
run: |
pkg-config --cflags popt
pkg-config --libs popt
- name: configure
if: matrix.osver == '13.5'
run: ./configure --prefix="${HOME}" CFLAGS="${{ matrix.cflags }}" PKG_CONFIG_PATH="/tmp/libexif/install/lib/pkgconfig:/usr/libdata/pkgconfig:/usr/local/libdata/pkgconfig" POPT_CFLAGS="`pkg-config --cflags popt`" POPT_LIBS="`pkg-config --libs popt`"
- name: configure
if: matrix.osver != '13.5'
run: ./configure --prefix="${HOME}" CFLAGS="${{ matrix.cflags }}" PKG_CONFIG_PATH="/tmp/libexif/install/lib/pkgconfig:/usr/libdata/pkgconfig:/usr/local/libdata/pkgconfig" POPT_CFLAGS="$(pkg-config --cflags popt)" POPT_LIBS="$(pkg-config --libs popt)" || { tail -400 config.log; false; }
- name: build
run: make -j 3 V=1
- name: test
if: matrix.osver == '13.5'
run: make -j 3 V=1 check
- name: test
if: matrix.osver != '13.5'
run: make -j 3 V=1 check || { tail -400 test/test-suite.log; false; }
- name: install test
run: make -j 3 V=1 install