Add files to build and test on Github Actions. #445
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci-linux | |
on: | |
push: | |
branches: | |
- "*" | |
jobs: | |
ci-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
pgopt: | |
- base | |
- disable-atomics-spinlocks | |
- cache-release | |
env: | |
PG_TEST_EXTRA: "ssl kerberos" | |
PGOPT: ${{ matrix.pgopt }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: apt | |
run: | | |
sudo apt-get --yes update | |
sudo apt-get --yes install gcc libreadline-dev flex bison make perl libipc-run-perl clang llvm-dev libperl-dev libpython2-dev tcl-dev libldap2-dev libicu-dev docbook docbook-xml docbook-xsl fop libxml2-utils xsltproc opensp krb5-admin-server krb5-kdc krb5-user slapd ldap-utils libssl-dev pkg-config locales-all gdb | |
- name: configure | |
run: | | |
export CPPFLAGS="-DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS $CPPFLAGS" | |
if [ "${PGOPT}" = "cache-release" ]; then | |
export CPPFLAGS="-DRELCACHE_FORCE_RELEASE -DCATCACHE_FORCE_RELEASE $CPPFLAGS" | |
fi | |
CONFOPT= | |
if [ "${PGOPT}" = "disable-atomics-spinlocks" ]; then | |
export CONFOPT="--disable-atomics --disable-spinlocks $CONFOPT" | |
fi | |
./configure --prefix=$HOME/install --enable-debug --enable-cassert --enable-tap-tests -with-tcl --with-python --with-perl --with-ldap --with-openssl --with-icu --with-llvm $CONFOPT | |
- name: make | |
run: | | |
echo "COPT=-Wall -Werror" > src/Makefile.custom | |
make -s -j 4 all contrib docs | |
- name: make install | |
run: | | |
make -s install | |
- name: pg_config | |
run: | | |
$HOME/install/bin/pg_config | |
- name: make check-world | |
run: | | |
make -s -j 4 check-world | |
- name: after failure | |
if: failure() | |
run: | | |
for f in $(find . -name regression.diffs) ; do echo "========= Contents of $f" ; head -1000 $f ; done | |
for f in $(find . -name install.log) ; do echo "========= Contents of $f" ; tail -100 $f ; done |