Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
a12e1630
Commit
a12e1630
authored
Aug 28, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4848 from yiisoft/fix-travis
try using the new Docker setup of travis-ci
parents
78b5c7db
c4dffa0f
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
103 additions
and
33 deletions
+103
-33
.gitignore
.gitignore
+2
-0
.travis.yml
.travis.yml
+13
-3
sphinx.conf
tests/unit/data/sphinx/sphinx.conf
+8
-8
cubrid-setup.sh
tests/unit/data/travis/cubrid-setup.sh
+60
-10
mongodb-setup.sh
tests/unit/data/travis/mongodb-setup.sh
+5
-4
sphinx-setup.sh
tests/unit/data/travis/sphinx-setup.sh
+15
-8
No files found.
.gitignore
View file @
a12e1630
...
@@ -14,6 +14,8 @@ Thumbs.db
...
@@ -14,6 +14,8 @@ Thumbs.db
# composer vendor dir
# composer vendor dir
/vendor
/vendor
# cubrid install dir
/cubrid
# composer itself is not needed
# composer itself is not needed
composer.phar
composer.phar
...
...
.travis.yml
View file @
a12e1630
...
@@ -7,6 +7,9 @@ php:
...
@@ -7,6 +7,9 @@ php:
-
hhvm
-
hhvm
-
hhvm-nightly
-
hhvm-nightly
env
:
-
CUBRID_VERSION=9.3.0/CUBRID-9.3.0.0206 CUBRID_PDO_VERSION=9.2.0.0001
# run build against hhvm but allow them to fail
# run build against hhvm but allow them to fail
# http://docs.travis-ci.com/user/build-configuration/#Rows-That-are-Allowed-To-Fail
# http://docs.travis-ci.com/user/build-configuration/#Rows-That-are-Allowed-To-Fail
matrix
:
matrix
:
...
@@ -21,6 +24,15 @@ services:
...
@@ -21,6 +24,15 @@ services:
-
elasticsearch
-
elasticsearch
-
mongodb
-
mongodb
# faster builds on new travis setup not using sudo
sudo
:
false
# cache vendor dirs
cache
:
directories
:
-
cubrid
-
vendor
# try running against postgres 9.3
# try running against postgres 9.3
addons
:
addons
:
postgresql
:
"
9.3"
postgresql
:
"
9.3"
...
@@ -35,9 +47,7 @@ install:
...
@@ -35,9 +47,7 @@ install:
-
tests/unit/data/travis/memcache-setup.sh
-
tests/unit/data/travis/memcache-setup.sh
-
tests/unit/data/travis/cubrid-setup.sh
-
tests/unit/data/travis/cubrid-setup.sh
# codeception
# codeception
-
composer global require "codeception/codeception=2.0.*"
-
composer global require "codeception/codeception=2.0.*" "codeception/specify=*" "codeception/verify=*"
-
composer global require "codeception/specify=*"
-
composer global require "codeception/verify=*"
# basic and advanced application:
# basic and advanced application:
-
tests/unit/data/travis/setup-apps.sh
-
tests/unit/data/travis/setup-apps.sh
...
...
tests/unit/data/sphinx/sphinx.conf
View file @
a12e1630
...
@@ -68,7 +68,7 @@ source yii2_test_item_delta_src : yii2_test_item_src
...
@@ -68,7 +68,7 @@ source yii2_test_item_delta_src : yii2_test_item_src
index
yii2_test_article_index
index
yii2_test_article_index
{
{
source
=
yii2_test_article_src
source
=
yii2_test_article_src
path
=
/
var
/
lib
/
sphinx
/
yii2_test_article
path
=
SPHINX_BASE_DIR
/
yii2_test_article
docinfo
=
extern
docinfo
=
extern
charset_type
=
sbcs
charset_type
=
sbcs
}
}
...
@@ -77,7 +77,7 @@ index yii2_test_article_index
...
@@ -77,7 +77,7 @@ index yii2_test_article_index
index
yii2_test_item_index
index
yii2_test_item_index
{
{
source
=
yii2_test_item_src
source
=
yii2_test_item_src
path
=
/
var
/
lib
/
sphinx
/
yii2_test_item
path
=
SPHINX_BASE_DIR
/
yii2_test_item
docinfo
=
extern
docinfo
=
extern
charset_type
=
sbcs
charset_type
=
sbcs
}
}
...
@@ -86,14 +86,14 @@ index yii2_test_item_index
...
@@ -86,14 +86,14 @@ index yii2_test_item_index
index
yii2_test_item_delta_index
:
yii2_test_item_index
index
yii2_test_item_delta_index
:
yii2_test_item_index
{
{
source
=
yii2_test_item_delta_src
source
=
yii2_test_item_delta_src
path
=
/
var
/
lib
/
sphinx
/
yii2_test_item_delta
path
=
SPHINX_BASE_DIR
/
yii2_test_item_delta
}
}
index
yii2_test_rt_index
index
yii2_test_rt_index
{
{
type
=
rt
type
=
rt
path
=
/
var
/
lib
/
sphinx
/
yii2_test_rt
path
=
SPHINX_BASE_DIR
/
yii2_test_rt
rt_field
=
title
rt_field
=
title
rt_field
=
content
rt_field
=
content
rt_attr_uint
=
type_id
rt_attr_uint
=
type_id
...
@@ -118,15 +118,15 @@ searchd
...
@@ -118,15 +118,15 @@ searchd
{
{
listen
=
127
.
0
.
0
.
1
:
9312
listen
=
127
.
0
.
0
.
1
:
9312
listen
=
9306
:
mysql41
listen
=
9306
:
mysql41
log
=
/
var
/
log
/
sphinx
/
searchd
.
log
log
=
SPHINX_BASE_DIR
/
searchd
.
log
query_log
=
/
var
/
log
/
sphinx
/
query
.
log
query_log
=
SPHINX_BASE_DIR
/
query
.
log
read_timeout
=
5
read_timeout
=
5
max_children
=
30
max_children
=
30
pid_file
=
/
var
/
run
/
sphinx
/
searchd
.
pid
pid_file
=
SPHINX_BASE_DIR
/
searchd
.
pid
max_matches
=
1000
max_matches
=
1000
seamless_rotate
=
1
seamless_rotate
=
1
preopen_indexes
=
1
preopen_indexes
=
1
unlink_old
=
1
unlink_old
=
1
workers
=
threads
# for RT to work
workers
=
threads
# for RT to work
binlog_path
=
/
var
/
lib
/
sphinx
binlog_path
=
SPHINX_BASE_DIR
}
}
tests/unit/data/travis/cubrid-setup.sh
View file @
a12e1630
...
@@ -7,24 +7,74 @@ if (php --version | grep -i HipHop > /dev/null); then
...
@@ -7,24 +7,74 @@ if (php --version | grep -i HipHop > /dev/null); then
exit
0
exit
0
fi
fi
CWD
=
$(
pwd
)
# cubrid dbms
# cubrid dbms
echo
'yes'
|
sudo
add-apt-repository ppa:cubrid/cubrid
mkdir
-p
cubrid/
$CUBRID_VERSION
sudo
apt-get update
cd
cubrid
sudo
apt-get
install
cubrid
if
(
test
-f
$CUBRID_VERSION
-linux
.x86_64.tar.gz
)
;
then
/etc/profile.d/cubrid.sh
echo
"CUBRID is already installed"
sudo
apt-get
install
cubrid-demodb
else
wget http://ftp.cubrid.org/CUBRID_Engine/
$CUBRID_VERSION
-linux
.x86_64.tar.gz
-O
$CUBRID_VERSION
-linux
.x86_64.tar.gz
fi
cd
$CUBRID_VERSION
tar
xzf ../../
$CUBRID_VERSION
-linux
.x86_64.tar.gz
cd
../..
# setting cubrid env
CUBRID
=
$CWD
/cubrid/
$CUBRID_VERSION
/CUBRID
CUBRID_DATABASES
=
$CUBRID
/databases
CUBRID_LANG
=
en_US
ld_lib_path
=
`
printenv
LD_LIBRARY_PATH
`
if
[
"
$ld_lib_path
"
=
""
]
then
LD_LIBRARY_PATH
=
$CUBRID
/lib
else
LD_LIBRARY_PATH
=
$CUBRID
/lib:
$LD_LIBRARY_PATH
fi
SHLIB_PATH
=
$LD_LIBRARY_PATH
LIBPATH
=
$LD_LIBRARY_PATH
PATH
=
$CUBRID
/bin:
$CUBRID
/cubridmanager:
$PATH
export
CUBRID
export
CUBRID_DATABASES
export
CUBRID_LANG
export
LD_LIBRARY_PATH
export
SHLIB_PATH
export
LIBPATH
export
PATH
# start cubrid
cubrid service start
# create and start the demo db
$CUBRID
/demo/make_cubrid_demo.sh
cubrid server start demodb
echo
""
echo
"Installed CUBRID
$CUBRID_VERSION
"
echo
""
# cubrid pdo
# cubrid pdo
install_pdo_cubrid
()
{
install_pdo_cubrid
()
{
wget
"http://pecl.php.net/get/PDO_CUBRID-9.2.0.0001.tgz"
&&
if
(
test
"! (-f PDO_CUBRID-
$CUBRID_PDO_VERSION
.tgz)"
)
;
then
tar
-zxf
"PDO_CUBRID-9.2.0.0001.tgz"
&&
wget
"http://pecl.php.net/get/PDO_CUBRID-
$CUBRID_PDO_VERSION
.tgz"
-O
PDO_CUBRID-
$CUBRID_PDO_VERSION
.tgz
sh
-c
"cd PDO_CUBRID-9.2.0.0001 && phpize && ./configure && make && sudo make install"
fi
tar
-zxf
"PDO_CUBRID-
$CUBRID_PDO_VERSION
.tgz"
sh
-c
"cd PDO_CUBRID-
$CUBRID_PDO_VERSION
&& phpize && ./configure --prefix=
$CWD
/cubrid/PDO_CUBRID-
$CUBRID_PDO_VERSION
&& make"
echo
"extension=pdo_cubrid.so"
>>
~/.phpenv/versions/
$(
phpenv version-name
)
/etc/php.ini
echo
"extension=
$CWD
/cubrid/PDO_CUBRID-
$CUBRID_PDO_VERSION
/modules/
pdo_cubrid.so"
>>
~/.phpenv/versions/
$(
phpenv version-name
)
/etc/php.ini
return
$?
return
$?
}
}
install_pdo_cubrid
>
~/pdo_cubrid.log
||
(
echo
"=== PDO CUBRID BUILD FAILED ==="
;
cat
~/pdo_cubrid.log
)
install_pdo_cubrid
>
~/pdo_cubrid.log
||
(
echo
"=== PDO CUBRID BUILD FAILED ==="
;
cat
~/pdo_cubrid.log
)
echo
"Installed CUBRID
`
dpkg
-s
cubrid |grep Version
`
"
echo
""
echo
"Installed CUBRID PDO
$CUBRID_PDO_VERSION
"
echo
""
cd
..
tests/unit/data/travis/mongodb-setup.sh
View file @
a12e1630
...
@@ -2,10 +2,11 @@
...
@@ -2,10 +2,11 @@
#
#
# install mongodb
# install mongodb
mongod
--version
echo
"extension = mongo.so"
>>
~/.phpenv/versions/
$(
phpenv version-name
)
/etc/php.ini
echo
"extension = mongo.so"
>>
~/.phpenv/versions/
$(
phpenv version-name
)
/etc/php.ini
sudo
sh
-c
'echo "setParameter = textSearchEnabled=true" >> /etc/mongodb.conf'
cat
/etc/mongodb.conf
mongod
--version
# enable text search
mongo
--eval
'db.adminCommand( { setParameter: true, textSearchEnabled : true})'
sudo
service mongodb restart
cat
/etc/mongodb.conf
tests/unit/data/travis/sphinx-setup.sh
View file @
a12e1630
...
@@ -2,19 +2,26 @@
...
@@ -2,19 +2,26 @@
SCRIPT
=
$(
readlink
-f
"
$0
"
)
SCRIPT
=
$(
readlink
-f
"
$0
"
)
CWD
=
$(
dirname
"
$SCRIPT
"
)
CWD
=
$(
dirname
"
$SCRIPT
"
)
# work around https://github.com/travis-ci/travis-ci/issues/2728
PATH
=
$PATH
:/usr/local/sphinx-2.1.9/bin
mkdir
-p
sphinx
sed
-i
s
\~
SPHINX_BASE_DIR~
$PWD
/sphinx~g
$CWD
/../sphinx/sphinx.conf
# log files
# log files
sudo mkdir
/var/log/sphinx
#
sudo mkdir /var/log/sphinx
sudo touch
/var/log/sphinx/searchd.log
#
sudo touch /var/log/sphinx/searchd.log
sudo touch
/var/log/sphinx/query.log
#
sudo touch /var/log/sphinx/query.log
sudo chmod
-R
777 /var/log/sphinx
# ugly (for travis)
#
sudo chmod -R 777 /var/log/sphinx # ugly (for travis)
# spl dir
# spl dir
sudo mkdir
/var/lib/sphinx
#
sudo mkdir /var/lib/sphinx
sudo chmod
777 /var/lib/sphinx
# ugly (for travis)
#
sudo chmod 777 /var/lib/sphinx # ugly (for travis)
# run dir pid
# run dir pid
sudo mkdir
/var/run/sphinx
#
sudo mkdir /var/run/sphinx
sudo chmod
777 /var/run/sphinx
# ugly (for travis)
#
sudo chmod 777 /var/run/sphinx # ugly (for travis)
# Setup source database
# Setup source database
mysql
-D
yiitest
-u
travis <
$CWD
/../sphinx/source.sql
mysql
-D
yiitest
-u
travis <
$CWD
/../sphinx/source.sql
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment