-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build and test on Travis without Docker
Install postgresql packages from the PGDG apt repo.
- Loading branch information
Sergey Shinderuk
committed
Oct 20, 2023
1 parent
bf6bc4b
commit b8037cf
Showing
6 changed files
with
42 additions
and
136 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
.deps | ||
*.o | ||
*.so | ||
/results | ||
.log | ||
Dockerfile | ||
/.deps/ | ||
/log/ | ||
/results/ | ||
/tmp_check/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,20 @@ | ||
os: | ||
- linux | ||
|
||
sudo: required | ||
dist: jammy | ||
|
||
language: c | ||
|
||
services: | ||
- docker | ||
|
||
install: | ||
- sed -e 's/${CHECK_CODE}/'${CHECK_CODE}/g -e 's/${PG_VERSION}/'${PG_VERSION}/g Dockerfile.tmpl > Dockerfile | ||
- docker-compose build | ||
|
||
script: | ||
- docker-compose run tests | ||
|
||
env: | ||
- PG_VERSION=11 CHECK_CODE=clang | ||
- PG_VERSION=11 CHECK_CODE=cppcheck | ||
- PG_VERSION=11 CHECK_CODE=false | ||
- PG_VERSION=12 CHECK_CODE=clang | ||
- PG_VERSION=12 CHECK_CODE=false | ||
- PG_VERSION=13 CHECK_CODE=clang | ||
- PG_VERSION=13 CHECK_CODE=false | ||
- PG_VERSION=14 CHECK_CODE=clang | ||
- PG_VERSION=14 CHECK_CODE=false | ||
- PG_VERSION=15 CHECK_CODE=clang | ||
- PG_VERSION=15 CHECK_CODE=false | ||
- PG_VERSION=16 CHECK_CODE=clang | ||
- PG_VERSION=16 CHECK_CODE=false | ||
- PG_MAJOR=16 | ||
- PG_MAJOR=15 | ||
- PG_MAJOR=14 | ||
- PG_MAJOR=13 | ||
- PG_MAJOR=12 | ||
- PG_MAJOR=11 | ||
before_script: | ||
- curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | ||
- echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" | sudo tee -a /etc/apt/sources.list | ||
- sudo apt-get update | ||
- sudo systemctl stop postgresql | ||
- sudo apt-get install -y --no-install-recommends postgresql-${PG_MAJOR} postgresql-server-dev-${PG_MAJOR} | ||
- sudo systemctl stop postgresql | ||
script: ./run-tests.sh | ||
after_script: | ||
- cat regression.diffs | ||
- cat logfile |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
set -ev | ||
|
||
PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH | ||
export PGDATA=/var/lib/postgresql/$PG_MAJOR/test | ||
export COPT=-Werror | ||
export USE_PGXS=1 | ||
|
||
sudo chmod 1777 /var/lib/postgresql/$PG_MAJOR | ||
sudo chmod 1777 /var/run/postgresql | ||
|
||
make clean | ||
make | ||
|
||
sudo -E env PATH=$PATH make install | ||
|
||
initdb | ||
echo "shared_preload_libraries = pg_wait_sampling" >> $PGDATA/postgresql.conf | ||
|
||
pg_ctl -l logfile start | ||
make installcheck | ||
pg_ctl stop |
This file was deleted.
Oops, something went wrong.