2019-03-22 04:22:10 +08:00
|
|
|
executors:
|
|
|
|
e:
|
|
|
|
docker:
|
|
|
|
- image: yshui/comptonci
|
|
|
|
working_directory: "/tmp/workspace"
|
2018-12-17 01:51:09 +08:00
|
|
|
|
|
|
|
version: 2.1
|
2018-12-20 07:45:52 +08:00
|
|
|
commands:
|
2018-12-16 13:45:54 +08:00
|
|
|
build:
|
2018-12-17 01:51:09 +08:00
|
|
|
parameters:
|
|
|
|
build-config:
|
|
|
|
type: string
|
2019-03-28 05:11:27 +08:00
|
|
|
default: ""
|
2018-12-20 07:45:52 +08:00
|
|
|
cc:
|
|
|
|
type: string
|
|
|
|
default: cc
|
2018-12-17 00:36:15 +08:00
|
|
|
steps:
|
2018-12-17 01:51:09 +08:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- source-v1-{{ .Branch }}-{{ .Revision }}
|
|
|
|
- source-v1-{{ .Branch }}-
|
|
|
|
- source-v1-
|
2018-12-17 00:36:15 +08:00
|
|
|
- checkout
|
2018-12-17 01:51:09 +08:00
|
|
|
- save_cache:
|
|
|
|
key: source-v1-{{ .Branch }}-{{ .Revision }}
|
|
|
|
paths:
|
|
|
|
- ".git"
|
2018-12-17 00:36:15 +08:00
|
|
|
- run:
|
|
|
|
name: config
|
2019-03-22 04:22:10 +08:00
|
|
|
command: CC=<< parameters.cc >> meson << parameters.build-config >> -Dunittest=true --werror . build
|
2018-12-17 00:36:15 +08:00
|
|
|
- run:
|
|
|
|
name: build
|
2019-03-22 04:22:10 +08:00
|
|
|
command: ninja -vC build
|
2018-12-17 01:51:09 +08:00
|
|
|
test-xvfb:
|
2018-12-17 00:36:15 +08:00
|
|
|
steps:
|
|
|
|
- run:
|
2018-12-17 01:51:09 +08:00
|
|
|
name: xxx
|
|
|
|
command: xvfb-run -s "-screen 0 640x480x24" glxinfo
|
2018-12-17 00:36:15 +08:00
|
|
|
|
2018-12-20 07:45:52 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
basic:
|
2019-03-22 04:22:10 +08:00
|
|
|
executor: e
|
2018-12-20 07:45:52 +08:00
|
|
|
steps:
|
|
|
|
- build:
|
2019-03-22 06:14:53 +08:00
|
|
|
build-config: -Dbuild_docs=true -Db_coverage=true
|
2019-03-22 04:22:10 +08:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths:
|
|
|
|
- .
|
|
|
|
test:
|
|
|
|
executor: e
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: /tmp/workspace
|
|
|
|
- run:
|
2019-03-24 01:06:11 +08: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-22 06:14:53 +08:00
|
|
|
- run:
|
2019-03-24 00:53:12 +08: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-22 06:14:53 +08:00
|
|
|
|
2018-12-20 07:45:52 +08:00
|
|
|
minimal:
|
2019-03-22 04:22:10 +08:00
|
|
|
executor: e
|
2018-12-20 07:45:52 +08:00
|
|
|
steps:
|
|
|
|
- build:
|
2019-02-09 23:52:40 +08:00
|
|
|
build-config: -Dopengl=false -Ddbus=false -Dregex=false -Dconfig_file=false
|
2018-12-20 07:45:52 +08:00
|
|
|
nogl:
|
2019-03-22 04:22:10 +08:00
|
|
|
executor: e
|
2018-12-20 07:45:52 +08:00
|
|
|
steps:
|
|
|
|
- build:
|
2019-02-09 23:52:40 +08:00
|
|
|
build-config: -Dopengl=false
|
2018-12-20 07:45:52 +08:00
|
|
|
noregex:
|
2019-03-22 04:22:10 +08:00
|
|
|
executor: e
|
2018-12-20 07:45:52 +08:00
|
|
|
steps:
|
|
|
|
- build:
|
2019-02-09 23:52:40 +08:00
|
|
|
build-config: -Dregex=false
|
2018-12-20 07:45:52 +08:00
|
|
|
clang_basic:
|
2019-03-22 04:22:10 +08:00
|
|
|
executor: e
|
2018-12-20 07:45:52 +08:00
|
|
|
steps:
|
|
|
|
- build:
|
2019-03-22 07:05:50 +08:00
|
|
|
cc: clang
|
2018-12-20 07:45:52 +08:00
|
|
|
clang_minimal:
|
2019-03-22 04:22:10 +08:00
|
|
|
executor: e
|
2018-12-20 07:45:52 +08:00
|
|
|
steps:
|
2018-12-17 01:51:09 +08:00
|
|
|
- build:
|
2019-03-22 07:05:50 +08:00
|
|
|
cc: clang
|
2019-02-09 23:52:40 +08:00
|
|
|
build-config: -Dopengl=false -Ddbus=false -Dregex=false -Dconfig_file=false
|
2018-12-20 07:45:52 +08:00
|
|
|
clang_nogl:
|
2019-03-22 04:22:10 +08:00
|
|
|
executor: e
|
2018-12-20 07:45:52 +08:00
|
|
|
steps:
|
2018-12-17 01:51:09 +08:00
|
|
|
- build:
|
2019-03-22 07:05:50 +08:00
|
|
|
cc: clang
|
2019-02-09 23:52:40 +08:00
|
|
|
build-config: -Dopengl=false
|
2018-12-20 07:45:52 +08:00
|
|
|
clang_noregex:
|
2019-03-22 04:22:10 +08:00
|
|
|
executor: e
|
2018-12-20 07:45:52 +08:00
|
|
|
steps:
|
2018-12-17 01:51:09 +08:00
|
|
|
- build:
|
2019-03-22 07:05:50 +08:00
|
|
|
cc: clang
|
2019-02-09 23:52:40 +08:00
|
|
|
build-config: -Dregex=false
|
2018-12-20 07:45:52 +08:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
all_builds:
|
|
|
|
jobs:
|
|
|
|
- basic
|
|
|
|
- clang_basic
|
|
|
|
- minimal
|
|
|
|
- clang_minimal
|
|
|
|
- nogl
|
|
|
|
- clang_nogl
|
2019-03-22 04:22:10 +08:00
|
|
|
- test:
|
|
|
|
requires:
|
|
|
|
- basic
|
2018-12-17 01:51:09 +08:00
|
|
|
# - test-xvfb
|
2018-12-20 07:45:52 +08:00
|
|
|
|
|
|
|
# vim: set sw=2 ts=8 et:
|