mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge branch 'dd_pr_circle2'. Migrate to CircleCI 2.0
This commit is contained in:
commit
3e493bf18e
79
.circleci/config.yml
Normal file
79
.circleci/config.yml
Normal 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
|
50
circle.yml
50
circle.yml
|
@ -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.*
|
Loading…
Reference in a new issue