1 name: Linux UBSAN Build
25 - '.github/workflows/ubsan.yml'
47 - '.github/workflows/ubsan.yml'
53 runs-on: ${{ matrix.os }}
57 name: [linux-clang, linux-gcc]
62 cflags: '-fsanitize=undefined'
67 cflags: '-Wnonnull -fsanitize=undefined'
70 - name: Clone repository
71 uses: actions/checkout@v1
72 - name: Install packages
73 if: startsWith(matrix.os, 'ubuntu')
75 sudo apt-get update -qq
76 sudo apt-get install -y bison comerr-dev flex doxygen
77 sudo apt-get install -y libcap-ng-dev libdb-dev libedit-dev libjson-perl
78 sudo apt-get install -y libldap2-dev libncurses5-dev libperl4-corelibs-perl
79 sudo apt-get install -y libsqlite3-dev libkeyutils-dev pkg-config python
80 sudo apt-get install -y ss-dev texinfo unzip netbase keyutils ldap-utils
81 sudo apt-get install -y gdb apport curl libmicrohttpd-dev jq valgrind
82 # Temporary workaround for:
83 # https://github.com/actions/virtual-environments/issues/3185
84 sudo hostname localhost
87 CC: ${{ matrix.compiler }}
88 MAKEVARS: ${{ matrix.makevars }}
93 ../configure --srcdir=`dirname "$PWD"` --enable-maintainer-mode --enable-developer --enable-dynamic --disable-static --with-ldap $CONFIGURE_OPTS --prefix=$HOME/inst CFLAGS="${{ matrix.cflags }} -Wno-error=shadow -Wno-error=bad-function-cast -Wno-error=unused-function -Wno-error=unused-result -Wno-error=deprecated-declarations" LDFLAGS="${{ matrix.ldflags }}"
97 CC: ${{ matrix.compiler }}
98 MAKEVARS: ${{ matrix.makevars }}
105 CC: ${{ matrix.compiler }}
106 MAKEVARS: ${{ matrix.makevars }}
109 make DESTDIR=/tmp/h5l install
111 tar czf $HOME/heimdal-install-linux-${{ matrix.compiler }}.tgz .
112 - name: Core dump stacks
114 echo "thread apply all bt" > /tmp/x
115 find . -name core -print | while read core; do gdb -batch -x x `file "$core"|sed -e "s/^[^']*'//" -e "s/[ '].*$//"` "$core"; done
116 if [ "$(find . -name core -print | wc -l)" -gt 0 ]; then false; fi
119 find build -depth -name \*.trs | xargs grep -lw FAIL | sed -e 's/trs$/log/' | tar -czf $HOME/logs-linux-${{ matrix.compiler }}.tgz --verbatim-files-from --files-from -
120 find build -name \*.trs | xargs grep -lw FAIL | sed -e 's/trs$/log/' | xargs cat
121 - name: Failed Test logs
124 find build -name \*.trs | xargs grep -lw FAIL | sed -e 's/trs$/log/' | xargs cat
125 - name: All Test logs
128 find build -name \*.trs | sed -e 's/trs$/log/' | xargs cat
129 - name: Upload Logs Tarball
130 uses: actions/upload-artifact@v2
133 path: '~/logs-linux-${{ matrix.compiler }}.tgz'