Skip to content

Commit 518acbe

Browse files
committed
Merge branch 'master' into develop
2 parents 4b68811 + 2ef3c6f commit 518acbe

3 files changed

Lines changed: 213 additions & 14 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ before_deploy:
6161
deploy:
6262
provider: releases
6363
api_key:
64-
secure: QTsZ8jIN5/f15EW/L93u7Yn0fUlX1UaF6qCLfiWfo0jDiK0FGkIo4B+MeBYbZs+HphMxbhDv7v+A1dpcA8w9RlkMX47NsGT4Nu7bu5AzABsjnFPUKbUux4ktoYkPAxXujcvT1fTYrv2bgH0ualtPnvU9CDT3PRfUpZND+bM0UIMyo40ojOec2v3opYfGYvbksosAVKTg15cxzxGgGVrZb+DWfnILgrETieULL1Tvp8eZG9wY9Kja65JCzbUVBrcGIThz5iZqO8rAi6Opl7cgpP7W2qRotNRXQjQc1KsV+HH0w5eTCUwqUZOJKuucZrUjYiu762LYMYfLGxs4F2Wy2aXPqcTImVIG5W9tFN4xKsL46Ed7PZdCHWZJFCFx89znEosZnCFmSp445L88Q1/dbluk/oP+TxYi6z61QEstSB2T5r0Pv/rC2PGqoBlYyCGIZZdBzzXNSW2gaUEkhNgOU1Q/K6yFpjy+GUxvcGugroWsHBXvoSMswzC+IhYUvjSXkiFM5AkXbJrb8/mIc25QehUrvO5Fe/A67o2HuM6aHZDBbGyP8876k63o1H82JkW0fSfCrcWu302eqCu5YwrZJ3I20bepZEbj5Wh50Bz6n8c0ZsFQL1GUxAA+3KBtWp7wDHK9WYsKrdc2FFGtfZgQ7X5iiY01/i6ZCqiUO4vASWg=
64+
secure: g9xfZ+6+mBClH3HUSWT/2/pbPvJt2Ht5G4loa0gEYtaCd5mgY5Y/UMWH47/suF7T78JoMr+g4fEGNy2XoYLcgQ8e9dfwd+lixpYVycIoeJ85byvLH7TfAEpOXsllb703dF0aQ1xnrsrExhQXfr+4/gP5421RNVPIWe8K+oTYBfaOWTI0drEilbC4Heb8KhQ4fgHkptk6eOu7vN3fWZm1s9fNmK38iCWmsqffgFcbbTfS7dmFtOShc/YHdf2hYHSwHTeAodZ6Moqc2Yy4WihcB89O9exW7w82SrIPxTpwwFcsqKKX0tC8BLyOMjKde+wXvr5kh9Q5rnEpuH2gKl0yv8wXukCSwi7qg4WmD7QjtF1QmWdvzwZortvhPHAGFI2rjdIQv3HnuvOZQSYfLqlcqUGFy82b36WBshi03HjHMNd79LoEotX3T/3mb9avUr5DAVGr8+EsMBQqJf+LaD4ycoz2zeiBmxzxk0d65ZE+Zhrax/rPSncFj0j8Z7E5ro5X+FAKIkYYE1wKnCDiwZdrkVlVHV1+WG+CFE2A/0/yPnTUEDed1Nj1UmkXZT2MCZf/ZGrwBkaNucV4UjgGZTlBEw4j6ffHBFQ/GsAkY3otxq6UjWB1O9T6vw4lhiJw4uWP09m/+HonORJlGNBtsRnJ7ZWUlJhsdJ8WXaJ0yXPByJU=
6565
file:
6666
- FOODIE-$TRAVIS_TAG.tar.gz
6767
- ./scripts/install.sh

fobos

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -186,28 +186,43 @@ jobs = 10
186186

187187
# rules
188188
[rule-makedoc]
189-
help = Rule for building documentation from source files
189+
help = Build documentation from source files
190190
rule_1 = rm -rf doc/html/*
191-
rule_2 = ford doc/main_page.md
191+
rule_2 = ford doc/main_page.md --debug
192192
rule_3 = cp -r doc/html/publish/* doc/html/
193+
rule_4 = rm -rf doc/html/publish
194+
195+
[rule-deldoc]
196+
help = Delete documentation
197+
rule = rm -rf doc/html/*
198+
199+
[rule-delexe]
200+
help = Delete exes
201+
rule = rm -rf build/
202+
203+
[rule-clean]
204+
help = Clean the project tree
205+
rule_1 = FoBiS.py rule -ex deldoc
206+
rule_2 = FoBiS.py rule -ex delexe
207+
rule_3 = rm -f *.gcov
208+
209+
[rule-maketar]
210+
help = Make tar archive of the project
211+
rule = tar --xform="s%^%FOODIE/%" -czf FOODIE.tar.gz *
193212

194213
[rule-makecoverage]
195214
help = Rule for performing coverage analysis
196215
rule_1 = FoBiS.py build -f src/tests/accuracy/oscillation/fobos -mode gnu-coverage
197216
rule_2 = ./build/tests/accuracy/oscillation/oscillation -s all
217+
rule_3 = rm -f build/tests/accuracy/oscillation/obj/penf* build/tests/accuracy/oscillation/obj/face* build/tests/accuracy/oscillation/obj/flap* build/tests/accuracy/oscillation/obj/wenoof*
218+
rule_4 = gcov -o build/tests/accuracy/oscillation/obj/ src/lib/foodie*
219+
rule_5 = rm -f *.gcov
198220

199221
[rule-coverage-analysis]
200222
help = Rule for performing coverage analysis and saving reports in markdown
201223
rule_1 = FoBiS.py build -f src/tests/accuracy/oscillation/fobos -mode gnu-coverage
202224
rule_2 = ./build/tests/accuracy/oscillation/oscillation -s all
203-
rule_3 = gcov -o ./build/lib/obj/ src/lib/foodie*.f90
204-
rule_4 = FoBiS.py rule -gcov_analyzer wiki/ Coverage-Analysis
205-
rule_5 = rm -f *.gcov
206-
207-
[rule-deldoc]
208-
help = Rule for deleting documentation
209-
rule = rm -rf doc/html/*
210-
211-
[rule-maketar]
212-
help = Rule for making tar archive of the project
213-
rule = tar -czf FOODIE.tar.gz *
225+
rule_3 = rm -f build/tests/accuracy/oscillation/obj/penf* build/tests/accuracy/oscillation/obj/face* build/tests/accuracy/oscillation/obj/flap* build/tests/accuracy/oscillation/obj/wenoof*
226+
rule_4 = gcov -o build/tests/accuracy/oscillation/obj/ src/lib/foodie*
227+
rule_5 = FoBiS.py rule -gcov_analyzer wiki/ Coverage-Analysis
228+
rule_6 = rm -f *.gcov

scripts/install.sh

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
#!/bin/bash -
2+
#
3+
# File: intstall.sh
4+
#
5+
# Description: A utility script that builds FORESEER project
6+
#
7+
# License: GPL3+
8+
#
9+
# This program is free software; you can redistribute it and/or modify
10+
# it under the terms of the GNU General Public License as published by
11+
# the Free Software Foundation; either version 3 of the License, or
12+
# (at your option) any later version.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program; if not, write to the Free Software
21+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22+
#
23+
24+
# DEBUGGING
25+
set -e
26+
set -C # noclobber
27+
28+
# INTERNAL VARIABLES AND INITIALIZATIONS
29+
readonly USERNAME="Fortran-FOSS-Programmers"
30+
readonly PROJECT="FOODIE"
31+
readonly GITHUB="https://github.com/$USERNAME/$PROJECT"
32+
readonly PROGRAM=`basename "$0"`
33+
34+
function projectdownload () {
35+
if [ $VERBOSE -eq 1 ]; then
36+
echo "download project"
37+
fi
38+
39+
if command -v $DOWNLOAD >/dev/null 2>&1; then
40+
if [ $VERBOSE -eq 1 ]; then
41+
echo " using $DOWNLOAD"
42+
fi
43+
else
44+
echo "error: $DOWNLOAD tool (to download project) not found"
45+
exit 1
46+
fi
47+
48+
if [ "$DOWNLOAD" == "git" ]; then
49+
git clone $GITHUB
50+
cd $PROJECT
51+
git submodule update --init
52+
cd -
53+
elif [ "$DOWNLOAD" == "wget" ]; then
54+
wget $(curl -s https://api.github.com/repos/$USERNAME/$PROJECT/releases/latest | grep 'browser_' | cut -d\" -f4)
55+
tar xf $PROJECT.tar.gz
56+
rm -f $PROJECT.tar.gz
57+
fi
58+
59+
if [ $VERBOSE -eq 1 ]; then
60+
echo "project downloaded into: $PROJECT"
61+
fi
62+
}
63+
64+
function projectbuild () {
65+
if [ $VERBOSE -eq 1 ]; then
66+
echo "build project"
67+
fi
68+
69+
if [ "$BUILD" == "fobis" ]; then
70+
BUILD="FoBiS.py"
71+
fi
72+
73+
if command -v $BUILD >/dev/null 2>&1; then
74+
if [ $VERBOSE -eq 1 ]; then
75+
echo " using $BUILD"
76+
fi
77+
else
78+
echo "error: $BUILD tool (to build project) not found"
79+
exit 1
80+
fi
81+
82+
if [ "$BUILD" == "FoBiS.py" ]; then
83+
FoBiS.py build -mode static-gnu
84+
elif [ "$BUILD" == "make" ]; then
85+
make -j 1 STATIC=yes
86+
elif [ "$BUILD" == "cmake" ]; then
87+
mkdir -p static
88+
cd static
89+
cmake ../
90+
cmake --build .
91+
cd ../
92+
fi
93+
}
94+
95+
function usage () {
96+
echo "Install script of $PROJECT"
97+
echo "Usage:"
98+
echo
99+
echo "$PROGRAM --help|-?"
100+
echo " Print this usage output and exit"
101+
echo
102+
echo "$PROGRAM --download|-d <arg> [--verbose|-v]"
103+
echo " Download the project"
104+
echo
105+
echo " --download|-d [arg] Download the project, arg=git|wget to download with git or wget respectively"
106+
echo " --verbose|-v Output verbose mode activation"
107+
echo
108+
echo "$PROGRAM --build|-b <arg> [--verbose|-v]"
109+
echo " Build the project"
110+
echo
111+
echo " --build|-b [arg] Build the project, arg=fobis|make|cmake to build with FoBiS.py, GNU Make or CMake respectively"
112+
echo " --verbose|-v Output verbose mode activation"
113+
echo
114+
echo "Examples:"
115+
echo
116+
echo "$PROGRAM --download git"
117+
echo "$PROGRAM --build make"
118+
echo "$PROGRAM --download wget --build cmake"
119+
}
120+
121+
DOWNLOAD=0
122+
BUILD=0
123+
VERBOSE=0
124+
125+
# RETURN VALUES/EXIT STATUS CODES
126+
readonly E_BAD_OPTION=254
127+
128+
# PROCESS COMMAND-LINE ARGUMENTS
129+
if [ $# -eq 0 ]; then
130+
usage
131+
exit 0
132+
fi
133+
while test $# -gt 0; do
134+
if [ x"$1" == x"--" ]; then
135+
# detect argument termination
136+
shift
137+
break
138+
fi
139+
case $1 in
140+
--download | -d )
141+
shift
142+
DOWNLOAD="$1"
143+
shift
144+
;;
145+
146+
--build | -b )
147+
shift
148+
BUILD="$1"
149+
shift
150+
;;
151+
152+
--verbose | -v )
153+
shift
154+
VERBOSE=1
155+
;;
156+
157+
-? | --help )
158+
usage
159+
exit
160+
;;
161+
162+
-* )
163+
echo "Unrecognized option: $1" >&2
164+
usage
165+
exit $E_BAD_OPTION
166+
;;
167+
168+
* )
169+
break
170+
;;
171+
esac
172+
done
173+
174+
if [ "$DOWNLOAD" != "0" ] && [ "$BUILD" == "0" ]; then
175+
projectdownload
176+
elif [ "$DOWNLOAD" == "0" ] && [ "$BUILD" != "0" ]; then
177+
projectbuild
178+
elif [ "$DOWNLOAD" != "0" ] && [ "$BUILD" != "0" ]; then
179+
projectdownload
180+
cd $PROJECT
181+
projectbuild
182+
fi
183+
184+
exit 0

0 commit comments

Comments
 (0)