Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
f22f04f8
Commit
f22f04f8
authored
May 24, 2019
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
separate cmake-compilation into different travis task
parent
7d894e55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
22 deletions
+12
-22
.travis.yml
.travis.yml
+1
-1
build_in_travis_ci.sh
build_in_travis_ci.sh
+11
-21
No files found.
.travis.yml
View file @
f22f04f8
...
@@ -9,6 +9,7 @@ compiler:
...
@@ -9,6 +9,7 @@ compiler:
env
:
env
:
-
PURPOSE=compile
-
PURPOSE=compile
-
PURPOSE=unittest
-
PURPOSE=unittest
-
PURPOSE=compile-with-cmake
-
PURPOSE=compile-with-bazel
-
PURPOSE=compile-with-bazel
-
PURPOSE=compile USE_MESALINK=yes
-
PURPOSE=compile USE_MESALINK=yes
-
PURPOSE=unittest USE_MESALINK=yes
-
PURPOSE=unittest USE_MESALINK=yes
...
@@ -28,5 +29,4 @@ install:
...
@@ -28,5 +29,4 @@ install:
-
if [[ "$USE_MESALINK" == "yes" ]]; then curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && wget https://github.com/mesalock-linux/mesalink/archive/v0.8.0.tar.gz && tar -xf v0.8.0.tar.gz && cd mesalink-0.8.0 && ./autogen.sh --prefix=/usr/ && make && sudo make install && cd - ; fi
-
if [[ "$USE_MESALINK" == "yes" ]]; then curl https://sh.rustup.rs -sSf | sh -s -- -y && source $HOME/.cargo/env && wget https://github.com/mesalock-linux/mesalink/archive/v0.8.0.tar.gz && tar -xf v0.8.0.tar.gz && cd mesalink-0.8.0 && ./autogen.sh --prefix=/usr/ && make && sudo make install && cd - ; fi
script
:
script
:
-
if [[ "$PURPOSE" == "compile-with-bazel" ]]; then bazel build -j 12 -c opt --copt -DHAVE_ZLIB=1 //... ; fi
-
sh build_in_travis_ci.sh
-
sh build_in_travis_ci.sh
build_in_travis_ci.sh
View file @
f22f04f8
...
@@ -21,39 +21,29 @@ runcmd(){
...
@@ -21,39 +21,29 @@ runcmd(){
echo
"build combination: PURPOSE=
$PURPOSE
CXX=
$CXX
CC=
$CC
"
echo
"build combination: PURPOSE=
$PURPOSE
CXX=
$CXX
CC=
$CC
"
init_make_config
()
{
EXTRA_BUILD_OPTS
=
""
EXTRA_BUILD_OPTS
=
""
if
[
"
$USE_MESALINK
"
=
"yes"
]
;
then
if
[
"
$USE_MESALINK
"
=
"yes"
]
;
then
EXTRA_BUILD_OPTS
=
"
$EXTRA_BUILD_OPTS
--with-mesalink"
EXTRA_BUILD_OPTS
=
"
$EXTRA_BUILD_OPTS
--with-mesalink"
fi
fi
# The default env in travis-ci is Ubuntu.
# The default env in travis-ci is Ubuntu.
if
!
sh config_brpc.sh
--headers
=
/usr/include
--libs
=
/usr/lib
--nodebugsymbols
--cxx
=
$CXX
--cc
=
$CC
$EXTRA_BUILD_OPTS
;
then
if
!
sh config_brpc.sh
--headers
=
/usr/include
--libs
=
/usr/lib
--nodebugsymbols
--cxx
=
$CXX
--cc
=
$CC
$EXTRA_BUILD_OPTS
;
then
echo
"Fail to configure brpc"
echo
"Fail to configure brpc"
exit
1
exit
1
fi
fi
if
[
"
$PURPOSE
"
=
"compile"
]
;
then
}
make
-j4
&&
sh tools/make_all_examples
elif
[
"
$PURPOSE
"
=
"unittest"
]
;
then
# pass the unittest from default Makefile to accelerate build process
:
else
echo
"Unknown purpose=
\"
$PURPOSE
\"
"
fi
echo
"start building by cmake"
rm
-rf
bld
&&
mkdir
bld
&&
cd
bld
if
[
"
$PURPOSE
"
=
"compile"
]
;
then
if
[
"
$PURPOSE
"
=
"compile"
]
;
then
if
!
cmake ..
;
then
init_make_config
echo
"Fail to generate Makefile by cmake"
make
-j4
&&
sh tools/make_all_examples
exit
1
fi
make
-j4
elif
[
"
$PURPOSE
"
=
"unittest"
]
;
then
elif
[
"
$PURPOSE
"
=
"unittest"
]
;
then
if
!
cmake
-DBUILD_UNIT_TESTS
=
ON ..
;
then
init_make_config
echo
"Fail to generate Makefile by cmake"
cd test
exit
1
make
-j4
&&
sh ./run_tests.sh
fi
elif
[
"
$PURPOSE
"
=
"compile-with-bazel"
]
;
then
make
-j4
&&
cd test
&&
sh ./run_tests.sh
&&
cd
../
bazel build
-j
12
-c
opt
--copt
-DHAVE_ZLIB
=
1 //...
elif
[
"
$PURPOSE
"
=
"compile-with-cmake"
]
;
then
rm
-rf
bld
&&
mkdir
bld
&&
cd
bld
&&
cmake ..
&&
make
-j4
else
else
echo
"Unknown purpose=
\"
$PURPOSE
\"
"
echo
"Unknown purpose=
\"
$PURPOSE
\"
"
fi
fi
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