Skip to content

Commit dcf9705

Browse files
committed
Add AWS CodeBuild spec to run codecov
1 parent 7734b53 commit dcf9705

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

buildspec-linux-make-gcc-cov.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
# CodeBuild console doesn't display color codes correctly
6+
TESTPL_COLOR_OUTPUT: 0
7+
8+
phases:
9+
install:
10+
runtime-versions:
11+
java: openjdk8
12+
commands:
13+
- sed -i 's#/archive.ubuntu.com#/us-east-1.ec2.archive.ubuntu.com#g' /etc/apt/sources.list
14+
- apt-get update -y
15+
- apt-get install -y flex bison make git libwww-perl patch ccache libc6-dev-i386 jq gdb lcov curl python-pip
16+
- pip install codecov
17+
build:
18+
commands:
19+
- echo Build started on `date`
20+
- make -C src minisat2-download
21+
- make -C jbmc/src setup-submodules
22+
- make -C src CXX="ccache g++" -j2 CPROVER_WITH_PROFILING=1
23+
- make -C unit CXX="ccache g++" -j2 CPROVER_WITH_PROFILING=1
24+
- make -C jbmc/src CXX="ccache g++" -j2 CPROVER_WITH_PROFILING=1
25+
- make -C jbmc/unit CXX="ccache g++" -j2 CPROVER_WITH_PROFILING=1
26+
post_build:
27+
commands:
28+
- make -C unit test
29+
- make -C regression test CPROVER_WITH_PROFILING=1
30+
- make -C regression/cbmc test-paths-lifo
31+
- env PATH=$PATH:`pwd`/src/solvers make -C regression/cbmc test-cprover-smt2
32+
- make -C jbmc/unit test
33+
- make -C jbmc/regression test
34+
- lcov --capture --directory . --output-file ./lcov.info
35+
- VCS_PULL_REQUEST=$(echo $CODEBUILD_SOURCE_VERSION | sed 's/pr\///g')
36+
- COV_SCRIPT=/root/.cache/codecov.sh
37+
- if [ ! -f "$COV_SCRIPT" ]; then curl -s https://codecov.io/bash > "$COV_SCRIPT"; fi
38+
- echo "$CODEBUILD_INITIATOR" | grep GitHub && bash "$COV_SCRIPT" -t "$CODECOV_TOKEN" || true
39+
- echo Build completed on `date`
40+
cache:
41+
paths:
42+
- '/var/cache/apt/**/*'
43+
- '/var/lib/apt/lists/**/*'
44+
- '/root/.ccache/**/*'
45+
- '/root/.cache/codecov.sh'
46+

0 commit comments

Comments
 (0)