Skip to content

Commit 06e4f51

Browse files
committed
commented out failing coverall task
1 parent b99b4c2 commit 06e4f51

File tree

3 files changed

+90
-17
lines changed

3 files changed

+90
-17
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Build and test (cmake based build)
2+
3+
#on: push
4+
on:
5+
push:
6+
branches: [ "master" ]
7+
pull_request:
8+
branches: [ "master" ]
9+
10+
env:
11+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
12+
BUILD_TYPE: Release
13+
14+
jobs:
15+
build:
16+
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
17+
# You can convert this to a matrix build if you need cross-platform coverage.
18+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: true
22+
matrix:
23+
os: [ ubuntu-latest, ubuntu-20.04,
24+
macos-latest, macos-11,
25+
windows-latest
26+
]
27+
# ubuntu-18.04 does not work due to compile error on asio
28+
# windows-2019 not included to spare free minutes
29+
steps:
30+
- uses: actions/checkout@v3
31+
- name: Prepare dependencies
32+
run: |
33+
if [ "$RUNNER_OS" == "Linux" ]; then
34+
sudo apt-get update && \
35+
sudo apt-get install -yq \
36+
libasio-dev \
37+
cmake
38+
elif [ "$RUNNER_OS" == "Windows" ]; then
39+
VCPKG_DEFAULT_TRIPLET=x64-windows vcpkg install
40+
elif [ "$RUNNER_OS" == "macOS" ]; then
41+
brew install asio
42+
else
43+
echo "$RUNNER_OS not supported"
44+
exit 1
45+
fi
46+
shell: bash
47+
48+
- name: Configure CMake
49+
run: |
50+
if [ "$RUNNER_OS" == "Windows" ]; then
51+
cmake -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -B build
52+
else
53+
cmake -B build
54+
fi
55+
shell: bash
56+
- name: Build
57+
# Build your program with the given configuration
58+
run: cmake --build build --config ${{env.BUILD_TYPE}}
59+
shell: bash
60+
61+
- name: Test
62+
working-directory: ${{github.workspace}}/build
63+
# Execute tests defined by the CMake configuration.
64+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
65+
run: ctest --output-on-failure -C ${{env.BUILD_TYPE}}
66+
67+
#- name: Package
68+
# working-directory: ${{github.workspace}}/build
69+
# run: |
70+
# cmake --build . --target ALL_BUILD && \
71+
# cmake --build . --target doc && \
72+
# cmake --build . --target package && \
73+
# cpack --config CPackSourceConfig.cmake

.github/workflows/build_and_test.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010
env:
1111
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
1212
BUILD_TYPE: Release
13-
COVERALLS_PULL_REQUEST: ${{ github.event.number }}
14-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
13+
#COVERALLS_PULL_REQUEST: ${{ github.event.number }}
14+
#COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
1515

1616
jobs:
1717
build:
@@ -70,18 +70,18 @@ jobs:
7070
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
7171
run: ctest --output-on-failure -C ${{env.BUILD_TYPE}}
7272

73-
- name: Coverage Report
74-
if: matrix.os == 'ubuntu-latest'
75-
run: |
76-
export CI_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
77-
echo "CI_BRANCH=$CI_BRANCH" >> $GITHUB_ENV && \
78-
export TRAVIS_JOB_ID=$GITHUB_RUN_NUMBER && \
79-
git clone https://github.com/CrowCpp/cpp-coveralls.git && \
80-
cd cpp-coveralls && \
81-
pip3 install . --no-input && \
82-
cd .. && \
83-
coveralls --verbose --exclude-pattern .*/http_parser_merged.h --exclude-pattern .*/TinySHA1.hpp
84-
shell: bash
73+
#- name: Coverage Report
74+
# if: matrix.os == 'ubuntu-latest'
75+
# run: |
76+
# export CI_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
77+
# echo "CI_BRANCH=$CI_BRANCH" >> $GITHUB_ENV && \
78+
# export TRAVIS_JOB_ID=$GITHUB_RUN_NUMBER && \
79+
# git clone https://github.com/CrowCpp/cpp-coveralls.git && \
80+
# cd cpp-coveralls && \
81+
# pip3 install . --no-input && \
82+
# cd .. && \
83+
# coveralls --verbose --exclude-pattern .*/http_parser_merged.h --exclude-pattern .*/TinySHA1.hpp
84+
# shell: bash
8585

8686
#- name: Package
8787
# working-directory: ${{github.workspace}}/build

examples/example_with_all.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ int main()
3333

3434
CROW_ROUTE(app, "/json-initializer-list-constructor")
3535
([] {
36-
crow::json::wvalue r({
36+
crow::json::wvalue r({
3737
{"first", "Hello world!"}, /* stores a char const* hence a json::type::String */
3838
{"second", std::string("How are you today?")}, /* stores a std::string hence a json::type::String. */
3939
{"third", 54}, /* stores an int (as 54 is an int literal) hence a std::int64_t. */
40-
{"fourth", 54l}, /* stores a long (as 54l is a long literal) hence a std::int64_t. */
40+
{"fourth", (int64_t)54l}, /* stores a long (as 54l is a long literal) hence a std::int64_t. */
4141
{"fifth", 54u}, /* stores an unsigned int (as 54u is a unsigned int literal) hence a std::uint64_t. */
42-
{"sixth", 54ul}, /* stores an unsigned long (as 54ul is an unsigned long literal) hence a std::uint64_t. */
42+
{"sixth", (uint64_t)54ul}, /* stores an unsigned long (as 54ul is an unsigned long literal) hence a std::uint64_t. */
4343
{"seventh", 2.f}, /* stores a float (as 2.f is a float literal) hence a double. */
4444
{"eighth", 2.}, /* stores a double (as 2. is a double literal) hence a double. */
4545
{"ninth", nullptr}, /* stores a std::nullptr hence json::type::Null . */

0 commit comments

Comments
 (0)