mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
80 lines
2.4 KiB
YAML
80 lines
2.4 KiB
YAML
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
|
|
- run: git submodule update --init --recursive
|
|
- run: cmake -D XLNT_CXX_LANG=<< parameters.cxx-ver >> -D STATIC=<< parameters.static >> -D BENCHMARKS=<< parameters.benchmarks >> -D TESTS=ON -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:
|
|
equal: ["ON", << parameters.samples >>]
|
|
steps:
|
|
- run: ./samples/sample-decrypt
|
|
- run: ./samples/sample-img2xlsx ./samples/data/penguin.jpg img.xlsx
|
|
- run: ./samples/sample-documentation
|
|
- when:
|
|
condition:
|
|
equal: ["ON", << parameters.benchmarks >>]
|
|
steps:
|
|
- run: ./benchmarks/benchmark-styles
|
|
- run: ./benchmarks/benchmark-writer
|
|
- when:
|
|
condition:
|
|
equal: ["ON", << parameters.coverage >>]
|
|
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:
|
|
build:
|
|
jobs:
|
|
- build:
|
|
name: tests
|
|
matrix:
|
|
parameters:
|
|
cxx-ver:
|
|
- "11"
|
|
- "17"
|
|
build-type:
|
|
- Release
|
|
- Debug
|
|
static:
|
|
- "ON"
|
|
- "OFF"
|
|
- build:
|
|
name: samples-benchmarks-coverage
|
|
cxx-ver: "11"
|
|
build-type: Debug
|
|
static: "ON"
|
|
samples: "ON"
|
|
benchmarks: "ON"
|
|
coverage: "OFF"
|