Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ Windows CI #4110

Merged
merged 5 commits into from
Nov 1, 2023
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
35 changes: 33 additions & 2 deletions .github/workflows/reusable_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ jobs:
# Only check c/cpp/h/hpp (default checks also .proto and others)
include-regex: ^.*\.(c|cpp|h|hpp)$

cpp-tests:
name: C++ tests
cpp-tests-linux:
name: C++ tests Linux
runs-on: ubuntu-latest
container:
image: rerunio/ci_docker:0.10.0
Expand Down Expand Up @@ -412,3 +412,34 @@ jobs:
pixi run cpp-clean
RERUN_WERROR=ON RERUN_USE_ASAN=ON CXX=g++ pixi run cpp-build-all
RERUN_WERROR=ON RERUN_USE_ASAN=ON CXX=g++ pixi run cpp-test

cpp-tests-windows:
name: C++ tests Windows
runs-on: windows-latest-8-cores
env:
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }}

- uses: prefix-dev/setup-pixi@v0.3.0
with:
pixi-version: v0.6.0
cache: true

- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
cache_key: "build-windows"
# Cache will be produced by `reusable_checks/rs-lints`
save_cache: false
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}

- name: Build and run C++ tests with MSVC
shell: bash
run: |
pixi run cpp-clean
RERUN_WERROR=ON pixi run cpp-build-all
RERUN_WERROR=ON pixi run cpp-test
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ endif()

function(set_default_warning_settings target)
if(MSVC)
# TODO(andreas): Try to enable /Wall
target_compile_options(${target} PRIVATE /W4)

# CMAKE_COMPILE_WARNING_AS_ERROR is only directly supported starting in CMake `3.24`
# https://cmake.org/cmake/help/latest/prop_tgt/COMPILE_WARNING_AS_ERROR.html
if(CMAKE_COMPILE_WARNING_AS_ERROR)
target_compile_options(${target} PRIVATE /WX)
endif()
else()
# Enabled warnings.
target_compile_options(${target} PRIVATE
Expand Down
1 change: 0 additions & 1 deletion docs/code-examples/pinhole_simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ int main() {
rec.log("world/image", rerun::Pinhole::from_focal_length_and_resolution(3.0f, {3.0f, 3.0f}));

std::vector<uint8_t> random_data(3 * 3 * 3);
std::generate(random_data.begin(), random_data.end(), std::rand);
std::generate(random_data.begin(), random_data.end(), [] {
return static_cast<uint8_t>(std::rand());
});
Expand Down
1 change: 0 additions & 1 deletion rerun_cpp/src/rerun/archetypes/pinhole.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading