Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to revive Travis. #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Don't send some content to the Docker host when building
travis
.git
.travis.yml

*.gcno
*.gcda
*.gcov
*.so
*.o
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/log/
/results/
/tmp_check/
*.bc
*.so
*.o
jsquery_gram.c
Expand Down
58 changes: 29 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
os:
- linux
os: linux

sudo: required
dist: trusty
dist: jammy

language: c

compiler:
- clang
- gcc

before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -y install -qq wget ca-certificates; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source ./travis/dep-ubuntu-postgres.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source ./travis/dep-ubuntu-llvm.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
services:
- docker

env:
global:
- LLVM_VER=4.0
matrix:
- PG_VER=11 CHECK_TYPE=normal
- PG_VER=11 CHECK_TYPE=static
- PG_VER=10 CHECK_TYPE=normal
- PG_VER=10 CHECK_TYPE=static
- PG_VER=10.5 CHECK_TYPE=valgrind
- PG_VER=9.6 CHECK_TYPE=normal
- PG_VER=9.6 CHECK_TYPE=static
- PG_VER=9.5 CHECK_TYPE=normal
- PG_VER=9.5 CHECK_TYPE=static
- PG_VER=9.4 CHECK_TYPE=normal
- PG_VER=9.4 CHECK_TYPE=static

script: bash ./travis/pg-travis-test.sh
- PG_VER=17
- PG_VER=16
- PG_VER=15
- PG_VER=14
- PG_VER=13
- PG_VER=12
- PG_VER=11
- PG_VER=10
#- PG_VER=9.6
#- PG_VER=9.5
#- PG_VER=9.4

jobs:
allow_failures:
- env: PG_VER=12
- env: PG_VER=11
- env: PG_VER=10

before_install: cp travis/* .

install:
- ./mk_dockerfile.sh
- docker-compose build

script: docker-compose run $(bash <(curl -s https://codecov.io/env)) tests
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
JsQuery is released under the PostgreSQL License, a liberal Open Source license, similar to the BSD or MIT licenses.

Copyright (c) 2014-2018, Postgres Professional
Copyright (c) 2014-2024, Postgres Professional
Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
Portions Copyright (c) 1994, The Regents of the University of California

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/postgrespro/jsquery.svg?branch=master)](https://travis-ci.org/postgrespro/jsquery)
[![Build Status](https://app.travis-ci.com/postgrespro/jsquery.svg?branch=master)](https://app.travis-ci.com/postgrespro/jsquery)
[![codecov](https://codecov.io/gh/postgrespro/jsquery/branch/master/graph/badge.svg)](https://codecov.io/gh/postgrespro/jsquery)
[![GitHub license](https://img.shields.io/badge/license-PostgreSQL-blue.svg)](https://raw.githubusercontent.com/postgrespro/jsquery/master/LICENSE)

Expand Down
2 changes: 1 addition & 1 deletion jsonb_gin_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Support GIN over jsonb with jsquery operation
*
* Copyright (c) 2014, PostgreSQL Global Development Group
* Portions Copyright (c) 2017-2021, Postgres Professional
* Portions Copyright (c) 2017-2024, Postgres Professional
* Author: Alexander Korotkov <aekorotkov@gmail.com>
*
* IDENTIFICATION
Expand Down
2 changes: 1 addition & 1 deletion jsquery.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Definitions of jsquery datatype
*
* Copyright (c) 2014, PostgreSQL Global Development Group
* Portions Copyright (c) 2017-2021, Postgres Professional
* Portions Copyright (c) 2017-2024, Postgres Professional
* Author: Teodor Sigaev <teodor@sigaev.ru>
*
* IDENTIFICATION
Expand Down
2 changes: 1 addition & 1 deletion jsquery_constr.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Functions and operations to manipulate jsquery
*
* Copyright (c) 2014, PostgreSQL Global Development Group
* Portions Copyright (c) 2017-2021, Postgres Professional
* Portions Copyright (c) 2017-2024, Postgres Professional
* Author: Teodor Sigaev <teodor@sigaev.ru>
*
* IDENTIFICATION
Expand Down
2 changes: 1 addition & 1 deletion jsquery_extract.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Functions and operations to support jsquery in indexes
*
* Copyright (c) 2014, PostgreSQL Global Development Group
* Portions Copyright (c) 2017-2021, Postgres Professional
* Portions Copyright (c) 2017-2024, Postgres Professional
* Author: Alexander Korotkov <aekorotkov@gmail.com>
*
* IDENTIFICATION
Expand Down
2 changes: 1 addition & 1 deletion jsquery_gram.y
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Grammar definitions for jsquery datatype
*
* Copyright (c) 2014, PostgreSQL Global Development Group
* Portions Copyright (c) 2017-2021, Postgres Professional
* Portions Copyright (c) 2017-2024, Postgres Professional
* Author: Teodor Sigaev <teodor@sigaev.ru>
*
* IDENTIFICATION
Expand Down
2 changes: 1 addition & 1 deletion jsquery_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* I/O functions for jsquery datatype
*
* Copyright (c) 2014, PostgreSQL Global Development Group
* Portions Copyright (c) 2016-2021, Postgres Professional
* Portions Copyright (c) 2016-2024, Postgres Professional
* Author: Teodor Sigaev <teodor@sigaev.ru>
*
* IDENTIFICATION
Expand Down
2 changes: 1 addition & 1 deletion jsquery_op.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Functions and operations over jsquery/jsonb datatypes
*
* Copyright (c) 2014, PostgreSQL Global Development Group
* Portions Copyright (c) 2017-2021, Postgres Professional
* Portions Copyright (c) 2017-2024, Postgres Professional
* Author: Teodor Sigaev <teodor@sigaev.ru>
*
* IDENTIFICATION
Expand Down
2 changes: 1 addition & 1 deletion jsquery_scan.l
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Lexical parser for jsquery datatype
*
* Copyright (c) 2014, PostgreSQL Global Development Group
* Portions Copyright (c) 2017-2021, Postgres Professional
* Portions Copyright (c) 2017-2024, Postgres Professional
* Author: Teodor Sigaev <teodor@sigaev.ru>
*
* IDENTIFICATION
Expand Down
2 changes: 1 addition & 1 deletion jsquery_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Functions and operations to support jsquery
*
* Copyright (c) 2014, PostgreSQL Global Development Group
* Portions Copyright (c) 2017-2021, Postgres Professional
* Portions Copyright (c) 2017-2024, Postgres Professional
* Author: Teodor Sigaev <teodor@sigaev.ru>
*
* IDENTIFICATION
Expand Down
33 changes: 33 additions & 0 deletions travis/Dockerfile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM postgres:${PG_VERSION}-alpine

# Install dependencies
RUN apk add --no-cache \
linux-headers \
openssl curl \
perl perl-ipc-run perl-dev perl-app-cpanminus perl-dbi \
make musl-dev gcc bison flex coreutils \
zlib-dev libedit-dev \
pkgconf icu-dev clang clang15 clang-analyzer;

# Environment
ENV LANG=C.UTF-8 PGDATA=/pg/data

# Make directories
RUN mkdir -p ${PGDATA} && \
mkdir -p /pg/testdir

COPY run_tests.sh /run.sh
RUN chmod 755 /run.sh

COPY . /pg/testdir
WORKDIR /pg/testdir

# Grant privileges
RUN chown postgres:postgres ${PGDATA} && \
chown -R postgres:postgres /pg/testdir && \
chown postgres:postgres /usr/local/include/postgresql/server/ && \
chmod a+rwx /usr/local/lib/postgresql && \
chmod a+rwx /usr/local/share/postgresql/extension

USER postgres
ENTRYPOINT LEVEL=${LEVEL} /run.sh
4 changes: 0 additions & 4 deletions travis/dep-ubuntu-llvm.sh

This file was deleted.

4 changes: 0 additions & 4 deletions travis/dep-ubuntu-postgres.sh

This file was deleted.

3 changes: 3 additions & 0 deletions travis/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
services:
tests:
build: .
52 changes: 0 additions & 52 deletions travis/llvm-snapshot.gpg.key

This file was deleted.

16 changes: 16 additions & 0 deletions travis/mk_dockerfile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
if [ -z ${PG_VERSION+x} ]; then
echo PG_VERSION is not set!
exit 1
fi

if [ -z ${LEVEL+x} ]; then
LEVEL=standard
fi

echo PG_VERSION=${PG_VERSION}
echo LEVEL=${LEVEL}

sed \
-e 's/${PG_VERSION}/'${PG_VERSION}/g \
-e 's/${LEVEL}/'${LEVEL}/g \
Dockerfile.in > Dockerfile
Loading