Skip to content

Commit

Permalink
chore: Disable unity build in CI for AppleClang and GCC11 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Tradias committed Sep 9, 2024
1 parent 5d4e332 commit 553ce0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
os: macos-13,
triplet: 'x64-osx-release',
build-type: 'Debug',
cmake-extra-args: '-DCMAKE_BUILD_TYPE=Debug -DVCPKG_TARGET_TRIPLET=x64-osx-release -DASIO_GRPC_HAS_STD_PMR=off',
cmake-extra-args: '-DCMAKE_BUILD_TYPE=Debug -DVCPKG_TARGET_TRIPLET=x64-osx-release -DASIO_GRPC_HAS_STD_PMR=off -DCMAKE_UNITY_BUILD=off',
parallel: 4,
}

Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
run: ${{ env.VCPKG_ROOT }}/vcpkg install --recurse --clean-after-build --triplet ${{ env.TRIPLET }} --host-triplet ${{ env.TRIPLET }} --x-install-root=${{ runner.workspace }}/vcpkg_installed --overlay-ports=${{ github.workspace }}/deps --overlay-triplets=${{ github.workspace }}/.github/vcpkg

- name: GCC 11 Configure CMake
run: cmake --preset default -B ${{ github.workspace }}/build-11 -DCMAKE_CXX_COMPILER=$(which g++-11) -DASIO_GRPC_ENABLE_CMAKE_INSTALL_TEST=off -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DASIO_GRPC_TEST_COVERAGE=on -DASIO_GRPC_GCOV_PROGRAM=$(which gcov-11) -DASIO_GRPC_COVERAGE_OUTPUT_FILE=${{ github.workspace }}/build-11/sonarqube-coverage.xml -DVCPKG_INSTALLED_DIR=${{ runner.workspace }}/vcpkg_installed ${{ env.CMAKE_EXTRA_ARGS }} ${{ env.CMAKE_ARGS }} -DCMAKE_BUILD_TYPE=Debug -DDCMAKE_UNITY_BUILD=off
run: cmake --preset default -B ${{ github.workspace }}/build-11 -DCMAKE_CXX_COMPILER=$(which g++-11) -DASIO_GRPC_ENABLE_CMAKE_INSTALL_TEST=off -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DASIO_GRPC_TEST_COVERAGE=on -DASIO_GRPC_GCOV_PROGRAM=$(which gcov-11) -DASIO_GRPC_COVERAGE_OUTPUT_FILE=${{ github.workspace }}/build-11/sonarqube-coverage.xml -DVCPKG_INSTALLED_DIR=${{ runner.workspace }}/vcpkg_installed ${{ env.CMAKE_EXTRA_ARGS }} ${{ env.CMAKE_ARGS }} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_UNITY_BUILD=off

- name: GCC 11 Build
run: cmake --build ${{ github.workspace }}/build-11 --config Debug --parallel $(nproc)
Expand Down
6 changes: 3 additions & 3 deletions test/utils/utils/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ void set_up_unary_test(MockTest& test)
});
EXPECT_CALL(test.stub, PrepareAsyncUnaryRaw)
.WillOnce(
[reader = std::make_shared<decltype(mock_reader)>(std::move(mock_reader))]
[reader = std::move(mock_reader)](auto&&...)

Check failure on line 33 in test/utils/utils/test.cpp

View workflow job for this annotation

GitHub Actions / Ubuntu/20.04/Default

use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = testing::NiceMock<test::MockClientAsyncResponseReader>; _Dp = std::default_delete<testing::NiceMock<test::MockClientAsyncResponseReader> >]’

Check failure on line 33 in test/utils/utils/test.cpp

View workflow job for this annotation

GitHub Actions / Ubuntu/20.04/Default

use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = testing::NiceMock<test::MockClientAsyncResponseReader>; _Dp = std::default_delete<testing::NiceMock<test::MockClientAsyncResponseReader> >]’

Check failure on line 33 in test/utils/utils/test.cpp

View workflow job for this annotation

GitHub Actions / Ubuntu/20.04/Default

use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = testing::NiceMock<test::MockClientAsyncResponseReader>; _Dp = std::default_delete<testing::NiceMock<test::MockClientAsyncResponseReader> >]’

Check failure on line 33 in test/utils/utils/test.cpp

View workflow job for this annotation

GitHub Actions / Ubuntu/20.04/Default

use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = testing::NiceMock<test::MockClientAsyncResponseReader>; _Dp = std::default_delete<testing::NiceMock<test::MockClientAsyncResponseReader> >]’
{
// GRPC wraps the return value into a unique_ptr with a specialized std::default_delete that does
// nothing
return reader->get();
return reader.get();
});
}

void set_up_server_streaming_test(MockTest& test)
{
EXPECT_CALL(test.stub, PrepareAsyncServerStreamingRaw)
.WillOnce(
[&]
[&](auto&&...)
{
auto mock_reader = std::make_unique<testing::NiceMock<MockClientAsyncReader>>();
EXPECT_CALL(*mock_reader, Read)
Expand Down

0 comments on commit 553ce0a

Please sign in to comment.