Skip to content

Commit

Permalink
Merge pull request #377 from DEploid-dev/shajoezhu-patch-1
Browse files Browse the repository at this point in the history
Update config.yml
  • Loading branch information
shajoezhu authored Jan 20, 2025
2 parents 704d178 + f757ec9 commit f637f98
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 61 deletions.
104 changes: 55 additions & 49 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
version: 2.0
version: 2.1
orbs:
coveralls: coveralls/[email protected]

jobs:
"14.04":
v1804:
docker:
- image: circleci/buildpack-deps:14.04
- image: cimg/base:2022.08-18.04
working_directory: /home/circleci/DEploid
steps:
- checkout
Expand All @@ -16,35 +19,35 @@ jobs:
- run:
name: Install dependencies and set path
command: |
sudo apt-get update
curl -fsSL https://git.io/vHGMF | bash
sudo apt-get install libcppunit-dev
sudo apt-get install valgrind
sudo apt-get update
curl -fsSL https://git.io/vHGMF | bash
sudo apt-get install libcppunit-dev
sudo apt-get install valgrind
- run:
name: Getting ready
command: |
name: Getting ready
command: |
g++ --version
./bootstrap
- run:
name: Compile
command: |
name: Compile
command: |
make
sudo make install
make check
- run:
name: Run tests
command: |
name: Run tests
command: |
./tests/test_binary.sh
./tests/testPOS.sh
./tests/test_binaryVcfVsTxt.sh
./tests/test-against-previous-version.sh
./tests/test_binaryReproducible.sh
#- valgrind --leak-check=full -v --show-leak-kinds=all ./unit_tests
#- coveralls --exclude lib --exclude tests --exclude src/random --exclude src/codeCogs/ --exclude src/export/ --gcov-options '\-lp'
#- coveralls --exclude lib --exclude tests --exclude src/random --exclude src/codeCogs/ --exclude src/export/ --gcov-options '\-lp'

"16.04":
v2004:
docker:
- image: circleci/buildpack-deps:16.04
- image: cimg/base:2022.08 # stable-20.04
working_directory: /home/circleci/DEploid
steps:
- checkout
Expand All @@ -58,33 +61,33 @@ jobs:
- run:
name: Install dependencies and set path
command: |
sudo apt-get update
curl -fsSL https://git.io/vHGMF | bash
sudo apt-get install libcppunit-dev
sudo apt-get install valgrind
sudo apt-get update
curl -fsSL https://git.io/vHGMF | bash
sudo apt-get install libcppunit-dev
sudo apt-get install valgrind
- run:
name: Getting ready
command: |
name: Getting ready
command: |
g++ --version
./bootstrap
- run:
name: Compile
command: |
name: Compile
command: |
make
sudo make install
make check
- run:
name: Run tests
command: |
name: Run tests
command: |
./tests/test_binary.sh
./tests/testPOS.sh
./tests/test_binaryVcfVsTxt.sh
./tests/test-against-previous-version.sh
./tests/test_binaryReproducible.sh
"20.04":
v2204:
docker:
- image: circleci/buildpack-deps:20.04
- image: cimg/base:2024.12
working_directory: /home/circleci/DEploid
steps:
- checkout
Expand All @@ -98,35 +101,38 @@ jobs:
- run:
name: Install dependencies and set path
command: |
sudo apt-get update
curl -fsSL https://git.io/vHGMF | bash
sudo apt-get install libcppunit-dev
sudo apt-get install valgrind
sudo apt-get update
curl -fsSL https://git.io/vHGMF | bash
sudo apt-get install libcppunit-dev automake
sudo apt-get install valgrind lcov
- run:
name: Getting ready
command: |
name: Getting ready
command: |
g++ --version
./bootstrap
- run:
name: Compile
command: |
name: Compile
command: |
make
sudo make install
make check
- run:
name: Run tests
command: |
./tests/test_binary.sh
./tests/testPOS.sh
./tests/test_binaryVcfVsTxt.sh
./tests/test-against-previous-version.sh
./tests/test_binaryReproducible.sh
name: Run tests
command: |
# ./tests/test_binary.sh
# ./tests/testPOS.sh
# ./tests/test_binaryVcfVsTxt.sh
# ./tests/test-against-previous-version.sh
# ./tests/test_binaryReproducible.sh
# valgrind --leak-check=full -v --show-leak-kinds=all ./unit_tests_1
# coveralls --exclude lib --exclude tests --exclude src/random --exclude src/codeCogs/ --exclude src/export/ --gcov-options '\-lp'
./tests/test-coverage-coverall.sh
- coveralls/upload

workflows:
version: 2
build:
myworkflow:
jobs:
- "20.04"
# - "14.04"
# - "16.04"
- v2204
- v2004
# - v1804 # this is too old, bash_complete not available

32 changes: 25 additions & 7 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bin_PROGRAMS = dEploid dEploid_dbg
man1_MANS = docs/_build/man/dEploid.1

TESTS = unit_tests io_unit_tests
check_PROGRAMS = unit_tests dEploid_dbg io_unit_tests current_unit_tests # dEploid_prof
check_PROGRAMS = unit_tests_1 unit_tests_2 unit_tests dEploid_dbg io_unit_tests current_unit_tests # dEploid_prof
PROG = DEPLOID

common_flags = -std=c++17 -Isrc/ -Isrc/codeCogs/ -Isrc/vcf/src/ -DDEPLOIDVERSION=\"${DEPLOIDVERSION}\" -DLASSOVERSION=\"${LASSOVERSION}\" -DCOMPILEDATE=\"${COMPILEDATE}\" -Wall -Wextra
Expand Down Expand Up @@ -57,19 +57,37 @@ dEploid_LDADD = $(common_LDADD)
dEploid_dbg_LDADD = $(common_LDADD)
dEploid_prof_LDADD = $(common_LDADD)

unit_tests_SOURCES = $(common_src) \
tests/unittest/test_runner.cpp \
tests/unittest/test_ibd.cpp \
tests/unittest/test_updateSingleHap.cpp \
tests/unittest/test_utilities.cpp \
unit_tests_1_SOURCES_0 = tests/unittest/test_ibd.cpp \
tests/unittest/test_panel.cpp \
tests/unittest/test_mcmc.cpp \
tests/unittest/test_utilities.cpp

unit_tests_2_SOURCES_0 = tests/unittest/test_mcmc.cpp \
tests/unittest/test_updateSingleHap.cpp \
tests/unittest/test_updatePairHap.cpp \
tests/unittest/test_workflow.cpp

unit_tests_1_SOURCES = $(common_src) \
$(unit_tests_1_SOURCES_0) \
tests/unittest/test_runner.cpp

unit_tests_2_SOURCES = $(common_src) \
$(unit_tests_2_SOURCES_0) \
tests/unittest/test_runner.cpp

unit_tests_SOURCES = $(common_src) \
$(unit_tests_1_SOURCES_0) \
$(unit_tests_2_SOURCES_0) \
tests/unittest/test_runner.cpp

unit_tests_CXXFLAGS = $(common_flags) -DNDEBUG -DUNITTEST -Wno-write-strings --coverage
unit_tests_LDADD = -lcppunit -ldl $(common_LDADD)

unit_tests_1_CXXFLAGS = $(common_flags) -DNDEBUG -DUNITTEST -Wno-write-strings --coverage
unit_tests_1_LDADD = -lcppunit -ldl $(common_LDADD)

unit_tests_2_CXXFLAGS = $(common_flags) -DNDEBUG -DUNITTEST -Wno-write-strings --coverage
unit_tests_2_LDADD = -lcppunit -ldl $(common_LDADD)

io_unit_tests_SOURCES = $(common_src) \
tests/unittest/test_runner.cpp \
tests/unittest/test_dEploidIO.cpp
Expand Down
2 changes: 1 addition & 1 deletion bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ echo " done."

aclocal
autoconf
automake -a
automake -a --force-missing --add-missing
./configure
2 changes: 1 addition & 1 deletion src/vcf
Submodule vcf updated 1 files
+1 −0 src/gzstream/version
6 changes: 3 additions & 3 deletions tests/test-coverage-coverall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
make -mj

# Generate html report
lcov --ignore-errors version --base-directory . --directory . --zerocounters -q
lcov --base-directory . --directory . --zerocounters -q
make check -mj
lcov --ignore-errors version --base-directory . --directory . -c -o coverage/lcov.info
lcov --base-directory . --directory . -c -o coverage/lcov.info
# --rc lcov_branch_coverage=1 option will turn on branch check
lcov --ignore-errors version --remove coverage/lcov.info "/usr*" "src/codeCogs/*" "src/vcf/*" "src/lasso/*" "src/export/*" "src/gzstream/*" "tests/unittest/*" -o coverage/lcov.info # remove output for external libraries
lcov --remove coverage/lcov.info "/usr*" "src/codeCogs/*" "src/vcf/*" "src/lasso/*" "src/export/*" "src/gzstream/*" "tests/unittest/*" -o coverage/lcov.info # remove output for external libraries

0 comments on commit f637f98

Please sign in to comment.