Skip to content

Commit

Permalink
Fix missing Werror in build-fast workflow (celeritas-project#1141)
Browse files Browse the repository at this point in the history
* Reapply "Fix missing Werror in build-fast workflow"

* Silence warning

* Try to make gcc happy
  • Loading branch information
sethrj committed Mar 5, 2024
1 parent fcc0a89 commit 18f4ae6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX="${{github.workspace}}/install" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Wno-error=deprecated-declarations" \
-DCMAKE_CXX_FLAGS="-Werror -Wall -Wextra -pedantic -Wno-error=deprecated-declarations" \
..
- name: Build all
working-directory: build
Expand Down
5 changes: 3 additions & 2 deletions test/corecel/data/DeviceAllocation.test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,16 @@ TEST(DeviceAllocationTest, TEST_IF_CELER_DEVICE(device))
EXPECT_EQ(orig_other, alloc.device_ref().data());
EXPECT_EQ(orig_alloc, other.device_ref().data());
}
EXPECT_EQ(128, alloc.size());

std::vector<std::byte> data(alloc.size());
ASSERT_EQ(128, data.size());

data.front() = std::byte(1);
data.back() = std::byte(127);

alloc.copy_to_device(make_span(data));

std::vector<std::byte> newdata(alloc.size());
ASSERT_EQ(128, newdata.size());
alloc.copy_to_host(make_span(newdata));
EXPECT_EQ(std::byte(1), newdata.front());
EXPECT_EQ(std::byte(127), newdata.back());
Expand Down

0 comments on commit 18f4ae6

Please sign in to comment.