Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mtxclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
mtxclient
Commits
4badb8b5
Commit
4badb8b5
authored
6 years ago
by
Konstantinos Sideris
Browse files
Options
Downloads
Patches
Plain Diff
Use docker image for managing deps
parent
e2d971d1
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.ci/install.sh
+0
-23
0 additions, 23 deletions
.ci/install.sh
.ci/script.sh
+21
-20
21 additions, 20 deletions
.ci/script.sh
.travis.yml
+41
-29
41 additions, 29 deletions
.travis.yml
tests/CMakeLists.txt
+0
-2
0 additions, 2 deletions
tests/CMakeLists.txt
with
62 additions
and
74 deletions
.ci/install.sh
+
0
−
23
View file @
4badb8b5
...
...
@@ -7,26 +7,3 @@ if [ $TRAVIS_OS_NAME == osx ]; then
brew upgrade boost cmake
brew
install
libsodium
fi
if
[
$TRAVIS_OS_NAME
==
linux
]
;
then
export
CXX
=
${
CXX_VERSION
}
export
CC
=
${
CC_VERSION
}
sudo
apt-get update
-qq
sudo
apt-get remove
-y
cmake
# Build & install libsodium for source.
mkdir
-p
libsodium
&&
pushd
libsodium
curl
-L
\
https://download.libsodium.org/libsodium/releases/libsodium-
${
LIBSODIUM_VERSION
}
.tar.gz
\
-o
libsodium-
${
LIBSODIUM_VERSION
}
.tar.gz
tar
xfz libsodium-
${
LIBSODIUM_VERSION
}
.tar.gz
pushd
libsodium-
${
LIBSODIUM_VERSION
}
/
./configure
&&
make
&&
make check
&&
sudo
make
install
popd
popd
wget https://cmake.org/files/v3.11/cmake-3.11.4-Linux-x86_64.sh
sudo
sh cmake-3.11.4-Linux-x86_64.sh
--skip-license
--prefix
=
/usr/local
export
PATH
=
"/usr/local/bin:
$PATH
"
fi
This diff is collapsed.
Click to expand it.
.ci/script.sh
+
21
−
20
View file @
4badb8b5
...
...
@@ -11,29 +11,30 @@ if [ $TRAVIS_OS_NAME == linux ]; then
sudo
update-alternatives
--set
gcc
"/usr/bin/
${
CC_VERSION
}
"
sudo
update-alternatives
--set
g++
"/usr/bin/
${
CXX_VERSION
}
"
fi
# Build dependencies.
cmake
-Hdeps
-B
.deps
-DCMAKE_BUILD_TYPE
=
Release
\
-DUSE_BUNDLED_BOOST
=
${
USE_BUNDLED_BOOST
}
\
-DUSE_BUNDLED_GTEST
=
${
TESTS
}
cmake
--build
.deps
# Build the library.
cmake
-H
.
-Bbuild
-DOPENSSL_ROOT_DIR
=
${
OPENSLL_ROOT_DIR
}
\
-DBUILD_LIB_TESTS
=
${
TESTS
}
\
-DBUILD_SHARED_LIBS
=
ON
\
-DCMAKE_INSTALL_PREFIX
=
.deps/usr
\
-DCOVERAGE
=
${
COVERAGE
}
||
true
cmake
--build
build
# Unit & Integration tests
if
[
$TESTS
==
ON
]
;
then
make synapse
# Build the library.
cmake
-H
.
-Bbuild
-DCMAKE_BUILD_TYPE
=
Debug
\
-DBUILD_LIB_TESTS
=
ON
\
-DBUILD_SHARED_LIBS
=
ON
\
-DCOVERAGE
=
${
COVERAGE
}
||
true
cmake
--build
build
make
test
fi
# Linting
if
[
$LINT
==
ON
]
;
then
if
[
$TRAVIS_OS_NAME
==
osx
]
;
then
# Build dependencies.
cmake
-Hdeps
-B
.deps
-DCMAKE_BUILD_TYPE
=
Release
\
-DUSE_BUNDLED_BOOST
=
OFF
\
-DUSE_BUNDLED_GTEST
=
OFF
cmake
--build
.deps
# Build the library.
cmake
-H
.
-Bbuild
-DOPENSSL_ROOT_DIR
=
/usr/local/opt/openssl
\
-DBUILD_LIB_TESTS
=
OFF
\
-DBUILD_SHARED_LIBS
=
ON
\
-DCMAKE_INSTALL_PREFIX
=
.deps/usr
||
true
cmake
--build
build
make lint
fi
This diff is collapsed.
Click to expand it.
.travis.yml
+
41
−
29
View file @
4badb8b5
...
...
@@ -10,47 +10,36 @@ services:
notifications
:
email
:
false
before_cache
:
# Save tagged docker images
-
>
mkdir -p $HOME/docker && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}'
| xargs -n 2 -t sh -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker/$1.tar.gz'
cache
:
directories
:
-
$HOME/docker
matrix
:
include
:
-
os
:
osx
osx_image
:
xcode9
compiler
:
clang
env
:
-
OPENSLL_ROOT_DIR=/usr/local/opt/openssl
-
TESTS=OFF
-
USE_BUNDLED_BOOST=OFF
-
os
:
linux
compiler
:
gcc
env
:
-
CXX_VERSION=g++-8
-
CC_VERSION=gcc-8
-
TESTS=ON
-
COVERAGE=ON
-
USE_BUNDLED_BOOST=ON
-
LIBSODIUM_VERSION=1.0.16
addons
:
apt
:
sources
:
-
"
ubuntu-toolchain-r-test"
packages
:
-
"
g++-8"
-
"
lcov"
-
os
:
linux
compiler
:
clang
env
:
-
CXX_VERSION=clang++-6.0
-
CC_VERSION=clang-6.0
-
TESTS=ON
-
USE_BUNDLED_BOOST=ON
-
LIBSODIUM_VERSION=1.0.16
addons
:
apt
:
sources
:
-
"
ubuntu-toolchain-r-test"
-
"
llvm-toolchain-trusty-6.0"
packages
:
-
"
clang++-6.0"
-
"
clang-6.0"
before_install
:
# Load cached docker images
-
if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi
install
:
-
./.ci/install.sh
...
...
@@ -59,10 +48,33 @@ script:
-
$CXX --version
-
cmake --version
-
./.ci/script.sh
# Start the synapse server to run the tests.
-
if [ $TRAVIS_OS_NAME == linux ]; then make synapse; fi
# Build the lib and run the test suite against synapse.
-
|
if [ $TRAVIS_OS_NAME == linux ]; then
docker run -v `pwd`:/build --net=host \
-e CXX_VERSION=${CXX_VERSION} \
-e CC_VERSION=${CC_VERSION} \
-e COVERAGE=${COVERAGE} \
-e TRAVIS_OS_NAME=${TRAVIS_OS_NAME} \
mujx/mtxclient-dev:0.1.0 \
/bin/bash -c "./.ci/script.sh"
fi
# Build the lib and run the linter.
-
|
if [ $TRAVIS_OS_NAME == osx ]; then
./.ci/script.sh
fi
after_success
:
# Generate coverage report and upload report to CodeCov.
-
if [ $COVERAGE == ON ]; then make -C build/tests matrix_client_coverage; fi
-
if [ $COVERAGE == ON ]; then ./.ci/coverage.sh; fi
-
if [ $COVERAGE == ON ]; then bash <(curl -s https://codecov.io/bash) -f "!*tests*" || echo "Codecov failed"; fi
-
|
if [ $COVERAGE == ON ]; then
docker run -v `pwd`:/build \
--net=host mujx/mtxclient-dev:0.1.0 \
/bin/bash -c "./.ci/coverage.sh" && \
bash <(curl -s https://codecov.io/bash) -f "!*tests*" || echo "Codecov failed"
fi
This diff is collapsed.
Click to expand it.
tests/CMakeLists.txt
+
0
−
2
View file @
4badb8b5
enable_testing
()
file
(
COPY fixtures DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
find_package
(
GTest REQUIRED
)
file
(
COPY fixtures DESTINATION
${
CMAKE_CURRENT_BINARY_DIR
}
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment