Skip to content

ci: replace CircleCI with GitHub Actions - #28

Merged
pkarnakov merged 14 commits into
masterfrom
github-ci
Oct 26, 2026
Merged

pkarnakov merged 14 commits into
masterfrom
github-ci

Conversation

@pkarnakov

@pkarnakov pkarnakov commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

CircleCI is no longer active. This adds a minimal GitHub Actions workflow and removes .circleci/.

  • job format: tools/format --check (clang-format 23.1.3 and ruff 0.17.2, pinned via uvx)
  • job linux: Ubuntu 24.04, OpenMPI, parallel HDF5 (libhdf5-openmpi-dev); builds deploy and src without hypre and the Cubism backend, runs ctest, builds the examples
  • timeouts, and a new push to a pull request cancels its previous run
  • tools/format formats tracked C/C++ sources (excluding doc/, src/CubismNoCopy/, src/overlap/) and Python files (*.py and scripts with a Python shebang); ruff.toml replaces .style.yapf
  • reformats C/C++ (84 files) and Python (about 160 files); fixes bugs found by the ruff linter (undefined names, wrong format arguments, duplicate dict key)
  • tests that rely on the default backend cubismnc or the default linear solver hypre are registered only if USE_BACKEND_CUBISM or USE_HYPRE is on (58 of 122 tests remain in this configuration)
  • fixes:
    • build with GCC 15 (<cstdint> in util/visual.h, broken unused operator<< in func/primlist.h)
    • NumPy type aliases removed in NumPy 1.24 (np.float, np.int)
    • test/reconst compared floating-point results exactly, which fails with FMA
    • test/commmap printed uninitialized coefficients of the system
  • test/commmap runs with OMP_NUM_THREADS=1; with more threads than ranks it aborts
  • CI builds only the examples that do not run simulations (make build_nosim)
  • aphros.TestBase prints a diff of text files that differ from the reference

util/visual.h: include <cstdint> for uint32_t.
func/primlist.h: remove operator<< of VelocityPrimitive, which refers
to nonexistent members and fails with -Wtemplate-body.
Build and test on Ubuntu 24.04 with OpenMPI and parallel HDF5,
without hypre and the Cubism backend.
@pkarnakov
pkarnakov force-pushed the github-ci branch 3 times, most recently from 9e506a9 to f2b756e Compare October 26, 2026 19:30
Add tools/format which runs a pinned clang-format via uvx on tracked
sources, excluding doc/ and bundled src/CubismNoCopy/ and src/overlap/.
tools/format now also runs ruff 0.17.2 on tracked *.py files and
scripts with a Python shebang; --check also runs the linter. ruff.toml
follows the config used in other projects (E, W, F, I), targets
Python 3.8, and ignores star imports, bare except and lambda
assignment. Replaces yapf.

Fixes found by the linter:
- doc/sphinx/includecode.py: GetStruct() used undefined `filename`.
- src/test/{hdf,partstr}/bgen: undefined GetEmptyCluster().
- src/test/advection/plot.py: PlotPart is in aphros.plot.
- examples/102_mean_curv_flow/ref/2_detect.py: recolor() used
  undefined nx, ny.
- examples/105_sharp/tools/raw2img: wrong number of % arguments.
- deploy/scripts/task: usage text lacked the placeholder for the
  program name.
- examples/213_electrochem: duplicate dict key in colorbar.py.
- Remove unused variables, compare types with `is`, None with `is`.
np.float and np.int are replaced with the builtins, as recommended by
NumPy. Enable ruff rule NPY001 to catch them.
Many tests rely on the default backend cubismnc or the default linear
solver hypre (deploy/scripts/sim_base.conf) and abort without them.
Register them only if USE_BACKEND_CUBISM or USE_HYPRE is on.
test/inner expects the inner-blocks-first order of cubismnc.
Exact comparison fails with -march=native, which allows contraction
to FMA. Print the value on failure.
Split examples/Makefile into DIRS_BUILD and DIRS_SIM. The simulations
use the default backend cubismnc, which is disabled in CI.
The number of subdomains is computed as ranks / threads, which is zero
with more threads than ranks, and the test aborts.
Only the diagonal coefficient was set, others were uninitialized and
appeared in the output.
@pkarnakov
pkarnakov merged commit e202928 into master Oct 26, 2026
2 checks passed
@pkarnakov
pkarnakov deleted the github-ci branch October 26, 2026 20:12
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.

1 participant