diff --git a/.github/workflows/example-project.yml b/.github/workflows/example-project.yml index bce1518..2f3e629 100644 --- a/.github/workflows/example-project.yml +++ b/.github/workflows/example-project.yml @@ -67,16 +67,25 @@ jobs: test "$(pkg-config --cflags example_project)" = "-I/usr/local/include/example-project-0.1" test "$(pkg-config --libs example_project)" = "-L/usr/local/lib -lexample-project" - - name: Test pkgconf + - name: Install pkgconf if: startsWith(matrix.os, 'ubuntu') uses: awalsh128/cache-apt-pkgs-action@latest with: packages: pkgconf + + - name: Test pkgconf + if: startsWith(matrix.os, 'ubuntu') run: | set -x + pkgconf --version + pkg-config --version ARCHDIR=`dpkg-architecture -qDEB_HOST_MULTIARCH` - test "$(pkgconf --cflags example_project)" = "-I/usr/local/include/example-project-0.1" - test "$(pkgconf --libs example_project)" = "-L/usr/local/lib/${ARCHDIR} -lexample-project" + # ubuntu seems to add trailing spaces for no specific reasons. + CFLAGS=$(pkgconf --cflags example_project) + LIBS=$(pkgconf --libs example_project) + + test "${CFLAGS%% }" = "-I/usr/local/include/example-project-0.1" + test "${LIBS%% }" = "-L/usr/local/lib/${ARCHDIR} -lexample-project" - name: Update dynamic linker cache if: startsWith(matrix.os, 'ubuntu')