terminology/.circleci/config.yml

86 lines
2.2 KiB
YAML
Raw Normal View History

2018-12-22 06:46:20 -08:00
version: 2
2018-12-22 14:42:26 -08:00
2018-12-22 06:46:20 -08:00
jobs:
2018-12-22 14:42:26 -08:00
checkout_code:
2018-12-22 06:46:20 -08:00
docker:
2018-12-22 14:42:26 -08:00
- image: borisfaure/terminology-ci:latest
2018-12-22 06:46:20 -08:00
steps:
- run: |
cd /terminology
git pull --ff-only
if [ -n "$CIRCLE_PR_NUMBER" ]; then
git fetch origin pull/$CIRCLE_PR_NUMBER/head
fi
if [ -n "$CIRCLE_SHA1" ]; then
git reset --hard $CIRCLE_SHA1
2018-12-23 02:21:19 -08:00
else
git reset --hard origin/master
2018-12-22 06:46:20 -08:00
fi
2018-12-22 14:42:26 -08:00
- save_cache:
2018-12-23 02:12:08 -08:00
key: checkout-{{ .Environment.CIRCLE_SHA1 }}
2018-12-22 14:42:26 -08:00
paths:
- /terminology
build_gcc:
docker:
- image: borisfaure/terminology-ci:latest
steps:
- restore_cache:
2018-12-23 02:12:08 -08:00
key: checkout-{{ .Environment.CIRCLE_SHA1 }}
2018-12-22 14:42:26 -08:00
- run: |
cd /terminology
2018-12-23 02:12:08 -08:00
meson -Dtests=true -Dfuzzing=true -Db_coverage=true . build
2018-12-22 14:42:26 -08:00
meson configure build
cd build
ninja
2018-12-23 02:12:08 -08:00
- save_cache:
key: build_gcc-{{ .Environment.CIRCLE_SHA1 }}
paths:
- /terminology
tests_gcc:
docker:
- image: borisfaure/terminology-ci:latest
steps:
- restore_cache:
key: build_gcc-{{ .Environment.CIRCLE_SHA1 }}
- run: |
cd /terminology
tests/run_tests.sh -v -t build/src/bin/tytest -r tests/tests.results -d tests/
2018-12-23 02:57:37 -08:00
- run: |
cd /terminology/build/
cd src/bin
rm -fr *@@terminology@exe *@@tyalpha@exe *@@tybg@exe *@@tycat@exe
rm -fr *@@tyfuzz@exe *@@tyls@exe *@@typop@exe *@@tyq@exe
rm -fr *@@tysend@exe
2018-12-23 02:57:37 -08:00
cd /terminology/build/
bash <(curl -s https://codecov.io/bash)
2018-12-22 14:42:26 -08:00
build_clang:
docker:
- image: borisfaure/terminology-ci:latest
environment:
- CC: clang
steps:
- restore_cache:
2018-12-23 02:12:08 -08:00
key: checkout-{{ .Environment.CIRCLE_SHA1 }}
2018-12-22 06:46:20 -08:00
- run: |
cd /terminology
2018-12-23 02:12:08 -08:00
meson -Dtests=true -Dfuzzing=true . build
2018-12-22 06:46:20 -08:00
meson configure build
cd build
ninja
path: /terminology
2018-12-22 14:42:26 -08:00
workflows:
version: 2
build-and-deploy:
jobs:
- checkout_code
- build_gcc:
requires:
- checkout_code
2018-12-23 02:12:08 -08:00
- tests_gcc:
requires:
- build_gcc
2018-12-22 14:42:26 -08:00
- build_clang:
requires:
- checkout_code