Skip to content

Commit 01d5e50

Browse files
authored
Merge pull request #80 from njoy/feature/signature
Feature/signature
2 parents 3f453d9 + 5f25457 commit 01d5e50

File tree

144 files changed

+1337168
-1237422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+1337168
-1237422
lines changed

.travis.yml

+27-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
sudo: required
2-
dist: trusty
32
git:
43
submodules: false
54
addons:
@@ -8,29 +7,33 @@ addons:
87
- sourceline: deb http://apt.llvm.org/precise/ llvm-toolchain-precise-3.8 main
98
key_url: http://apt.llvm.org/llvm-snapshot.gpg.key
109
- ubuntu-toolchain-r-test
11-
- george-edison55-precise-backports
1210
packages:
1311
- gcc-6
1412
- g++-6
1513
- gfortran-6
1614
- clang-3.8
1715
- llvm-dev
1816
- libc++-dev
19-
- cmake
20-
- cmake-data
17+
before_install:
18+
- if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then
19+
brew update > /dev/null;
20+
brew install gcc || true;
21+
brew link --overwrite gcc;
22+
brew upgrade python3;
23+
fi
2124
language: cpp
2225
compiler:
23-
- gcc
24-
- clang
26+
- gcc
27+
- clang
2528
os:
26-
- linux
27-
- osx
28-
osx_image: xcode8
29-
before_install:
30-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
31-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gcc; fi
29+
- linux
30+
- osx
31+
32+
osx_image: xcode9
33+
3234
script: "./.travis/build.sh"
3335
after_success: "./.travis/signature.sh"
36+
3437
env:
3538
matrix:
3639
- build_type=debug static_libraries=FALSE
@@ -39,14 +42,23 @@ env:
3942
- build_type=release static_libraries=TRUE
4043
global:
4144
secure: plUDJs3n7DrcEKGTQLVDQGWvOkPNLzR5vES9wxg6LkvwiMsIwYtEcwbKgjn3SRqQL9+iGVImRRR8nuOYLRVX+XQU1863QXmg74zOtjXfdux9/ArHyiJAsiQRgngCK+6s9mUpP9KpeSIso1yaFOMFC6VPbxGBDL11I1SbTbbgL46dcLdgDCf1NcJS88e049nZdW9c7qU5ZnnzY0wtY0w3DeG6Kv+ryybYOBUZcWf/Ax9vzG7Zr+iQa8SldwW6wN/FFk/Xu2akpkLDiJpBIBwoZkhtoFRkJyFFhHXzf+ZBsYFHf4ZZA2ckLkDF/A+f+CgTYfxJpKykfC7NRGgqiykOeJ4qGf0s/tKGCID6X1JQzDchmEQ7N7GitdUcepSy9F+m79LESpot2CyfQA2XW8VF8IcW9PnttEQ44m9QsZyesUID6FHTPv25a2SUclYPfaUR9ctlJJ6YWWSl+i2qQVBt/TKCVLhxAmc9norHe7d+OqFi/Ksmxz3AGLzqxS52W6U5HMDhz/Ha5N6yUhifNf7Nm2ALMQrmD1Ixh3WBShPBiXXUCe19CjcMUafQ30SFIdt7W6UFv9v0yTLpK7m0b9MyO/sH2bpKzLtLSwoGF4xeai75FyuX/sy48Kshs9+p2u7wL7mD/KPjwI8YKm42u0y3x3N2Ma3k5xZOKGLR9tBlX34=
45+
4246
matrix:
4347
include:
4448
- os: linux
4549
compiler: gcc
46-
env: build_type=coverage static_libraries=FALSE
50+
env:
51+
build_type=coverage
52+
static_libraries=FALSE
4753
- os: linux
4854
compiler: clang
49-
env: build_type=debug static_libraries=FALSE appended_flags="-fsanitize=address;-fno-omit-frame-pointer;"
55+
env:
56+
build_type=debug
57+
static_libraries=FALSE
58+
appended_flags="-fsanitize=address;-fno-omit-frame-pointer;"
5059
- os: linux
5160
compiler: clang
52-
env: build_type=debug static_libraries=FALSE appended_flags="-fsanitize=undefined;-fno-omit-frame-pointer;"
61+
env:
62+
build_type=debug
63+
static_libraries=FALSE
64+
appended_flags="-fsanitize=undefined;-fsanitize=integer;-fno-omit-frame-pointer;"

.travis/build.sh

+7-49
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
#!/bin/bash
22
set -x
33

4-
function repeat {
5-
while true
6-
do
7-
sleep $1
8-
${@:2}
9-
done
10-
}
11-
124
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
135
sudo update-alternatives \
146
--install /usr/bin/gcc gcc /usr/bin/gcc-6 90 \
@@ -31,7 +23,6 @@ else
3123
export NPROC=$(sysctl -n hw.physicalcpu)
3224
fi
3325

34-
3526
if [ "$build_type" = "coverage" ]; then
3627
export build_type=DEBUG
3728
export coverage=true
@@ -45,58 +36,25 @@ cd build
4536

4637
cmake -D CMAKE_BUILD_TYPE=$build_type \
4738
-D static_libraries=$static_libraries \
48-
-D NJOY21_appended_flags="$appended_flags" \
49-
$CUSTOM .. &> configuration.txt
50-
export CONFIGURATION_FAILURE=$?
51-
52-
if [ $CONFIGURATION_FAILURE -ne 0 ];
53-
then
54-
echo "failed while configuring"
55-
cat configuration.txt
56-
exit 1
57-
fi
58-
rm configuration.txt
59-
60-
repeat 300 echo "Still building..."&
61-
export EKG=$!
62-
63-
make VERBOSE=1 -j$NPROC &> compilation.txt
39+
-D njoy21_appended_flags="$appended_flags" \
40+
$CUSTOM ..
41+
make VERBOSE=1 -j$NPROC
6442
export COMPILATION_FAILURE=$?
6543

6644
if [ $COMPILATION_FAILURE -ne 0 ];
6745
then
68-
echo "failed while compiling"
69-
cat compilation.txt
7046
exit 1
7147
fi
72-
rm compilation.txt
7348

74-
kill $EKG
75-
76-
ctest --output-on-failure -j$NPROC &> testing.txt
49+
ctest --output-on-failure -j$NPROC
7750
export TEST_FAILURE=$?
7851
if [ $TEST_FAILURE -ne 0 ];
7952
then
80-
echo "failed while testing"
81-
cat testing.txt
8253
exit 1
8354
fi
84-
rm testing.txt
8555

8656
if $coverage; then
87-
wget http://downloads.sourceforge.net/ltp/lcov-1.13.tar.gz
88-
tar xvfz lcov-1.11.tar.gz;
89-
make -C lcov-1.13
90-
export PATH=$(pwd)/lcov-1.11/bin/:$PATH
91-
lcov --capture \
92-
--directory . \
93-
--base-directory ../src/njoy21 \
94-
--output-file coverage.info
95-
lcov --extract coverage.info "*njoy21*" \
96-
--output-file coverage.info
97-
lcov --remove coverage.info "*test*" \
98-
--output-file coverage.info
99-
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
57+
pip install --user cpp-coveralls
58+
echo "loading coverage information"
59+
coveralls --exclude-pattern "/usr/include/.*|.*/CMakeFiles/.*|.*subprojects.*|.*dependencies.*|.*test\.cpp" --root ".." --build-root "." --gcov-options '\-lp'
10060
fi
101-
102-
exit 0

0 commit comments

Comments
 (0)