ddnet/.circleci/config.yml

104 lines
2.4 KiB
YAML
Raw Normal View History

2018-08-10 15:59:56 +00:00
version: 2
defaults: &defaults
working_directory: ~/ddnet/ddnet
docker:
- image: buildpack-deps:stretch
2018-08-10 15:59:56 +00:00
2018-08-15 13:06:33 +00:00
defignore: &defignore
filters:
branches:
ignore:
- /.*\.tmp/
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
- 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
2018-08-10 15:59:56 +00:00
# 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
2019-03-19 22:36:59 +00:00
make package_default
mkdir -p /tmp/artifacts
cp DDNet-*-linux_x86_64.tar.xz /tmp/artifacts
2018-10-02 00:17:34 +00:00
- run: |
mkdir noautoupdate
cd noautoupdate
2018-10-02 00:17:34 +00:00
env CFLAGS="-Wdeclaration-after-statement -Werror" CXXFLAGS="-Werror" cmake -DAUTOUPDATE=OFF -DDOWNLOAD_GTEST=ON ..
make everything
2018-08-10 15:59:56 +00:00
2019-03-19 22:36:59 +00:00
- store_artifacts:
path: /tmp/artifacts
2018-08-10 15:59:56 +00:00
- persist-to-workspace:
root: ./
paths: ./*
test:
<<: *defaults
steps:
- attach-workspace:
at: ./
- run: |
apt-get update
apt-get install -y make cmake xz-utils
2018-08-10 15:59:56 +00:00
- run: |
cd build
make run_tests
./DDNet-Server shutdown
2018-10-02 00:17:34 +00:00
- run: |
cd noautoupdate
2018-10-02 00:17:34 +00:00
make run_tests
2018-08-10 15:59:56 +00:00
workflows:
version: 2
build_and_test:
jobs:
2018-08-15 13:06:33 +00:00
- pre_test:
<<: *defignore
2018-08-10 15:59:56 +00:00
- build:
2018-08-15 13:06:33 +00:00
<<: *defignore
2018-08-10 15:59:56 +00:00
requires:
- pre_test
- test:
2018-08-15 13:06:33 +00:00
<<: *defignore
2018-08-10 15:59:56 +00:00
requires:
- build