Skip to content

Multi Platform Extensive Github Workflow Update#261

Merged
adisidev merged 38 commits intomainfrom
ci-improve
May 29, 2025
Merged

Multi Platform Extensive Github Workflow Update#261
adisidev merged 38 commits intomainfrom
ci-improve

Conversation

@nihalzp
Copy link
Copy Markdown
Collaborator

@nihalzp nihalzp commented May 28, 2025

The new workflow includes style checks, multi-platform multi-type builds (OS: Linux, macOS, Compiler: gcc, clang, apple-clang), sanitizer builds (AddressSanitizer, UndefinedBehaviorSanitizer, ThreadSanitizer), and separate jobs for unit and stress tests.

@nihalzp nihalzp requested review from adisidev and Copilot and removed request for Copilot May 28, 2025 13:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a comprehensive multi-platform CI pipeline, removes an outdated Docker build workflow, and applies formatting and minor bug-fix tweaks across the codebase.

  • Introduce GitHub Actions CI (.github/workflows/ci.yml) for style checks, Linux/macOS builds, sanitizers, and unit/stress tests
  • Remove legacy Docker-based CI (.github/workflows/build.yml) and disable IPO on Clang/Linux in CMake
  • Apply consistent line-wrapping, brace placement, and initialize previously uninitialized locals in several modules

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/ci.yml New CI covering style, build matrix, sanitizers, and tests
.github/workflows/build.yml Removed legacy Docker build workflow
CMakeLists.txt Disable IPO on Clang/Linux to avoid linker issues
src/cartogram_info/read_geojson.cpp Initialize erico to avoid undefined behavior
src/cartogram_info/write_geojson.cpp Initialize inset_c_bb to a known invalid bounding box
Multiple src/inset_state/*.cpp files Line-wrapping and brace-style consistency updates
Various header files (*.hpp) Formatting cleanup (includes, function signatures, small fixes)
Comments suppressed due to low confidence (2)

src/cartogram_info/read_geojson.cpp:76

  • [nitpick] The variable name 'erico' is ambiguous. Consider renaming it to something more descriptive like 'is_exterior_ring_clockwise' to improve readability.
bool erico = false;  // Exterior ring is clockwise oriented?

src/cartogram_info/write_geojson.cpp:69

  • [nitpick] Using raw sentinel values for invalid bbox initialization can be error-prone. Consider providing a named factory (e.g., Bbox::invalid()) or a constant to encapsulate this intent.
Bbox inset_c_bb = Bbox(dbl_inf, dbl_inf, -dbl_inf, -dbl_inf);  // Initialize to invalid bbox

Comment thread CMakeLists.txt
@nihalzp nihalzp added the feature New feature or request label May 28, 2025
@nihalzp nihalzp changed the title Multi Platform CI Multi Platform Extensive Github Workflow Update May 28, 2025
Copy link
Copy Markdown
Collaborator

@adisidev adisidev left a comment

Choose a reason for hiding this comment

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

Looks mostly good, but I think we should still address two things:

  • If we plan to retain the Dockerfile, should we also retain the instructions?
  • Could we add more comments / explanation about the CI workflow so that new users can easily pick up where we leave off?

Comment thread README.md
For Windows users, we recommend using our program through Windows Subsystem for Linux (WSL).


#### Installing using Docker
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we're still retaining the Dockerfile, should we retain the instructions too?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The Docker instructions were bit outdated. Additionally, having the Dockerfile is nice but I am in the support of later removing since we ensure that our program builds okay on all likely combination of supported compiler and OS. Anyone who can start Docker can also easily build the program by following the Linux commands.

What do you think? Should we keep the Dockerfile? If we keep, we might want to also have a CI that runs the Dockerfile and checks if the instructions are okay or not.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Regardless, this can be part of a future PR as the integrating Docker build on the current CI is a big enough task.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I agree, for now I think we should just remove the Dockerfile, and retrieve it from our commit history whenever required.

Comment thread README.md
Comment thread .github/workflows/ci.yml
@nihalzp nihalzp requested a review from adisidev May 29, 2025 06:00
@adisidev
Copy link
Copy Markdown
Collaborator

I have removed the Dockerfile, and will approve and merge the pull request now.

Copy link
Copy Markdown
Collaborator

@adisidev adisidev left a comment

Choose a reason for hiding this comment

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

Let's go to main 😋

@adisidev adisidev merged commit 7254afd into main May 29, 2025
10 checks passed
@nihalzp nihalzp deleted the ci-improve branch May 30, 2025 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants