From 5e08b7a8441a1435d4adb3b9429fbc508520dce7 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Thu, 11 Jul 2019 22:29:36 -0500 Subject: [PATCH 1/2] attempting to expand gfortran tests on travis to v6-9. experimental! See #180 --- .travis.yml | 161 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 105 insertions(+), 56 deletions(-) diff --git a/.travis.yml b/.travis.yml index d7f47a75c6..d248dfc1e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,59 +12,114 @@ cache: - $HOME/.cache/pip - $HOME/.local -addons: - apt: - sources: - - kalakris-cmake - - ubuntu-toolchain-r-test - packages: - - gfortran-6 - - binutils - - cmake - - python-pip - - graphviz - # Build matrix: Run the three build systems and tests in parallel -env: - global: - - CHECK_README_PROGS="no" - matrix: - # CMake build with unit tests, no documentation, with coverage analysis - # No unicode so that coverage combined with the build script will cover unicode - # and non-unicode code paths - - > - BUILD_SCRIPT="mkdir cmake-build && - cd cmake-build && - cmake .. && - make -j 4 check" - CODE_COVERAGE="no" - DEPLOY_DOCUMENTATION="no" +matrix: + include: + - os: linux + dist: trusty + addons: + apt: + sources: + - kalakris-cmake + - ubuntu-toolchain-r-test + packages: + - gfortran-6 + - binutils + - cmake + - python-pip + env: + - FC=gfortran-6 + # CMake build with unit tests, no documentation, with coverage analysis + # No unicode so that coverage combined with the build script will cover unicode + # and non-unicode code paths + - BUILD_SCRIPT="mkdir cmake-build && cd cmake-build && cmake .. && make -j 4 check" + - CODE_COVERAGE="no" + - DEPLOY_DOCUMENTATION="no" + + - os: linux + dist: trusty + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gfortran-6 + - binutils + - python-pip + - graphviz + env: + - FC=gfortran-6 + - GCOV=gcov-6 + # build with build.sh, make documentation, run unit tests + # and perform coverage analysis + - BUILD_SCRIPT="./build.sh --coverage --skip-documentation && ./build.sh --coverage --enable-unicode" + - CODE_COVERAGE="yes" + - DEPLOY_DOCUMENTATION="yes" + + - os: linux + dist: trusty + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gfortran-7 + - binutils + - python-pip + env: + - FC=gfortran-7 + # build with build.sh, run unit tests + - BUILD_SCRIPT="./build.sh --skip-documentation && ./build.sh --skip-documentation --enable-unicode" + - CODE_COVERAGE="no" + - DEPLOY_DOCUMENTATION="no" - # build with build.sh, make documentation, run unit tests and perform coverage analysis - - > - BUILD_SCRIPT="./build.sh --coverage --skip-documentation && - ./build.sh --coverage --enable-unicode" - CODE_COVERAGE="yes" - DEPLOY_DOCUMENTATION="yes" + - os: linux + dist: trusty + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gfortran-8 + - binutils + - python-pip + env: + - FC=gfortran-8 + # build with build.sh, run unit tests + - BUILD_SCRIPT="./build.sh --skip-documentation && ./build.sh --skip-documentation --enable-unicode" + - CODE_COVERAGE="no" + - DEPLOY_DOCUMENTATION="no" + + - os: linux + dist: trusty + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gfortran-9 + - binutils + - python-pip + env: + - FC=gfortran-9 + # build with build.sh, run unit tests + - BUILD_SCRIPT="./build.sh --skip-documentation && ./build.sh --skip-documentation --enable-unicode" + - CODE_COVERAGE="no" + - DEPLOY_DOCUMENTATION="no" install: - - | - if [[ ! -d "$HOME/.local/bin" ]]; then - mkdir "$HOME/.local/bin" - fi - - export PATH="$HOME/.local/bin:$PATH" - - export FC=/usr/bin/gfortran-6 - - ln -fs /usr/bin/gfortran-6 "$HOME/.local/bin/gfortran" && gfortran --version - - ls -l /usr/bin/gfortran-6 - - ln -fs /usr/bin/gcov-6 "$HOME/.local/bin/gcov" && gcov --version + # - | + # if [[ ! -d "$HOME/.local/bin" ]]; then + # mkdir "$HOME/.local/bin" + # fi + # - export PATH="$HOME/.local/bin:$PATH" + # - export FC=/usr/bin/gfortran-6 + # - ln -fs /usr/bin/gfortran-6 "$HOME/.local/bin/gfortran" && gfortran --version + # - ls -l /usr/bin/gfortran-6 + # - ln -fs /usr/bin/gcov-6 "$HOME/.local/bin/gcov" && gcov --version + - gcov --version + - gfortran --version - perl --version - - | - if ! which f90split; then - wget http://people.sc.fsu.edu/~jburkardt/f_src/f90split/f90split.f90 && \ - gfortran -o f90split f90split.f90 && \ - mv f90split "$HOME/.local/bin/" && \ - rm f90split.f90 - fi - pip install --upgrade pygooglechart - pip install --upgrade graphviz - (pip install --upgrade FoBiS.py==2.2.8 && FoBiS.py --version) @@ -72,13 +127,6 @@ install: - (pip install --upgrade git+https://github.com/dmeranda/demjson.git && jsonlint --version) before_script: - - | - if [[ $CHECK_README_PROGS == [yY]* ]]; then - f90split README.md && \ - for f in example*.md; do - mv $f src/tests/jf_test_${f%.md}.f90 - done - fi - | if [ "$TRAVIS_TAG" ]; then if [[ "v$TRAVIS_TAG" != "v$(cat .VERSION)" ]]; then @@ -102,8 +150,9 @@ after_success: - (yes | rm -r doc gh-pages) || true # wipe out doc dirs to avoid confusing codecov - | if [[ $CODE_COVERAGE == [yY]* ]]; then + alias gcov=$GCOV rm json_*.F90-*unicode.gcov || true mv json_*.F90.gcov src/ mv jf_test*.[fF]90.gcov src/tests/ - bash <(curl -s https://codecov.io/bash) -v -X gcov + bash <(curl -s https://codecov.io/bash) -v -X $GCOV fi From 5fdb2bfac7a184ff12f36dface073e753c1cf081 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Thu, 11 Jul 2019 22:44:20 -0500 Subject: [PATCH 2/2] how about this --- .travis.yml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index d248dfc1e6..5065285887 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,8 @@ matrix: - cmake - python-pip env: - - FC=gfortran-6 + - GFORTRAN=gfortran-6 + - GCOV=gcov-6 # CMake build with unit tests, no documentation, with coverage analysis # No unicode so that coverage combined with the build script will cover unicode # and non-unicode code paths @@ -48,7 +49,7 @@ matrix: - python-pip - graphviz env: - - FC=gfortran-6 + - GFORTRAN=gfortran-6 - GCOV=gcov-6 # build with build.sh, make documentation, run unit tests # and perform coverage analysis @@ -67,7 +68,8 @@ matrix: - binutils - python-pip env: - - FC=gfortran-7 + - GFORTRAN=gfortran-7 + - GCOV=gcov-7 # build with build.sh, run unit tests - BUILD_SCRIPT="./build.sh --skip-documentation && ./build.sh --skip-documentation --enable-unicode" - CODE_COVERAGE="no" @@ -84,7 +86,8 @@ matrix: - binutils - python-pip env: - - FC=gfortran-8 + - GFORTRAN=gfortran-8 + - GCOV=gcov-8 # build with build.sh, run unit tests - BUILD_SCRIPT="./build.sh --skip-documentation && ./build.sh --skip-documentation --enable-unicode" - CODE_COVERAGE="no" @@ -101,24 +104,23 @@ matrix: - binutils - python-pip env: - - FC=gfortran-9 + - GFORTRAN=gfortran-9 + - GCOV=gcov-9 # build with build.sh, run unit tests - BUILD_SCRIPT="./build.sh --skip-documentation && ./build.sh --skip-documentation --enable-unicode" - CODE_COVERAGE="no" - DEPLOY_DOCUMENTATION="no" install: - # - | - # if [[ ! -d "$HOME/.local/bin" ]]; then - # mkdir "$HOME/.local/bin" - # fi - # - export PATH="$HOME/.local/bin:$PATH" - # - export FC=/usr/bin/gfortran-6 - # - ln -fs /usr/bin/gfortran-6 "$HOME/.local/bin/gfortran" && gfortran --version - # - ls -l /usr/bin/gfortran-6 - # - ln -fs /usr/bin/gcov-6 "$HOME/.local/bin/gcov" && gcov --version - - gcov --version - - gfortran --version + - | + if [[ ! -d "$HOME/.local/bin" ]]; then + mkdir "$HOME/.local/bin" + fi + - export PATH="$HOME/.local/bin:$PATH" + - export FC=/usr/bin/$GFORTRAN + - ln -fs $FC "$HOME/.local/bin/gfortran" && gfortran --version + - ls -l $FC + - ln -fs /usr/bin/$GCOV "$HOME/.local/bin/gcov" && gcov --version - perl --version - pip install --upgrade pygooglechart - pip install --upgrade graphviz