From 74950efb84f78f2711458b7dc4ef570df97b562e Mon Sep 17 00:00:00 2001 From: Dave Bouvier Date: Mon, 21 Sep 2020 11:22:50 -0400 Subject: [PATCH 1/8] Use GCC 5 instead of 9 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 00e8c80f2..1804b9142 100644 --- a/.travis.yml +++ b/.travis.yml @@ -149,4 +149,4 @@ jobs: install: - if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8"; fi - cmake . - - make \ No newline at end of file + - make From f88f7183a32249fcb4fa70d60c38535b3cd08b1d Mon Sep 17 00:00:00 2001 From: Dave Bouvier Date: Mon, 21 Sep 2020 11:26:18 -0400 Subject: [PATCH 2/8] Try HYPHYGTEST instead --- .travis.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1804b9142..8e8e6629f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,20 @@ script: jobs: include: + - os: linux + language: cpp + before_install: + - pip install --user cpp-coveralls + addons: + apt: + packages: + - g++-5 + - gcc-5 + install: + - if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi + - cmake . && make HYPHYGTEST + env: + - envSpecificTest="coveralls --gcov-options '\-lp'"" - os: linux addons: apt: From 9c6f85debe5e78e0afc8045d1d9d9492eec24038 Mon Sep 17 00:00:00 2001 From: Dave B Date: Tue, 22 Sep 2020 13:33:13 -0400 Subject: [PATCH 3/8] Fix coveralls report --- .coveralls.condarc | 5 ++++ .coveralls.env.yml | 4 ++++ .github/workflows/coverage.yml | 42 ++++++++++++++++++++++++++++++++++ .travis.yml | 30 ------------------------ CMakeLists.txt | 11 ++++----- 5 files changed, 55 insertions(+), 37 deletions(-) create mode 100644 .coveralls.condarc create mode 100644 .coveralls.env.yml create mode 100755 .github/workflows/coverage.yml diff --git a/.coveralls.condarc b/.coveralls.condarc new file mode 100644 index 000000000..80240a8c5 --- /dev/null +++ b/.coveralls.condarc @@ -0,0 +1,5 @@ +channels: + - conda-forge + - defaults +always_yes: True +auto_update_conda: True diff --git a/.coveralls.env.yml b/.coveralls.env.yml new file mode 100644 index 000000000..9f614af62 --- /dev/null +++ b/.coveralls.env.yml @@ -0,0 +1,4 @@ +name: hyphy-test-env +dependencies: + - pip + - openmpi diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100755 index 000000000..299d94585 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,42 @@ +name: Test Coverage +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + coverage: + name: Coveralls Report + runs-on: ubuntu-latest + steps: + - name: Install python + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Install dependencies + run: + python -m pip install --upgrade pip; + python -m pip install --upgrade wheel; + python -m pip install --upgrade cpp-coveralls; + - name: Get HyPhy code + uses: actions/checkout@v2 + - name: Install and activate miniconda + uses: goanpeca/setup-miniconda@v1 + with: + activate-environment: 'hyphy-test-env' + environment-file: '.coveralls.env.yml' + condarc-file: '.coveralls.condarc' + - name: Build HyPhy + run: + cmake .; + make -j HYPHYDEBUG; + ln -s HYPHYDEBUG hyphy; + ln -s HYPHYDEBUG HYPHYMP; + - name: Run unit tests + run: + PATH=.:$PATH ./run_unit_tests.sh || true; + - name: Generate coverage information + run: + coveralls --gcov-options '\-lp'; + env: + COVERALLS_REPO_TOKEN: ${{ secrets.coveralls_token }} diff --git a/.travis.yml b/.travis.yml index 8e8e6629f..f98c20721 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,36 +27,6 @@ script: jobs: include: - - os: linux - language: cpp - before_install: - - pip install --user cpp-coveralls - addons: - apt: - packages: - - g++-5 - - gcc-5 - install: - - if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi - - cmake . && make HYPHYGTEST - env: - - envSpecificTest="coveralls --gcov-options '\-lp'"" - - os: linux - addons: - apt: - sources: - - llvm-toolchain-precise - - ubuntu-toolchain-r-test - - george-edison55-precise-backports - packages: - - g++-9 - - gcc-9 - install: - - if [ "$CXX" = "g++" ]; then export CXX="g++-9" CC="gcc-9"; fi - - cmake . - - make - env: - - envSpecificTest="export PATH=$PATH:$(pwd); cd; git clone https://gitlab.com/rdvelazquez/testiphy.git; cd testiphy; ./testiphy HYPHYMP" - os: linux env: diff --git a/CMakeLists.txt b/CMakeLists.txt index 17b46e63b..50b2a6f2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -492,18 +492,15 @@ endif(${OPENMP_FOUND}) add_custom_target(DEBUG DEPENDS HYPHYDEBUG) - - - set_target_properties( HYPHYDEBUG PROPERTIES if(${OPENMP_FOUND}) - COMPILE_FLAGS "${DEFAULT_COMPILE_FLAGS} ${DEFAULT_DEBUG_WARNING_FLAGS} ${OpenMP_CXX_FLAGS} ${MPI_COMPILE_FLAGS} -g -fsanitize=address -fsanitize=leak -O0 " - LINK_FLAGS "${DEFAULT_COMPILE_FLAGS} ${OpenMP_CXX_FLAGS} ${MPI_LINK_FLAGS} -g -fsanitize=address -O0 " + COMPILE_FLAGS "${DEFAULT_COMPILE_FLAGS} ${DEFAULT_DEBUG_WARNING_FLAGS} ${OpenMP_CXX_FLAGS} ${MPI_COMPILE_FLAGS} -g -fprofile-arcs -ftest-coverage -fsanitize=address -fsanitize=leak -O0 " + LINK_FLAGS "${DEFAULT_COMPILE_FLAGS} ${OpenMP_CXX_FLAGS} ${MPI_LINK_FLAGS} -g -fprofile-arcs -ftest-coverage -fsanitize=address -O0 " else(${OPENMP_FOUND}) - COMPILE_FLAGS "${DEFAULT_COMPILE_FLAGS} ${DEFAULT_DEBUG_WARNING_FLAGS} -g -fsanitize=address -fsanitize=leak -O0 " - LINK_FLAGS "${DEFAULT_COMPILE_FLAGS} -g -fsanitize=address -O0 " + COMPILE_FLAGS "${DEFAULT_COMPILE_FLAGS} ${DEFAULT_DEBUG_WARNING_FLAGS} -g -fprofile-arcs -ftest-coverage -fsanitize=address -fsanitize=leak -O0 " + LINK_FLAGS "${DEFAULT_COMPILE_FLAGS} -g -fprofile-arcs -ftest-coverage -fsanitize=address -O0 " endif(${OPENMP_FOUND}) ) From 1ad267ba27aaf68e06cbcbfb649c2c4eae6792d4 Mon Sep 17 00:00:00 2001 From: Dave Bouvier Date: Tue, 22 Sep 2020 13:47:44 -0400 Subject: [PATCH 4/8] Removed one too many travis tests. --- .travis.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index f98c20721..1804b9142 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,22 @@ script: jobs: include: + - os: linux + addons: + apt: + sources: + - llvm-toolchain-precise + - ubuntu-toolchain-r-test + - george-edison55-precise-backports + packages: + - g++-9 + - gcc-9 + install: + - if [ "$CXX" = "g++" ]; then export CXX="g++-9" CC="gcc-9"; fi + - cmake . + - make + env: + - envSpecificTest="export PATH=$PATH:$(pwd); cd; git clone https://gitlab.com/rdvelazquez/testiphy.git; cd testiphy; ./testiphy HYPHYMP" - os: linux env: From bf04b81abfeb43cf82a30d1b16a452aa3a546e16 Mon Sep 17 00:00:00 2001 From: Dave Bouvier Date: Tue, 22 Sep 2020 14:01:56 -0400 Subject: [PATCH 5/8] Meaningless commit to trigger a new build. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50b2a6f2e..8b3cbd147 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -492,6 +492,9 @@ endif(${OPENMP_FOUND}) add_custom_target(DEBUG DEPENDS HYPHYDEBUG) + + + set_target_properties( HYPHYDEBUG PROPERTIES From 5742860db4af8ed2b8f8b63f3dc6ea01e856fd94 Mon Sep 17 00:00:00 2001 From: Joseph Mingrone Date: Fri, 16 Oct 2020 20:25:02 -0300 Subject: [PATCH 6/8] Fix v2.5.20 build error (cannot convert std::nullptr_t to hyFloat) --- src/core/matrix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/matrix.cpp b/src/core/matrix.cpp index 2692c7ac1..14b58a302 100644 --- a/src/core/matrix.cpp +++ b/src/core/matrix.cpp @@ -2236,7 +2236,7 @@ bool _Matrix::IncreaseStorage (void) { } else { theData = (hyFloat*) MemReallocate(theData, lDim*sizeof(void*)); for (long i = lDim-allocationBlock; i < lDim; i++) { - theData [i] = ZEROPOINTER; + theData [i] = ZEROOBJECT; } } } else { From 8c935f67e47064de1372743b0021ce44adbe6b94 Mon Sep 17 00:00:00 2001 From: Dave B Date: Tue, 17 Nov 2020 12:55:32 -0500 Subject: [PATCH 7/8] Use version 2 of setup-miniconda --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 299d94585..ee869ce62 100755 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -21,7 +21,7 @@ jobs: - name: Get HyPhy code uses: actions/checkout@v2 - name: Install and activate miniconda - uses: goanpeca/setup-miniconda@v1 + uses: goanpeca/setup-miniconda@v2.0.0 with: activate-environment: 'hyphy-test-env' environment-file: '.coveralls.env.yml' From 051e83e6561b68873da5b7bb671decb1f40ff690 Mon Sep 17 00:00:00 2001 From: Dave B Date: Tue, 17 Nov 2020 13:19:23 -0500 Subject: [PATCH 8/8] Use correct miniconda --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ee869ce62..f5887b823 100755 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -21,7 +21,7 @@ jobs: - name: Get HyPhy code uses: actions/checkout@v2 - name: Install and activate miniconda - uses: goanpeca/setup-miniconda@v2.0.0 + uses: conda-incubator/setup-miniconda@v2 with: activate-environment: 'hyphy-test-env' environment-file: '.coveralls.env.yml'