2018-08-10 15:59:56 +00:00
|
|
|
version: 2
|
|
|
|
defaults: &defaults
|
|
|
|
working_directory: ~/ddnet/ddnet
|
|
|
|
docker:
|
2018-08-10 16:10:15 +00:00
|
|
|
- image: learath2/ddnet-env:v1
|
2018-08-10 15:59:56 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
pre_test:
|
|
|
|
<<: *defaults
|
|
|
|
parallelism: 1
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run: python scripts/check_header_guards.py
|
|
|
|
|
|
|
|
build:
|
|
|
|
<<: *defaults
|
|
|
|
parallelism: 1
|
|
|
|
#environment:
|
|
|
|
#CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
|
|
|
|
#CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
#- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
|
|
|
|
- run: git submodule update --init
|
|
|
|
|
|
|
|
# Compile
|
|
|
|
- run: python scripts/check_header_guards.py
|
|
|
|
- run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
env CFLAGS="-Wdeclaration-after-statement -Werror" CXXFLAGS="-Werror" cmake -DDOWNLOAD_GTEST=ON ..
|
|
|
|
make everything
|
|
|
|
|
|
|
|
- persist-to-workspace:
|
|
|
|
root: ./
|
|
|
|
paths: ./*
|
|
|
|
|
|
|
|
test:
|
|
|
|
<<: *defaults
|
|
|
|
steps:
|
|
|
|
- attach-workspace:
|
|
|
|
at: ./
|
|
|
|
|
|
|
|
- run: |
|
|
|
|
cd build
|
|
|
|
make run_tests
|
|
|
|
./DDNet-Server shutdown
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build_and_test:
|
|
|
|
jobs:
|
|
|
|
- pre_test
|
|
|
|
- build:
|
|
|
|
requires:
|
|
|
|
- pre_test
|
|
|
|
- test:
|
|
|
|
requires:
|
|
|
|
- build
|