Skip to content

Commit b76de24

Browse files
committed
try fortran-lang/setup-fpm@v7
added -ftrampoline-impl=heap to build.sh
1 parent be2657b commit b76de24

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

.github/workflows/CI.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,17 @@ jobs:
5555
echo "PYTHONPATH=$MYDIR/FoBiS/src/main/python:$PYTHONPATH" >> $GITHUB_ENV
5656
echo "PATH=$MYDIR/FoBiS/src/main/python:$PATH" >> $GITHUB_ENV
5757
58+
- name: Setup Fortran Package Manager
59+
uses: fortran-lang/setup-fpm@v7
60+
with:
61+
github-token: ${{ secrets.GITHUB_TOKEN }}
62+
5863
- name: Install Python dependencies
5964
if: contains( matrix.os, 'ubuntu')
6065
run: |
6166
python -m pip install --upgrade pip
6267
#pip install ford FoBiS.py pygooglechart fpm
63-
pip install ford pygooglechart fpm>=0.13
68+
pip install ford pygooglechart
6469
# just get the latest FoBiS from git:
6570
git clone https://github.com/szaghi/FoBiS.git
6671
# use a fork until there is a new release:

build.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ argument is passed. Additionally, A custom compiler may be passed to the 'compil
116116
flag, but appropriate 'cflags' should also be passed to the script.\n\n"
117117
}
118118

119-
120119
while [ "$#" -ge "1" ]; do # Get command line arguments while there are more left to process
121120

122121
key="$1" # Command line args are key-value pairs or value-less keys
@@ -257,6 +256,12 @@ while [ "$#" -ge "1" ]; do # Get command line arguments while there are more lef
257256
shift # look at next argument
258257
done # with argument parsing loop
259258

259+
# linker flags for gfortran:
260+
COMPILERLFLAGS=""
261+
if [ $FCOMPILER = gnu ]; then
262+
COMPILERLFLAGS='-lflags "-ftrampoline-impl=heap"'
263+
fi
264+
260265
# if no compiler selected, then we're defaulting to gnu, and need to check that the cflags are set
261266
if [ "$FCOMPILER" = 'gnu' ] && [ -z "$FCOMPILERFLAGS" ]; then
262267
FCOMPILERFLAGS="$GNUCOMPILERFLAGS"
@@ -279,7 +284,7 @@ fi
279284

280285
if [[ $TRY_UNICODE == [yY]* ]]; then
281286
echo "Trying to compile library with Unicode/UCS4 support"
282-
FoBiS.py build -ch -compiler "${FCOMPILER}" "${CUSTOM[@]}" -cflags "${FCOMPILERFLAGS}" -dbld "${BINDIR}" -s "${INTROSPECDIR}" -dmod ./ -dobj ./ -t "${UCS4TESTCODE}" -o "${UCS4TESTCODE%.f90}" -colors
287+
FoBiS.py build -ch -compiler "${FCOMPILER}" "${CUSTOM[@]}" "${COMPILERLFLAGS}" -cflags "${FCOMPILERFLAGS}" -dbld "${BINDIR}" -s "${INTROSPECDIR}" -dmod ./ -dobj ./ -t "${UCS4TESTCODE}" -o "${UCS4TESTCODE%.f90}" -colors
283288
if "${BINDIR}/${UCS4TESTCODE%.f90}"; then
284289
DEFINES="-DUSE_UCS4 -Wunused-function"
285290
fi
@@ -289,7 +294,7 @@ fi
289294
echo ""
290295
echo "Building library..."
291296

292-
FoBiS.py build -ch -compiler ${FCOMPILER} "${CUSTOM[@]}" -cflags "${FCOMPILERFLAGS} ${DEFINES} ${REAL_KIND} ${INT_KIND}" ${COVERAGE} ${PROFILING} -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors
297+
FoBiS.py build -ch -compiler ${FCOMPILER} "${CUSTOM[@]}" $COMPILERLFLAGS -cflags "${FCOMPILERFLAGS} ${DEFINES} ${REAL_KIND} ${INT_KIND}" ${COVERAGE} ${PROFILING} -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors
293298

294299
#build the unit tests (uses the above library):
295300
if [[ $JF_SKIP_TESTS != [yY]* ]]; then
@@ -302,7 +307,7 @@ if [[ $JF_SKIP_TESTS != [yY]* ]]; then
302307
for TEST in "${TESTDIR%/}"/jf_test_*.[fF]90; do
303308
THIS_TEST=${TEST##*/}
304309
echo "Build ${THIS_TEST%.[fF]90}"
305-
FoBiS.py build -ch -compiler ${FCOMPILER} "${CUSTOM[@]}" -cflags "${FCOMPILERFLAGS} ${DEFINES}" ${COVERAGE} ${PROFILING} -dbld "${BINDIR}" -s "${TESTDIR}" -i "${LIBDIR}" -libs "${LIBDIR}/${LIBOUT}" -dmod ./ -dobj ./ -t "${THIS_TEST}" -o "${THIS_TEST%.[fF]90}" -colors
310+
FoBiS.py build -ch -compiler ${FCOMPILER} "${CUSTOM[@]}" "${COMPILERLFLAGS}" -cflags "${FCOMPILERFLAGS} ${DEFINES}" ${COVERAGE} ${PROFILING} -dbld "${BINDIR}" -s "${TESTDIR}" -i "${LIBDIR}" -libs "${LIBDIR}/${LIBOUT}" -dmod ./ -dobj ./ -t "${THIS_TEST}" -o "${THIS_TEST%.[fF]90}" -colors
306311
done
307312
else
308313
echo "Skip building the unit tests since \$JF_SKIP_TESTS has been set to 'true'."

0 commit comments

Comments
 (0)