Commit f0c9073c authored by Thomas Braun's avatar Thomas Braun
Browse files

.gitlab-ci.yml: Check that we have installed all header files

We compare the present files in src/include with the installed ones. We do
treat the ones which need cmake processing specially (.h.in is considered
the same as .h) and ignore tango/idl/tango.h because that is not present
in src/include.

Windows-only headers are also ignored.
parent 9e434913
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -629,6 +629,7 @@ cmake-config:
    - ci/install.sh
    - cmake -S tests/cmake_config -B /tmp/cmake_config_test -DCMAKE_PREFIX_PATH="../../tango_install;tango_install"
    - cmake --build /tmp/cmake_config_test
    - ci/check-installed-headers.sh ${CMAKE_INSTALL_PREFIX}

.macos-script-template:
  needs:
+28 −0
Original line number Diff line number Diff line
#!/usr/bin/env bash

set -e

if [[ $# -ne 1 ]]
then
  echo "Expected the tango installation folder as argument"
  exit 1
fi

tango_inst_folder=$1

top_level=$(git rev-parse --show-toplevel)

cd $top_level

# Gather all to-be-installed include files (ignoring windows specific ones)
git ls-files --full-name                    \
             'src/include/**/*.h'           \
             'src/include/**/*.h.in'        \
             ':^src/include/tango/internal' \
             ':^src/include/tango/windows'  \
| sed -e 's;src/include/;;' -e 's;\.in;;' | sort > files_repo.txt

# and all installed files, minus the generated idl file
find $tango_inst_folder -iname '*.h' | grep -v "tango/idl/tango.h" | sed -e "s;$tango_inst_folder/include/tango;tango;" | sort > files_installed.txt

git diff --no-index files_repo.txt files_installed.txt