Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit 1ed2dba

Browse files
committed
Fixed .spec to use rpms instead of prebuildes
dependencies. Added build & deploy to travis.
1 parent 450e23d commit 1ed2dba

File tree

5 files changed

+145
-65
lines changed

5 files changed

+145
-65
lines changed

.travis.yml

Lines changed: 71 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,78 @@
11
language: c
22

3-
sudo: true
3+
sudo: required
44

5-
dist: trusty
5+
services:
6+
- docker
7+
8+
cache:
9+
directories:
10+
- $HOME/.cache
11+
12+
git:
13+
depth: 100500
614

715
env:
8-
- SHARD_VERSION=1.2 AVRO_SCHEMA=2.3.2
9-
- SHARD_VERSION=2.1 AVRO_SCHEMA=2.3.2
10-
11-
branches:
12-
only:
13-
- master
14-
15-
before_install:
16-
- sudo apt-get -qq update
17-
- curl http://download.tarantool.org/tarantool/1.9/gpgkey |
18-
sudo apt-key add -release=`lsb_release -c -s`
19-
20-
# install https download transport for APT
21-
- sudo apt-get -y install apt-transport-https
22-
23-
# append two lines to a list of source repositories
24-
- sudo rm -f /etc/apt/sources.list.d/*tarantool*.list
25-
- echo "deb http://download.tarantool.org/tarantool/1.9/ubuntu/ trusty main" |
26-
sudo tee /etc/apt/sources.list.d/tarantool_1_9.list
27-
- echo "deb-src http://download.tarantool.org/tarantool/1.9/ubuntu/ trusty main" |
28-
sudo tee -a /etc/apt/sources.list.d/tarantool_1_9.list
29-
30-
install:
31-
- sudo apt-get update
32-
- sudo apt-get -y install tarantool tarantool-dev
33-
- cd ..
34-
- git clone https://github.com/rtsisyk/msgpuck
35-
- cd msgpuck
36-
- cmake .
37-
- sudo make install
38-
- cd ..
39-
- tarantoolctl rocks install shard "${SHARD_VERSION}"
40-
- tarantoolctl rocks install avro-schema "${AVRO_SCHEMA}"
41-
- cd graphql
42-
- git submodule update --recursive --init
43-
- tarantoolctl rocks install lulpeg
44-
- tarantoolctl rocks install lrexlib-pcre
45-
- tarantoolctl rocks install http
46-
- cd ..
47-
# lua (with dev headers) is necessary for luacheck
48-
- sudo apt-get install lua5.1
49-
- sudo apt-get install liblua5.1-0-dev
50-
- wget "http://luarocks.github.io/luarocks/releases/luarocks-2.4.4.tar.gz"
51-
- tar xf luarocks-2.4.4.tar.gz
52-
- cd luarocks-2.4.4
53-
- ./configure
54-
- make build
55-
- sudo make install
56-
- cd ../graphql
57-
- sudo luarocks install luacheck
58-
- sudo pip install virtualenv
16+
global:
17+
- PRODUCT=tarantool-graphql
18+
matrix:
19+
- OS=el DIST=6
20+
- OS=el DIST=7
21+
- OS=fedora DIST=26
22+
- OS=fedora DIST=27
23+
- SHARD_VERSION=1.2 AVRO_SCHEMA=2.3.2
24+
- SHARD_VERSION=2.1 AVRO_SCHEMA=2.3.2
25+
- SHARD_VERSION=1.2 AVRO_SCHEMA=3.0.0
26+
- SHARD_VERSION=2.1 AVRO_SCHEMA=3.0.0
5927

6028
script:
61-
- make test
29+
# - git describe --long
30+
- |
31+
if [ -n "${OS}" ]; then
32+
git clone https://github.com/packpack/packpack.git packpack;
33+
VERSION=0.0.1 packpack/packpack
34+
else
35+
./test.sh;
36+
fi;
37+
before_deploy:
38+
- ls -l build/
39+
40+
deploy:
41+
# Deploy packages to PackageCloud
42+
- provider: packagecloud
43+
username: ${PACKAGECLOUD_USER}
44+
repository: "1_9"
45+
token: ${PACKAGECLOUD_TOKEN}
46+
dist: ${OS}/${DIST}
47+
package_glob: build/*.{rpm,deb}
48+
skip_cleanup: true
49+
on:
50+
branch: master
51+
condition: -n "${TARGET}"
52+
- provider: packagecloud
53+
username: ${PACKAGECLOUD_USER}
54+
repository: "1_10"
55+
token: ${PACKAGECLOUD_TOKEN}
56+
dist: ${OS}/${DIST}
57+
package_glob: build/*.{rpm,deb}
58+
skip_cleanup: true
59+
on:
60+
branch: master
61+
condition: -n "${TARGET}"
62+
- provider: packagecloud
63+
username: ${PACKAGECLOUD_USER}
64+
repository: "2_0"
65+
token: ${PACKAGECLOUD_TOKEN}
66+
dist: ${OS}/${DIST}
67+
package_glob: build/*.{rpm,deb}
68+
skip_cleanup: true
69+
on:
70+
branch: master
71+
condition: -n "${TARGET}"
72+
73+
notifications:
74+
email:
75+
recipients:
76+
77+
on_success: change
78+
on_failure: always

graphql/accessor_general.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
---
44
--- It provides basic logic for such space-like data storages and abstracted
55
--- away from details from where tuples are arrived into the application.
6+
package.cpath = package.cpath .. ";/usr/share/tarantool/pcre2/?.so"
67

78
local ffi = require('ffi')
89
local json = require('json')

graphql/core/parse.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
package.path = package.path .. ";/usr/share/tarantool/lulpeg/?.lua"
12
local lpeg = require 'lulpeg'
23
local P, R, S, V = lpeg.P, lpeg.R, lpeg.S, lpeg.V
34
local C, Ct, Cmt, Cg, Cc, Cf, Cmt = lpeg.C, lpeg.Ct, lpeg.Cmt, lpeg.Cg, lpeg.Cc, lpeg.Cf, lpeg.Cmt

rpm/tarantool-graphql.spec

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@ BuildArch: noarch
1010

1111
# Dependencies for `make test`
1212
BuildRequires: tarantool >= 1.9.0.0
13-
#BuildRequires: tarantool-avro-schema >= 2.2.2.4, tarantool-avro-schema < 3.0.0.0
14-
#BuildRequires: tarantool-shard >= 2.1.0
13+
BuildRequires: tarantool-avro-schema >= 2.2.2.4, tarantool-avro-schema < 3.0.0.0
14+
BuildRequires: tarantool-shard >= 2.1.0
1515
BuildRequires: python-virtualenv
16-
# Dependencies were installed in rpm/prebuild-el-7.sh:
17-
# * luacheck
18-
# * lulpeg
19-
# * lrexlib-pcre2
20-
# * avro-schema
21-
# * shard
22-
# * http
16+
BuildRequires: luacheck
17+
BuildRequires: lulpeg
18+
BuildRequires: lrexlib
19+
BuildRequires: python >= 2.7
20+
BuildRequires: cmake >= 2.8
21+
BuildRequires: make
22+
BuildRequires: gcc >= 4.5
23+
BuildRequires: gcc-c++ >= 4.5
2324

2425
# Dependencies for a user
2526
Requires: tarantool >= 1.9.0.0
26-
#Requires: tarantool-avro-schema >= 2.0.71, tarantool-avro-schema < 3.0.0.0
27-
#Requires: lulpeg
27+
Requires: tarantool-avro-schema >= 2.0.71, tarantool-avro-schema < 3.0.0.0
28+
Requires: lulpeg
2829

2930
%description
3031
Set of adapters for GraphQL query language to the Tarantool data model

test.sh

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/env bash
2+
3+
set -euxo pipefail # Strict shell
4+
5+
#sudo apt-get -qq update
6+
#curl http://download.tarantool.org/tarantool/1.9/gpgkey |
7+
#sudo apt-key add -release=`lsb_release -c -s`
8+
9+
# install https download transport for APT
10+
#sudo apt-get -y install apt-transport-https
11+
12+
#curl -s https://packagecloud.io/install/repositories/tarantool/1_7/script.deb.sh | sudo bash
13+
#sudo apt-get update > /dev/null
14+
#sudo apt-get -q -y install tarantool tarantool-dev
15+
16+
sudo apt-get -qq update
17+
curl http://download.tarantool.org/tarantool/1.9/gpgkey |
18+
sudo apt-key add -release=`lsb_release -c -s`
19+
20+
# install https download transport for APT
21+
sudo apt-get -y install apt-transport-https
22+
23+
# append two lines to a list of source repositories
24+
sudo rm -f /etc/apt/sources.list.d/*tarantool*.list
25+
echo "deb http://download.tarantool.org/tarantool/1.9/ubuntu/ trusty main" |
26+
sudo tee /etc/apt/sources.list.d/tarantool_1_9.list
27+
echo "deb-src http://download.tarantool.org/tarantool/1.9/ubuntu/ trusty main" |
28+
sudo tee -a /etc/apt/sources.list.d/tarantool_1_9.list
29+
30+
sudo apt-get update > /dev/null
31+
sudo apt-get -q -y install tarantool tarantool-dev
32+
33+
cd ..
34+
git clone https://github.com/rtsisyk/msgpuck
35+
cd msgpuck
36+
cmake .
37+
sudo make install
38+
cd ..
39+
cd graphql
40+
git submodule update --recursive --init
41+
# todo fix it with RPM packages
42+
tarantoolctl rocks install lulpeg
43+
tarantoolctl rocks install lrexlib-pcre
44+
tarantoolctl rocks install http
45+
tarantoolctl rocks install shard "${SHARD_VERSION}"
46+
tarantoolctl rocks install avro-schema "${AVRO_SCHEMA}"
47+
cd ..
48+
# lua (with dev headers) is necessary for luacheck
49+
sudo apt-get install lua5.1
50+
sudo apt-get install liblua5.1-0-dev
51+
wget "http://luarocks.github.io/luarocks/releases/luarocks-2.4.4.tar.gz"
52+
tar xf luarocks-2.4.4.tar.gz
53+
cd luarocks-2.4.4
54+
./configure
55+
make build
56+
sudo make install
57+
cd ../graphql
58+
sudo luarocks install luacheck
59+
sudo pip install virtualenv
60+
make test

0 commit comments

Comments
 (0)