Merge branch 'dd_pr_circle2'. Migrate to CircleCI 2.0

This commit is contained in:
Learath 2018-08-15 15:55:52 +03:00
commit 3e493bf18e
2 changed files with 79 additions and 50 deletions

79
.circleci/config.yml Normal file
View file

@ -0,0 +1,79 @@
version: 2
defaults: &defaults
working_directory: ~/ddnet/ddnet
docker:
- image: buildpack-deps:stretch
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
- run: |
apt-get update
apt-get install -y build-essential \
python3 \
libcurl4-openssl-dev \
libfreetype6-dev \
libsdl2-dev \
libglew-dev \
libogg-dev \
libopus-dev \
libpnglite-dev \
libopusfile-dev \
libwavpack-dev
apt-get install -y cmake xz-utils
# 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: |
apt-get update
apt-get install -y make cmake xz-utils
- 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

View file

@ -1,50 +0,0 @@
dependencies:
override:
- |
sudo add-apt-repository -y ppa:zoogie/sdl2-snapshots
sudo apt-get update
sudo apt-get build-dep teeworlds
sudo apt-get install cmake libsdl2-dev xz-utils
checkout:
post:
- git submodule update --init
## Customize test commands
compile:
override:
- python scripts/check_header_guards.py
- |
mkdir build
cd build
env CFLAGS="-Wdeclaration-after-statement -Werror" CXXFLAGS="-Werror" cmake -DDOWNLOAD_GTEST=ON ..
make everything
test:
override:
- |
cd build
make run_tests
./DDNet-Server shutdown
- |
cd build
make package
mv DDNet-*.tar.* ${CIRCLE_ARTIFACTS}
branches:
ignore:
- staging.tmp
- testing.tmp
##
##deployment:
## master:
## branch: master
## owner: ddnet
## commands:
## - |
## cd build
## make package
## mv DDNet-*.tar.*