xlnt/.circleci/config.yml

80 lines
2.4 KiB
YAML
Raw Normal View History

2021-01-03 01:32:51 +08:00
version: 2.1
jobs:
build:
docker:
- image: lycantropos/cmake:3.9.5
parameters:
benchmarks:
default: "OFF"
type: string
build-type:
default: Release
type: string
coverage:
default: "OFF"
type: string
cxx-ver:
default: "11"
type: string
samples:
default: "OFF"
type: string
static:
default: "ON"
type: string
steps:
- checkout
2021-02-21 10:34:24 +08:00
- run: git submodule update --init --recursive
2021-01-03 01:32:51 +08:00
- run: cmake -D XLNT_CXX_LANG=<< parameters.cxx-ver >> -D STATIC=<< parameters.static >> -D BENCHMARKS=<< parameters.benchmarks >> -D SAMPLES=<< parameters.samples >> -D COVERAGE=<< parameters.coverage >> -D CMAKE_BUILD_TYPE=<< parameters.build-type >> .
- run: cmake --build . -- -j2
- run: ./tests/xlnt.test
- when:
condition:
2021-02-21 10:33:30 +08:00
equal: ["ON", << parameters.samples >>]
2021-01-03 01:32:51 +08:00
steps:
- run: ./samples/sample-decrypt
2021-01-03 01:49:36 +08:00
- run: ./samples/sample-img2xlsx ./samples/data/penguin.jpg img.xlsx
2021-01-03 01:32:51 +08:00
- run: ./samples/sample-documentation
- when:
condition:
2021-02-21 10:33:30 +08:00
equal: ["ON", << parameters.benchmarks >>]
2021-01-03 01:32:51 +08:00
steps:
- run: ./benchmarks/benchmark-styles
- run: ./benchmarks/benchmark-writer
- when:
condition:
2021-02-21 10:33:30 +08:00
equal: ["ON", << parameters.coverage >>]
2021-01-03 01:32:51 +08:00
steps:
- run: lcov --directory source/CMakeFiles/xlnt.dir --capture --output-file coverage.info --base-directory ../source --no-external --gcov-tool /usr/bin/gcov-6
- run: lcov --output-file coverage.info --remove coverage.info source/detail/serialization/miniz.cpp
- run: i=$(dirname $(pwd))
- run: sed -i "s|$i/||" coverage.info
- run: cd ..
- run: coveralls-lcov build/coverage.info
workflows:
2021-01-03 01:49:36 +08:00
build:
2021-01-03 01:32:51 +08:00
jobs:
- build:
2021-01-03 01:49:36 +08:00
name: tests
2021-01-03 01:32:51 +08:00
matrix:
parameters:
cxx-ver:
- "11"
- "17"
build-type:
- Release
- Debug
static:
- "ON"
- "OFF"
- build:
2021-01-03 01:49:36 +08:00
name: samples-benchmarks-coverage
2021-01-03 01:32:51 +08:00
cxx-ver: "11"
build-type: Debug
static: "ON"
samples: "ON"
benchmarks: "ON"
coverage: "OFF"