Skip to content

Commit

Permalink
Better CircleCI setup with dedicated jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHelmut committed Aug 1, 2021
1 parent 51ae92c commit 0817a3c
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 9 deletions.
37 changes: 32 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,44 @@
version: 2.1

executors:
default:
docker:
- image: "krieselreihe/docker-cpp-cmake:1.0.0"

jobs:
build:
docker:
- image: "krieselreihe/docker-cpp-cmake:0.1.0"
executor: default
steps:
- checkout
- run:
name: Create build files
command: 'cmake -DCMAKE_BUILD_TYPE=Release -B build'
command: |
cmake -DCMAKE_BUILD_TYPE=Release -B build
- run:
name: Build application
command: 'cmake --build build'
command: |
cmake --build build
- persist_to_workspace:
root: .
paths: ['build']
test:
executor: default
steps:
- attach_workspace:
at: .
- run:
name: Unit testing
command: 'cd build/src/tests && CTEST_OUTPUT_ON_FAILURE=TRUE ctest'
command: |
cd build/src/tests
CTEST_OUTPUT_ON_FAILURE=TRUE ctest --output-junit ctest-report.xml
- store_test_results:
path: build/src

workflows:
version: 2
build-and-test:
jobs:
- build
- test:
requires:
- build
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ You want to contribute to this repo? Nice! And of course: **you are the best!**

**Build status:**

[![CircleCI](https://circleci.com/gh/krieselreihe/litr/tree/main.svg?style=svg)](https://circleci.com/gh/krieselreihe/litr/tree/main)
[![CircleCI](https://circleci.com/gh/krieselreihe/litr/tree/main.svg?style=shield)](https://circleci.com/gh/krieselreihe/litr/tree/main)

## Contents

Expand Down
2 changes: 1 addition & 1 deletion cmake/CompilerWarnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function(set_project_warnings project_name)
set(GCC_WARNINGS
${CLANG_WARNINGS}
-Wmisleading-indentation # warn if indentation implies blocks where blocks
# Currently not supported in CI
# @todo: Currently not supported in CI due to an old gcc version.
# -Wduplicated-branches # warn if if / else branches have duplicated code
# -Wduplicated-cond # warn if if / else chain has duplicated conditions
# -Wlogical-op # warn about logical operations being used where bitwise were
Expand Down
3 changes: 2 additions & 1 deletion src/tests/Tests/Core/Config/Query.int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ TEST_SUITE("Config::Query") {
CHECK(params.size() == 0);
}

// @todo: Figure out why this fails in CI
// @todo: Figure out why this fails in CI. Maybe related to the used
// version of gcc.
// "ERROR: test case THREW exception: Unexpected index"
// https://github.com/krieselreihe/litr/issues/42
// SUBCASE("Get parameters used by command") {
Expand Down
2 changes: 1 addition & 1 deletion vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add_subdirectory(fmt)
FetchContent_Declare(
spdlog
GIT_REPOSITORY "https://github.com/gabime/spdlog.git"
GIT_TAG 61ed2a670e40e9a865edc20b088422a469bdab9e # 1.9.0
GIT_TAG 5b4c4f3f770acbd25400d866f3fc2fdf669d5b7e # 1.9.1
)
add_subdirectory(spdlog)

Expand Down

0 comments on commit 0817a3c

Please sign in to comment.