terminology/.circleci/config.yml

62 lines
1.4 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:
key: ty-{{ .Environment.CIRCLE_SHA1 }}
paths:
- /terminology
build_gcc:
docker:
- image: borisfaure/terminology-ci:latest
steps:
- restore_cache:
key: ty-{{ .Environment.CIRCLE_SHA1 }}
- run: |
cd /terminology
meson . build
meson configure build
cd build
ninja
build_clang:
docker:
- image: borisfaure/terminology-ci:latest
environment:
- CC: clang
steps:
- restore_cache:
key: ty-{{ .Environment.CIRCLE_SHA1 }}
2018-12-22 06:46:20 -08:00
- run: |
cd /terminology
meson . build
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
- build_clang:
requires:
- checkout_code