Skip to content

Commit cf8e133

Browse files
committed
Build and run pkg-config examples in generic CI on Linux
Adds a step after the existing example tests that discovers the installed f3d.pc/f3d_c_api.pc and VTK's lib directory, then builds and runs both pkg-config examples with the sdk component's .pc files, mirroring what a real downstream user would do.
1 parent 8943380 commit cf8e133

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/actions/generic-ci/action.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,21 @@ runs:
378378
working-directory: ${{github.workspace}}
379379
run: ctest --test-dir build_examples --no-tests=error -C Release -VV
380380

381+
# These use pkg-config directly instead of find_package(f3d), so they are built
382+
# separately from the other examples with a plain Makefile instead of CMake.
383+
- name: Build and run pkg-config examples
384+
if: runner.os == 'Linux' && inputs.static_label == 'no-static'
385+
shell: bash
386+
working-directory: ${{github.workspace}}
387+
run: |
388+
F3D_PKGCONFIG_DIR=$(dirname "$(find $(pwd)/install -name 'f3d.pc')")
389+
VTK_LIB_DIR=$(dirname "$(find $(pwd)/dependencies/install -name 'libvtkCommonCore.so*' | head -1)")
390+
export PKG_CONFIG_PATH=$F3D_PKGCONFIG_DIR
391+
for lang in c cpp; do
392+
make -C source/examples/libf3d/$lang/pkgconfig LDFLAGS="-Wl,-rpath-link,$VTK_LIB_DIR"
393+
LD_LIBRARY_PATH=$VTK_LIB_DIR source/examples/libf3d/$lang/pkgconfig/check-engine-pkgconfig
394+
done
395+
381396
- name: Install optional component f3d plugins
382397
shell: bash
383398
working-directory: ${{github.workspace}}/build

0 commit comments

Comments
 (0)