Skip to content

Commit

Permalink
Fix MC
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Aug 28, 2019
2 parents 2e73d19 + 8c41d7e commit 25ace09
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 49 deletions.
34 changes: 10 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,29 @@
language: cpp
dist: bionic
compiler: gcc
dist: trusty

# Boost
addons:
apt:
packages: libboost-all-dev

before_install:
# C++14
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
# Codecov
- sudo pip install codecov
# OCLint
- ./install_oclint

install:
# C++14
- sudo apt-get install -qq g++-5
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90
- sudo apt update -qq
# Boost
- sudo apt install -qq libboost-all-dev
# Codecov
- sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-5 90
- sudo pip install codecov
# valgrind, for helgrind and memcheck
- sudo apt-get install -qq valgrind
# SLOCcount
- sudo apt-get install sloccount

- sudo apt-get install -qq sloccount
# OCLint
- ./install_oclint

script:
- ./download_other_githubs
# Console
- qmake VigenereCipherConsole.pro
- make debug
- make debug --silent
- ./VigenereCipherConsole --key "lemon" --text "helloworld"
# Build and run the tests
- qmake VigenereCipherDesktop.pro
- make debug
- make debug --silent
# helgrind
- valgrind --tool=helgrind --log-file=helgrind.log -v ./VigenereCipherConsole --key "lemon" --text "helloworld"
- cat helgrind.log
Expand All @@ -53,7 +40,6 @@ script:
# SLOCcount
- cd ..; sloccount --overhead 1 --personcost 22614 $my_github; cd $my_github


after_success:
# Codecov
- bash <(curl -s https://codecov.io/bash)
9 changes: 1 addition & 8 deletions VigenereCipherConsole.pro
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,8 @@ include(../RibiClasses/CppLoopReader/CppLoopReader.pri)
include(VigenereCipher.pri)
include(VigenereCipherConsole.pri)

# C++14
CONFIG += c++14
QMAKE_CXXFLAGS += -std=c++14

# Fix error: unrecognized option '--push-state--no-as-needed'
QMAKE_LFLAGS += -fuse-ld=gold

# High warnings levels
QMAKE_CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -Weffc++ -Werror
QMAKE_CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -Werror

# Allow debug and release mode
CONFIG += debug_and_release
Expand Down
18 changes: 2 additions & 16 deletions VigenereCipherDesktop.pro
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,8 @@ include(VigenereCipher.pri)
include(../RibiClasses/CppLoopReader/CppLoopReader.pri)
include(../VigenereCipher/VigenereCipherDesktop.pri)



# C++14
CONFIG += c++14
QMAKE_CXXFLAGS += -std=c++14

# Fix error: unrecognized option '--push-state--no-as-needed'
QMAKE_LFLAGS += -fuse-ld=gold

# Develop on GNU/Linux
unix:!macx {
# High warning level, warnings are errors
# Qt goes bad with -Weffc++
QMAKE_CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic
QMAKE_CXXFLAGS += -Werror
}
# High warnings levels
QMAKE_CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -Werror

# Allow debug and release mode
CONFIG += debug_and_release
Expand Down
2 changes: 1 addition & 1 deletion get_code_cov
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

for filename in `find . | egrep "^.*\.cpp$" | egrep -v "^ribi_main.cpp$" | egrep -v "^.*_test.cpp$"`;
do
gcov-5 -n -o . $filename
gcov -n -o . $filename
done

0 comments on commit 25ace09

Please sign in to comment.