version: 2 references: environment: &environment environment: MINICONDA: ~/miniconda JUNIT_REPORT_PATH: /tmp/reports/ # trailing slash required ARTIFACT_PATH: /tmp/artifacts/ configure: &configure name: Running Configure command: | # GCOV is missing from env vars exported by gcc_linux-64 export GCOV=${GCC%%cc}cov eval MINICONDA=$MINICONDA cd ~/build ~/project/configure \ --disable-docs \ --prefix=$HOME/install \ --with-boost=$MINICONDA \ --with-boost-libdir=$MINICONDA/lib \ --with-arbhome=$MINICONDA/lib/arb \ $EXTRA_CONFIG_ARGS \ || (cat config.log; false) macos: &macos macos: xcode: "9.0" linux: &linux docker: - image: condaforge/linux-anvil environment: LC_ALL: C.UTF-8 LANG: C.UTF-8 jobs: build: <<: *environment <<: *linux docker: - image: condaforge/linux-anvil environment: steps: - checkout - restore_cache: keys: - conda-1-{{arch}} - run: name: Preparing Conda Environment command: ./ci_scripts/install_conda.sh - save_cache: key: conda-1-{{arch}}-{{checksum "conda/info.txt" }}-{{checksum "conda/root.txt"}}-{{checksum "conda/pkgs.txt"}} paths: ~/miniconda - run: name: Checking out submodules command: git submodule update --init --recursive --remote - run: name: Preparing Directory Structure command: mkdir ~/build $JUNIT_REPORT_PATH $ARTIFACT_PATH - run: name: Boostrapping Configure command: ./autogen.sh - run: <<: *configure environment: EXTRA_CONFIG_ARGS: --enable-code-coverage --enable-debug - run: &build name: Building command: | make -C ~/build clean make -j2 -C ~/build all - run: name: Running Unit Tests (w/ debug) command: | cd ~/build find -name \*.gcda | xargs rm -f rm -f coverage.info make check-filtered P=unit_tests make code-coverage-capture bash <(curl -s https://codecov.io/bash) -X gcov -F unittest \ -R ~/project -n Unit-Linux-CircleCI no_output_timeout: 20m # kmer_search_test is slow - run: <<: *configure environment: EXTRA_CONFIG_ARGS: --enable-code-coverage - run: <<: *build - run: name: Running Integration Tests (w/o debug) command: | cd ~/build find -name \*.gcda | xargs rm -f rm -f coverage.info make check-filtered P=^tests make code-coverage-capture bash <(curl -s https://codecov.io/bash) -X gcov -F integration \ -R ~/project -n Integration-Linux-CircleCI - run: name: Collecting binaries when: on_fail command: | tar -C ~/build -czvf $ARTIFACT_PATH/build_src.tgz src - run: name: Copying logs when: always command: | ls -la $JUNIT_REPORT_PATH mkdir -p $ARTIFACT_PATH/tests find ~/build -name \*.log -exec cp {} $ARTIFACT_PATH/tests \; - store_test_results: path: /tmp/reports - store_artifacts: path: /tmp/artifacts