From 5af7e1352b117caf30a1b7654f2a9b0da8895b53 Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Wed, 12 Sep 2018 17:30:57 +0000 Subject: [PATCH] [travis] cache pg11 debs - apt --allow-unauthenticated for hiccups with gpg - cache Postgres 11 debs on Travis. Closes https://github.com/postgis/postgis/pull/296 git-svn-id: http://svn.osgeo.org/postgis/trunk@16768 b70326c6-7e19-0410-871a-916f4a2858ee --- .travis.yml | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index d669488ab..218f3e14c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,51 +6,46 @@ env: - CFLAGS="-g -O0 --coverage -fprofile-arcs -ftest-coverage" LDFLAGS="--coverage -fprofile-arcs -ftest-coverage" CONFIGURE_FLAGS="--enable-debug" PGPORT="5433" addons: - postgresql: "11" apt: sources: - - sourceline: 'deb https://apt.postgresql.org/pub/repos/apt trusty-pgdg main 11' + - sourceline: 'deb http://apt.postgresql.org/pub/repos/apt trusty-pgdg 11' key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' packages: - eatmydata - - postgresql-11 - - postgresql-server-dev-11 - - postgresql-11-dbg - - libgcc1-dbg - - libc++-dev - - libc++abi-dev - - lib64stdc++6-4.8-dbg before_install: - eval "${MATRIX_EVAL}" - - echo "postgres soft core unlimited" | sudo tee -a /etc/security/limits.conf - - echo "postgres hard core unlimited" | sudo tee -a /etc/security/limits.conf - - /usr/lib/postgresql/11/bin/pg_config - - echo "pg_ctl_options = '-c'" | sudo tee /etc/postgresql/11/main/pg_ctl.conf - sudo sh -c "echo /usr/lib/libeatmydata/libeatmydata.so >> /etc/ld.so.preload" + - sudo /etc/init.d/postgresql stop + - curl -sSfL https://github.com/mapbox/logbt/archive/v2.0.3.tar.gz | sudo tar --gunzip --extract --strip-components=1 --exclude="*md" --exclude="test*" --directory=/usr/local - curl -sSfL https://raw.githubusercontent.com/mapbox/logbt/30c554dd37b6c96c23fc424f75910fc6d6696f00/bin/logbt | sudo tee /usr/local/bin/logbt > /dev/null - sudo logbt --setup - - sudo service postgresql status 11 - - echo "jit = off" | sudo tee -a /etc/postgresql/11/main/postgresql.conf - - sudo service postgresql stop 11 - - sudo chown -hRL --from=postgres travis:travis /etc /var /tmp - - sudo usermod -u 1000 postgres - - sudo adduser travis ssl-cert - - sudo service postgresql start 11 - - sudo service postgresql status 11 + - sudo add-apt-repository --yes ppa:ubuntugis/ppa - sudo add-apt-repository --yes ppa:ubuntugis/ubuntugis-unstable - sudo apt-get update -qq - mkdir -p /home/travis/deb && touch /home/travis/deb/__ && sudo cp -n /home/travis/deb/* /var/cache/apt/archives || true - - sudo apt-get install -y --allow-unauthenticated --no-install-recommends --no-install-suggests libsfcgal1 libsfcgal-dev libxml2-utils libcunit1-dev xsltproc docbook-xsl docbook-mathml dblatex libgeos-dev libjson0-dev libprotobuf-c0-dev libgdal-dev gdb libc6-dbg + - sudo apt-get install -y --allow-unauthenticated --no-install-recommends --no-install-suggests postgresql-11 postgresql-server-dev-11 lib64stdc++6-4.8-dbg libc++abi-dev libc++-dev postgresql-11-dbg libgcc1-dbg libsfcgal1 libsfcgal-dev libxml2-utils libcunit1-dev xsltproc docbook-xsl docbook-mathml dblatex libgeos-dev libjson0-dev libprotobuf-c0-dev libgdal-dev gdb libc6-dbg - sudo sh -c "echo deb http://archive.ubuntu.com/ubuntu/ artful main restricted universe multiverse >> /etc/apt/sources.list" - sudo apt-get update -qq - sudo apt-get install -y --allow-unauthenticated --no-install-recommends --no-install-suggests binutils libproj-dev libprotobuf-c-dev protobuf-c-compiler + - cp -n /var/cache/apt/archives/* /home/travis/deb || true - - ls -la /home/travis/deb/ + + - echo "postgres soft core unlimited" | sudo tee -a /etc/security/limits.conf + - echo "postgres hard core unlimited" | sudo tee -a /etc/security/limits.conf + - echo "pg_ctl_options = '-c'" | sudo tee /etc/postgresql/11/main/pg_ctl.conf + - echo "jit = off" | sudo tee -a /etc/postgresql/11/main/postgresql.conf + - sudo service postgresql stop 11 + - sudo chown -hRL --from=postgres travis:travis /etc /var /tmp + - sudo usermod -u 1000 postgres + - sudo adduser travis ssl-cert + - sudo service postgresql start 11 + - sudo service postgresql status 11 + - sudo -u postgres createuser --superuser travis + - sudo ldconfig - - ./autogen.sh after_failure: - sudo head -n1000 /var/log/postgresql/postgresql-11-main.log @@ -70,6 +65,7 @@ cache: - /home/travis/deb script: + - ./autogen.sh - ./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" $CONFIGURE_FLAGS || cat config.log - make -j - chmod 755 /home/travis -- 2.40.0