2019-03-21 16:22:10 -04:00
|
|
|
executors:
|
|
|
|
e:
|
|
|
|
docker:
|
|
|
|
- image: yshui/comptonci
|
|
|
|
working_directory: "/tmp/workspace"
|
2019-03-29 17:52:15 -04:00
|
|
|
environment:
|
|
|
|
UBSAN_OPTIONS: "halt_on_error=1"
|
2018-12-16 12:51:09 -05:00
|
|
|
|
|
|
|
version: 2.1
|
2018-12-19 18:45:52 -05:00
|
|
|
commands:
|
2018-12-16 00:45:54 -05:00
|
|
|
build:
|
2018-12-16 12:51:09 -05:00
|
|
|
parameters:
|
|
|
|
build-config:
|
|
|
|
type: string
|
2019-03-27 17:11:27 -04:00
|
|
|
default: ""
|
2018-12-19 18:45:52 -05:00
|
|
|
cc:
|
|
|
|
type: string
|
|
|
|
default: cc
|
2018-12-16 11:36:15 -05:00
|
|
|
steps:
|
2018-12-16 12:51:09 -05:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- source-v1-{{ .Branch }}-{{ .Revision }}
|
|
|
|
- source-v1-{{ .Branch }}-
|
|
|
|
- source-v1-
|
2018-12-16 11:36:15 -05:00
|
|
|
- checkout
|
2018-12-16 12:51:09 -05:00
|
|
|
- save_cache:
|
|
|
|
key: source-v1-{{ .Branch }}-{{ .Revision }}
|
|
|
|
paths:
|
|
|
|
- ".git"
|
2018-12-16 11:36:15 -05:00
|
|
|
- run:
|
|
|
|
name: config
|
2019-03-21 16:22:10 -04:00
|
|
|
command: CC=<< parameters.cc >> meson << parameters.build-config >> -Dunittest=true --werror . build
|
2018-12-16 11:36:15 -05:00
|
|
|
- run:
|
|
|
|
name: build
|
2019-03-21 16:22:10 -04:00
|
|
|
command: ninja -vC build
|
2018-12-16 12:51:09 -05:00
|
|
|
test-xvfb:
|
2018-12-16 11:36:15 -05:00
|
|
|
steps:
|
|
|
|
- run:
|
2018-12-16 12:51:09 -05:00
|
|
|
name: xxx
|
|
|
|
command: xvfb-run -s "-screen 0 640x480x24" glxinfo
|
2018-12-16 11:36:15 -05:00
|
|
|
|
2018-12-19 18:45:52 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
basic:
|
2019-03-21 16:22:10 -04:00
|
|
|
executor: e
|
2018-12-19 18:45:52 -05:00
|
|
|
steps:
|
|
|
|
- build:
|
2019-03-21 18:14:53 -04:00
|
|
|
build-config: -Dbuild_docs=true -Db_coverage=true
|
2019-03-21 16:22:10 -04:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths:
|
|
|
|
- .
|
|
|
|
test:
|
|
|
|
executor: e
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: /tmp/workspace
|
|
|
|
- run:
|
2019-03-23 13:06:11 -04:00
|
|
|
name: unit test
|
|
|
|
command: ninja -vC build test
|
|
|
|
- run:
|
|
|
|
name: test config file parsing
|
|
|
|
command: xvfb-run -s "-screen 0 640x480x24" build/src/compton --config compton.sample.conf --vsync=none --diagnostics
|
2019-03-21 18:14:53 -04:00
|
|
|
- run:
|
2019-03-23 12:53:12 -04:00
|
|
|
name: generate coverage reports
|
|
|
|
command: cd build; find -name '*.gcno' -exec gcov -pb {} +
|
|
|
|
- run:
|
|
|
|
name: download codecov scripts
|
|
|
|
command: curl -s https://codecov.io/bash > codecov.sh
|
|
|
|
- run:
|
|
|
|
name: upload coverage reports
|
|
|
|
command: bash ./codecov.sh -X gcov
|
2019-03-21 18:14:53 -04:00
|
|
|
|
2018-12-19 18:45:52 -05:00
|
|
|
minimal:
|
2019-03-21 16:22:10 -04:00
|
|
|
executor: e
|
2018-12-19 18:45:52 -05:00
|
|
|
steps:
|
|
|
|
- build:
|
2019-02-09 10:52:40 -05:00
|
|
|
build-config: -Dopengl=false -Ddbus=false -Dregex=false -Dconfig_file=false
|
2018-12-19 18:45:52 -05:00
|
|
|
nogl:
|
2019-03-21 16:22:10 -04:00
|
|
|
executor: e
|
2018-12-19 18:45:52 -05:00
|
|
|
steps:
|
|
|
|
- build:
|
2019-02-09 10:52:40 -05:00
|
|
|
build-config: -Dopengl=false
|
2018-12-19 18:45:52 -05:00
|
|
|
noregex:
|
2019-03-21 16:22:10 -04:00
|
|
|
executor: e
|
2018-12-19 18:45:52 -05:00
|
|
|
steps:
|
|
|
|
- build:
|
2019-02-09 10:52:40 -05:00
|
|
|
build-config: -Dregex=false
|
2018-12-19 18:45:52 -05:00
|
|
|
clang_basic:
|
2019-03-21 16:22:10 -04:00
|
|
|
executor: e
|
2018-12-19 18:45:52 -05:00
|
|
|
steps:
|
|
|
|
- build:
|
2019-03-21 19:05:50 -04:00
|
|
|
cc: clang
|
2018-12-19 18:45:52 -05:00
|
|
|
clang_minimal:
|
2019-03-21 16:22:10 -04:00
|
|
|
executor: e
|
2018-12-19 18:45:52 -05:00
|
|
|
steps:
|
2018-12-16 12:51:09 -05:00
|
|
|
- build:
|
2019-03-21 19:05:50 -04:00
|
|
|
cc: clang
|
2019-02-09 10:52:40 -05:00
|
|
|
build-config: -Dopengl=false -Ddbus=false -Dregex=false -Dconfig_file=false
|
2018-12-19 18:45:52 -05:00
|
|
|
clang_nogl:
|
2019-03-21 16:22:10 -04:00
|
|
|
executor: e
|
2018-12-19 18:45:52 -05:00
|
|
|
steps:
|
2018-12-16 12:51:09 -05:00
|
|
|
- build:
|
2019-03-21 19:05:50 -04:00
|
|
|
cc: clang
|
2019-02-09 10:52:40 -05:00
|
|
|
build-config: -Dopengl=false
|
2018-12-19 18:45:52 -05:00
|
|
|
clang_noregex:
|
2019-03-21 16:22:10 -04:00
|
|
|
executor: e
|
2018-12-19 18:45:52 -05:00
|
|
|
steps:
|
2018-12-16 12:51:09 -05:00
|
|
|
- build:
|
2019-03-21 19:05:50 -04:00
|
|
|
cc: clang
|
2019-02-09 10:52:40 -05:00
|
|
|
build-config: -Dregex=false
|
2018-12-19 18:45:52 -05:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
all_builds:
|
|
|
|
jobs:
|
|
|
|
- basic
|
|
|
|
- clang_basic
|
|
|
|
- minimal
|
|
|
|
- clang_minimal
|
|
|
|
- nogl
|
|
|
|
- clang_nogl
|
2019-03-21 16:22:10 -04:00
|
|
|
- test:
|
|
|
|
requires:
|
|
|
|
- basic
|
2018-12-16 12:51:09 -05:00
|
|
|
# - test-xvfb
|
2018-12-19 18:45:52 -05:00
|
|
|
|
|
|
|
# vim: set sw=2 ts=8 et:
|