From 8c5e65cd2e5ccb67c06b627405b08e40dbc154d2 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Fri, 26 Jul 2024 23:00:25 +0900 Subject: [PATCH] Add files to build and test on Github Actions. --- .github/workflows/ci-linux.yml | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci-linux.yml diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml new file mode 100644 index 00000000000..5dcf6fdcc1d --- /dev/null +++ b/.github/workflows/ci-linux.yml @@ -0,0 +1,53 @@ +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