Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add CI job to test autotools custom prefix install and cmake consumption
Adds an "Autotools Custom prefix install" matrix entry that:
- Configures with a non-standard --libdir depth (lib/x86_64-linux-gnu)
  to exercise the install path computation in the cmake package files
- Installs directly (no DESTDIR) so cmake can consume the result
- Builds the examples against the installed package via find_package,
  confirming that headers, libraries, and cmake modules are all found
  correctly

Two new conditional steps are added to the autotools job:
- "Set install paths" computes INSTALL_PREFIX and INSTALL_LIBDIR from
  the matrix install_prefix value, keeping the path defined once
- "Consume with CMake" runs the examples build against the install
  • Loading branch information
thetic committed Mar 3, 2026
commit 1157ae327e51db95047f810ff59de2c5e3a4e0dd
23 changes: 22 additions & 1 deletion .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ jobs:
- name: Install
os: ubuntu-latest
make_args: DESTDIR=install_autotools install
- name: Custom prefix install
os: ubuntu-latest
make_args: install
install_prefix: /home/runner/cpputest_install
runs-on: ${{ matrix.os }}
name: Autotools ${{ matrix.name }}
steps:
Expand All @@ -81,12 +85,29 @@ jobs:
run: echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
- if: ${{ matrix.cc }}
run: echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV
- name: Set install paths
if: ${{ matrix.install_prefix }}
run: |
echo "INSTALL_PREFIX=${{ matrix.install_prefix }}" >> $GITHUB_ENV
echo "INSTALL_LIBDIR=${{ matrix.install_prefix }}/lib/x86_64-linux-gnu" >> $GITHUB_ENV
- name: Configure
run: |
autoreconf -i .
./configure ${{ matrix.configure_args }}
./configure \
${INSTALL_PREFIX:+--prefix="$INSTALL_PREFIX"} \
${INSTALL_LIBDIR:+--libdir="$INSTALL_LIBDIR"} \
${{ matrix.configure_args }}
- name: Build and test
run: make ${{ matrix.make_args }}
- name: Consume with CMake
if: ${{ matrix.install_prefix }}
run: |
cmake \
-DCMAKE_PREFIX_PATH="$INSTALL_PREFIX" \
-B examples_build \
-S examples
cmake --build examples_build -j
ctest --test-dir examples_build --output-on-failure

cmake:
strategy:
Expand Down
Loading