Skip to content

CI cache#1574

Merged
elalish merged 24 commits into
masterfrom
ci-cache
Mar 17, 2026
Merged

CI cache#1574
elalish merged 24 commits into
masterfrom
ci-cache

Conversation

@pca006132

Copy link
Copy Markdown
Collaborator

No description provided.

@pca006132 pca006132 changed the title Ci cache CI cache Mar 7, 2026
@codecov

codecov Bot commented Mar 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.16%. Comparing base (91d700b) to head (bec839c).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1574      +/-   ##
==========================================
+ Coverage   92.59%   95.16%   +2.57%     
==========================================
  Files          33       34       +1     
  Lines        6048     7659    +1611     
==========================================
+ Hits         5600     7289    +1689     
+ Misses        448      370      -78     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pca006132 pca006132 force-pushed the ci-cache branch 2 times, most recently from f1cfcb5 to c154426 Compare March 7, 2026 17:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates CI to reduce network fetches and speed up builds by caching external dependencies and using them as FetchContent sources across jobs.

Changes:

  • Add a reusable composite action to clone + cache external git dependencies (TBB, Clipper2, nanobind, fuzztest).
  • Refactor .github/workflows/manifold.yml to use cached clones, add more caching (pip, apt, nix), and reorganize/expand job coverage (incl. Windows).
  • Update the CMake subdirectory consumer test script to pass FETCHCONTENT_SOURCE_DIR_* overrides.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
scripts/test-cmake-subdir.sh Passes cached dependency paths into the subdir consumer build via FETCHCONTENT_SOURCE_DIR_*.
.github/workflows/manifold.yml Major CI refactor: caching, dependency cloning reuse, Windows job, updated build/test invocations, nix cache.
.github/actions/git-clone/action.yml New composite action implementing clone + actions/cache for external repos.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

mkdir build
cd build
cmake ..
cmake -DFETCHCONTENT_SOURCE_DIR_CLIPPER2=$CLIPPER2 -DFETCHCONTENT_SOURCE_DIR_TBB=$TBB ..

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.

only add these when the variables are non-empty.

Comment thread .github/workflows/manifold.yml Outdated
Comment on lines +137 to 144
- name: Test
if: matrix.cross_section == 'ON'
run: |
./build/test/manifold_test
# python tests
export PYTHONPATH=$PYTHONPATH:$(pwd)/build/bindings/python
python3 bindings/python/examples/run_all.py -e
python3 -m pytest

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.

We don't need to run tests with cross-section disabled, since it can only disable tests instead of testing more code path. It is a strictly compile-only check CI check.

pca006132 and others added 4 commits March 17, 2026 00:04

@elalish elalish left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

There's a lot here - do you have a general description of what's changing at a high level?

Comment thread .github/workflows/manifold.yml Outdated
with:
name: tbb
url: https://github.com/oneapi-src/oneTBB.git
rev: f1862f38f83568d96e814e469ab61f88336cc595

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Can we use tagged releases for any of these?

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.

I did not find a way to do a shallow pull with tagged releases previously. I can probably ask LLM to see if there is a way.

Comment thread .github/workflows/manifold.yml Outdated
- uses: jwlawson/actions-setup-cmake@v2
- uses: actions/setup-node@v6
with:
node-version: 24

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think I used 25 somewhere else. Should probably be consistent.

@pca006132 pca006132 Mar 17, 2026

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.

Just checked, you are using 25 for publish_npm, will change this to 25.

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMANIFOLD_STRICT=ON -DMANIFOLD_DEBUG=ON -DMANIFOLD_FUZZ=ON -DMANIFOLD_PYBIND=OFF -DCMAKE_CXX_COMPILER=clang++ ..
make

build_fuzzer_mac:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Are there some CI runs that I need to remove from the github required list?

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.

Some of the names have been changed. E.g., build_fuzzer_mac and build_fuzzer become build_fuzzer with an os matrix.

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.

You need to change the required list to merge this.

@pca006132

Copy link
Copy Markdown
Collaborator Author

There's a lot here - do you have a general description of what's changing at a high level?

Will do later today, busy with other stuff for now.

@pca006132

pca006132 commented Mar 17, 2026

Copy link
Copy Markdown
Collaborator Author

The copilot summary above was quite good, but I can expand on that.

  1. This now caches built-in dependencies like tbb, clipper2, googletest, and nanobind. So we are not pulling them from GitHub for every CI job. This one is a self-written GitHub action script. I haven't found a good way to do shallow clones with release tags, so sha256 ids are used for now.
  2. This caches npm, pip, emsdk, and apt installs using GitHub Actions.
  3. Uses YML anchors and references to deduplicate steps like pulling in tbb dependency.
  4. Reorganize actions a bit.
  5. Use one job for fuzzer builds, and use matrix for testing different OSes.
  6. For Linux builds, skip tests for MANIFOLD_CROSS_SECTION=OFF, since we only need to check if it compiles. The option should not affect code paths.
  7. Rewrite stuff a bit to avoid cd. Not a big deal.

Not yet solved:

  1. CMake install cache on Windows. Maybe we can use a Chocolatey action for that.
  2. Homebrew install cache on macOS. There are GitHub Actions for this, but there are not that many stars, so should review before using that.
  3. Should gather code coverage for parallel build, but it is too slow for now to be run in the CI.

@elalish elalish left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks - I didn't even notice copilot summarized the PR; that's an interesting feature.

@elalish elalish merged commit f3d121b into master Mar 17, 2026
36 checks passed
@elalish elalish deleted the ci-cache branch March 17, 2026 09:59
@pca006132 pca006132 mentioned this pull request Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants