48 lines
1.8 KiB
YAML
48 lines
1.8 KiB
YAML
version: 0.2
|
|
|
|
env:
|
|
variables:
|
|
# CodeBuild console doesn't display color codes correctly
|
|
TESTPL_COLOR_OUTPUT: 0
|
|
|
|
phases:
|
|
install:
|
|
runtime-versions:
|
|
java: openjdk8
|
|
commands:
|
|
- sed -i 's#/archive.ubuntu.com#/us-east-1.ec2.archive.ubuntu.com#g' /etc/apt/sources.list
|
|
- apt-get update -y
|
|
- apt-get install -y flex bison make git libwww-perl patch ccache libc6-dev-i386 jq gdb lcov curl
|
|
build:
|
|
commands:
|
|
- echo Build started on `date`
|
|
- make -C src minisat2-download
|
|
- make -C jbmc/src setup-submodules
|
|
- make -C src CXX="ccache g++" -j2 CPROVER_WITH_PROFILING=1
|
|
- make -C unit CXX="ccache g++" -j2 CPROVER_WITH_PROFILING=1
|
|
- make -C jbmc/src CXX="ccache g++" -j2 CPROVER_WITH_PROFILING=1
|
|
- make -C jbmc/unit CXX="ccache g++" -j2 CPROVER_WITH_PROFILING=1
|
|
- echo Build completed on `date`
|
|
post_build:
|
|
commands:
|
|
# codecov script creation
|
|
# If $CODEBUILD_SOURCE_VERSION starts with 'pr/', filter out pr number, if not, return empty
|
|
- VCS_PULL_REQUEST=$(echo $CODEBUILD_SOURCE_VERSION | sed '/^pr\//!d;s/^pr\///')
|
|
# If $CODEBUILD_SOURCE_VERSION is commit id, set $VCS_COMMIT_ID
|
|
- VCS_COMMIT_ID=$(echo $CODEBUILD_SOURCE_VERSION | sed -r '/^[a-z0-9]{40}$/!d')
|
|
- COV_SCRIPT=/root/.cache/codecov.sh
|
|
- if [ ! -f "$COV_SCRIPT" ]; then curl -s https://codecov.io/bash > "$COV_SCRIPT"; fi
|
|
# Run unit test
|
|
- scripts/run_test_upload_cov_report.sh unit
|
|
# Run regression tests
|
|
- scripts/run_test_upload_cov_report.sh regression
|
|
# Run regression/cbmc tests with test-cprover-smt2
|
|
- scripts/run_test_upload_cov_report.sh cproversmt2
|
|
|
|
cache:
|
|
paths:
|
|
- '/var/cache/apt/**/*'
|
|
- '/var/lib/apt/lists/**/*'
|
|
- '/root/.ccache/**/*'
|
|
- '/root/.cache/codecov.sh'
|