-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
128 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.* | ||
*~ | ||
!/.gitignore | ||
!/.travis.yml | ||
*.exe | ||
*.tar.gz | ||
*.zip | ||
*.obj | ||
*.lib | ||
*.o | ||
*.pc | ||
*.dSYM | ||
CMakeCache.txt | ||
CMakeFiles | ||
CMakeScripts | ||
Makefile | ||
cmake_install.cmake | ||
install_manifest.txt | ||
CTestTestfile.cmake | ||
/primesieve* | ||
/libprimesieve* | ||
doc/Doxyfile | ||
doc/html | ||
doc/latex | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Test configuration for Travis CI. See <https://travis-ci.org/>. | ||
language: cpp | ||
|
||
branches: | ||
except: | ||
- gh-pages | ||
|
||
compiler: | ||
- gcc | ||
- clang | ||
|
||
os: | ||
- linux | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- gcc-4.9 | ||
- g++-4.9 | ||
|
||
install: | ||
- sudo apt-get install -y ninja-build cppcheck doxygen help2man texlive texlive-latex-extra graphviz libqt4-dev qt4-qmake valgrind | ||
- wget --no-check-certificate http://cmake.org/files/v3.1/cmake-3.1.3-Linux-x86_64.tar.gz | ||
- tar -xzf cmake-3.1.3-Linux-x86_64.tar.gz | ||
- export CXXFLAGS="-Wall -Wextra -Werror -Wno-long-long -pedantic -O2" | ||
- export PATH=$PWD/cmake-3.1.3-Linux-x86_64/bin:$PATH | ||
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9"; fi | ||
- if [ "$CC" = "gcc" ]; then export CC="gcc-4.9"; fi | ||
|
||
script: | ||
# 1) Build using GNU make | ||
- mkdir build | ||
- cd build | ||
- cmake -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON -DBUILD_DOC=ON -DCMAKE_INSTALL_PREFIX=$(pwd) .. | ||
- make -j4 | ||
- make doc >/dev/null | ||
- make install | ||
- cd .. | ||
- rm -rf build | ||
# 2) Build primesieve GUI app | ||
- cd src/gui | ||
- qmake QMAKE_CXX=$CXX QMAKE_CC=$CC | ||
- make -j4 | ||
- cd ../.. | ||
# 3) Build using ninja | ||
- mkdir build | ||
- cd build | ||
- cmake -GNinja -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON -DBUILD_DOC=ON .. | ||
- ninja | ||
- ninja doc >/dev/null | ||
# 4) Run integration tests | ||
- ninja test | ||
- test/cpu_info | ||
- test/atomic | ||
- cd .. | ||
# 5) Test using valgrind | ||
- $CXX -Iinclude -O2 -std=c++11 -g examples/cpp/nth_prime.cpp -o nth_prime build/libprimesieve.a -lpthread | ||
- valgrind --error-exitcode=1 ./nth_prime 500000000 | ||
# 6) Test using cppcheck | ||
- rm -rf build | ||
- cppcheck . -q --error-exitcode=1 -icmake-3.1.3-Linux-x86_64 -iexamples/cpp/prev_prime.cpp -iexamples/cpp/primesieve_iterator.cpp -itest/next_prime1.cpp -itest/prev_prime1.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters