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

CI for C++ (formatting check + running tests) #2901

Merged
merged 18 commits into from
Aug 3, 2023
Merged

CI for C++ (formatting check + running tests) #2901

merged 18 commits into from
Aug 3, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Aug 2, 2023

What

  • Runs clang-format to check for unformatted files
  • Builds and runs the minimal example
  • Builds and runs rerun_sdk tests

Docker image script was in a broken state, fixed it and updated the image everywhere.

Do not under any circumstances review commit per commit 😉 (srsly the history is messed up)

TODO:

  • check if overall ci goes green
  • break both ci jobs on purpose (already did compile failures, try actual test failure instead
  • fix it again (duh ;))

Future todo:

Checklist

@Wumpf Wumpf added 🧑‍💻 dev experience developer experience (excluding CI) 🌊 C++ API C/C++ API specific labels Aug 2, 2023
@Wumpf Wumpf changed the title CI for C++ (formatting + running tests) CI for C++ (formatting check + running tests) Aug 2, 2023
@Wumpf Wumpf marked this pull request as ready for review August 2, 2023 17:56
@teh-cmc teh-cmc self-requested a review August 3, 2023 07:17
# execute process doesn't fail if the process fails.
# `COMMAND_ERROR_IS_FATAL ANY` parameter fixes this but is only available in CMake 3.19
# which isn't default on Ubuntu LTS as of writing, causing unnecessary friction.
execute_process(COMMAND cargo build --release -p re_types RESULT_VARIABLE ret) # Generates most of the C++ source files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why --release?

Copy link
Member Author

@Wumpf Wumpf Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question/observation. Entirely because I stumbled over this line and figured maybe this is more cache friendly then

--release so we can inherit from some of the artifacts that maturin has just built before

https://github.com/rerun-io/rerun/blob/main/.github/workflows/reusable_build_and_test_wheels.yml#L269

but maybe this doesn't make sense?
Arguably the cmake script should be configurable and probably build rerun_c with debug/release depending on what rerun_cpp is built!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this instance this is running independently from other jobs so building re_types in release should just slow things down I think.

Arguably the cmake script should be configurable and probably build rerun_c with debug/release depending on what rerun_cpp is built!

Yeah that would be nice, though always building rerun_c in release isn't too bad in and of itself I think.

Update: oh wait, I see that rerun_c depends on re_types through re_sdk! In which case building in release above does make sense but... why does rerun_c depends on re_types to begin with? All it needs is like Data{Cell/Row} and RecordingStream. Maybe we should have an option an re_sdk to discard all of the archetype stuff.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, yeah we have some work there to do! Creating an issue on making rerun_c smaller.
I'll keep the cmake as is for the moment, shouldn't be too impactful anyways - imho the important thing is that it's not fixed to Debug instead (i.e. don't force users to go through a debug c library)

@fake-name
Copy link

Hello, sudo apt-get -y install 'cmake libarrow-dev' is not valid bash. I doesn't try to install the two packages cmake and libarrow-dev, it instead tries to install a single package named cmake libarrow-dev (yes, including the space), which does not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 C++ API C/C++ API specific 🧑‍💻 dev experience developer experience (excluding CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check C++ on CI
3 participants