terminology/.circleci/config.yml

62 lines
1.4 KiB
YAML

version: 2
jobs:
checkout_code:
docker:
- image: borisfaure/terminology-ci:latest
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
else
git reset --hard origin/master
fi
- 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 }}
- run: |
cd /terminology
meson . build
meson configure build
cd build
ninja
path: /terminology
workflows:
version: 2
build-and-deploy:
jobs:
- checkout_code
- build_gcc:
requires:
- checkout_code
- build_clang:
requires:
- checkout_code