1 | version: 2 |
---|
2 | |
---|
3 | references: |
---|
4 | environment: &environment |
---|
5 | environment: |
---|
6 | MINICONDA: ~/miniconda |
---|
7 | JUNIT_REPORT_PATH: /tmp/reports/ # trailing slash required |
---|
8 | ARTIFACT_PATH: /tmp/artifacts/ |
---|
9 | |
---|
10 | configure: &configure |
---|
11 | name: Running Configure |
---|
12 | command: | |
---|
13 | # GCOV is missing from env vars exported by gcc_linux-64 |
---|
14 | export GCOV=${GCC%%cc}cov |
---|
15 | eval MINICONDA=$MINICONDA |
---|
16 | cd ~/build |
---|
17 | ~/project/configure \ |
---|
18 | --disable-docs \ |
---|
19 | --prefix=$HOME/install \ |
---|
20 | --with-boost=$MINICONDA \ |
---|
21 | --with-boost-libdir=$MINICONDA/lib \ |
---|
22 | --with-arbhome=$MINICONDA/lib/arb \ |
---|
23 | $EXTRA_CONFIG_ARGS \ |
---|
24 | || (cat config.log; false) |
---|
25 | |
---|
26 | macos: &macos |
---|
27 | macos: |
---|
28 | xcode: "9.0" |
---|
29 | linux: &linux |
---|
30 | docker: |
---|
31 | - image: condaforge/linux-anvil |
---|
32 | environment: |
---|
33 | LC_ALL: C.UTF-8 |
---|
34 | LANG: C.UTF-8 |
---|
35 | |
---|
36 | jobs: |
---|
37 | build: |
---|
38 | <<: *environment |
---|
39 | <<: *linux |
---|
40 | docker: |
---|
41 | - image: condaforge/linux-anvil |
---|
42 | environment: |
---|
43 | steps: |
---|
44 | - checkout |
---|
45 | - restore_cache: |
---|
46 | keys: |
---|
47 | - conda-1-{{arch}} |
---|
48 | - run: |
---|
49 | name: Preparing Conda Environment |
---|
50 | command: ./ci_scripts/install_conda.sh |
---|
51 | - save_cache: |
---|
52 | key: conda-1-{{arch}}-{{checksum "conda/info.txt" }}-{{checksum "conda/root.txt"}}-{{checksum "conda/pkgs.txt"}} |
---|
53 | paths: ~/miniconda |
---|
54 | - run: |
---|
55 | name: Checking out submodules |
---|
56 | command: git submodule update --init --recursive --remote |
---|
57 | - run: |
---|
58 | name: Preparing Directory Structure |
---|
59 | command: mkdir ~/build $JUNIT_REPORT_PATH $ARTIFACT_PATH |
---|
60 | - run: |
---|
61 | name: Boostrapping Configure |
---|
62 | command: ./autogen.sh |
---|
63 | - run: |
---|
64 | <<: *configure |
---|
65 | environment: |
---|
66 | EXTRA_CONFIG_ARGS: --enable-code-coverage --enable-debug |
---|
67 | - run: &build |
---|
68 | name: Building |
---|
69 | command: | |
---|
70 | make -C ~/build clean |
---|
71 | make -j2 -C ~/build all |
---|
72 | - run: |
---|
73 | name: Running Unit Tests (w/ debug) |
---|
74 | command: | |
---|
75 | cd ~/build |
---|
76 | find -name \*.gcda | xargs rm -f |
---|
77 | rm -f coverage.info |
---|
78 | make check-filtered P=unit_tests |
---|
79 | make code-coverage-capture |
---|
80 | bash <(curl -s https://codecov.io/bash) -X gcov -F unittest \ |
---|
81 | -R ~/project -n Unit-Linux-CircleCI |
---|
82 | no_output_timeout: 20m # kmer_search_test is slow |
---|
83 | - run: |
---|
84 | <<: *configure |
---|
85 | environment: |
---|
86 | EXTRA_CONFIG_ARGS: --enable-code-coverage |
---|
87 | - run: |
---|
88 | <<: *build |
---|
89 | - run: |
---|
90 | name: Running Integration Tests (w/o debug) |
---|
91 | command: | |
---|
92 | cd ~/build |
---|
93 | find -name \*.gcda | xargs rm -f |
---|
94 | rm -f coverage.info |
---|
95 | make check-filtered P=^tests |
---|
96 | make code-coverage-capture |
---|
97 | bash <(curl -s https://codecov.io/bash) -X gcov -F integration \ |
---|
98 | -R ~/project -n Integration-Linux-CircleCI |
---|
99 | - run: |
---|
100 | name: Collecting binaries |
---|
101 | when: on_fail |
---|
102 | command: | |
---|
103 | tar -C ~/build -czvf $ARTIFACT_PATH/build_src.tgz src |
---|
104 | - run: |
---|
105 | name: Copying logs |
---|
106 | when: always |
---|
107 | command: | |
---|
108 | ls -la $JUNIT_REPORT_PATH |
---|
109 | mkdir -p $ARTIFACT_PATH/tests |
---|
110 | find ~/build -name \*.log -exec cp {} $ARTIFACT_PATH/tests \; |
---|
111 | - store_test_results: |
---|
112 | path: /tmp/reports |
---|
113 | - store_artifacts: |
---|
114 | path: /tmp/artifacts |
---|
115 | |
---|