Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ jobs:
CMAKE_LIBRARY_PATH="${BASE}/build" GTEST_ROOT="${BASE}/usr" CMAKE_PREFIX_PATH="${BASE}/usr/gcc/lib64/cmake" cmake -DMSGPACK_32BIT=OFF -DBUILD_SHARED_LIBS=ON -DMSGPACK_CHAR_SIGN=signed -DMSGPACK_BUILD_EXAMPLES=ON -DMSGPACK_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DMSGPACK_GEN_COVERAGE=ON ..
make -j4
make test
- name: Upload coverage to Codecov
working-directory: build
- name: Generate coverage
run: |
# Create lcov report
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter system-files
lcov --list coverage.info # debug info
# Uploading report to CodeCov
bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: build/coverage.info
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
===================

Version 6.1.0 [![Build Status](https://github.com/msgpack/msgpack-c/workflows/CI/badge.svg?branch=c_master)](https://github.com/msgpack/msgpack-c/actions) [![Build status](https://ci.appveyor.com/api/projects/status/8kstcgt79qj123mw/branch/c_master?svg=true)](https://ci.appveyor.com/project/redboltz/msgpack-c/branch/c_master)
[![codecov](https://codecov.io/gh/msgpack/msgpack-c/branch/c_master/graph/badge.svg)](https://codecov.io/gh/msgpack/msgpack-c/branch/c_master)
[![codecov](https://codecov.io/gh/msgpack/msgpack-c/branch/c_master/graph/badge.svg)](https://app.codecov.io/gh/msgpack/msgpack-c/tree/c_master)

It's like JSON but smaller and faster.

Expand Down
6 changes: 1 addition & 5 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ comment:

ignore:
- "test"
- "fuzz"
- "erb"
- "ci"
- "cmake"
- "examle"
- "external"
- "usr"
- "example"
10 changes: 5 additions & 5 deletions test/msgpack_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1688,17 +1688,17 @@ TEST(MSGPACKC, init_msgpack_obj_ext) {
EXPECT_STREQ(buffer, obj.via.ext.ptr);
}

#define BUFFER_SIZE 4
TEST(MSGPACKC, init_msgpack_obj_array) {
msgpack_object obj;
char buffer[][7] = {"test_1", "test_2", "test_3", "test_4"};
uint32_t buffer_size = 4;
msgpack_object array[buffer_size];
for(size_t i = 0; i < buffer_size; i++) {
msgpack_object array[BUFFER_SIZE];
for(size_t i = 0; i < BUFFER_SIZE; i++) {
msgpack_object_init_str(&array[i], buffer[i], (uint32_t)strlen(buffer[i]));
}
msgpack_object_init_array(&obj, array, buffer_size);
msgpack_object_init_array(&obj, array, BUFFER_SIZE);
EXPECT_EQ(MSGPACK_OBJECT_ARRAY, obj.type);
for(size_t i = 0; i < buffer_size; i++) {
for(size_t i = 0; i < BUFFER_SIZE; i++) {
EXPECT_STREQ(buffer[i], obj.via.array.ptr[i].via.str.ptr);
}
}
Expand Down
Loading