cps-org / cps-config

A drop in replacement for pkg-config/pkgconf using cps files
MIT License
15 stars 7 forks source link

Enforce formatting with CI #54

Closed tylerjw closed 2 months ago

tylerjw commented 2 months ago

Here is a CI job and config to enforce the various formatting rules for this project.

One notable exception is that I'm disabling the indent size check on editorconfig-check because it fails all over the repo on files I don't think you want changed like .clang-format. Helpfully, my editor doesn't try to change that file, so I think this is fine.

Would you mind if I made a PR adding a pixi.toml to the repo? It would make it easier for me to develop locally. Here is the current state of that file.

[project]
name = "cps-config"
version = "0.0.1"
channels = ["conda-forge"]
platforms = ["linux-64"]

[tasks]
setup = "meson setup build"
build = { cmd = "ninja", cwd = "build" }
test = { cmd = "ninja test", cwd = "build" }
format = "pre-commit run -a"

[dependencies]
python = "3.12.*"
ninja = ">=1.11.1,<1.12"
meson = ">=1.3.2,<1.4"
cxx-compiler = ">=1.7.0,<1.8"
pre-commit = ">=3.6.2,<3.7"
dcbaker commented 2 months ago

Looks good to me. The gcc sanitizer check is new and known. I can't reproduce it no matter what I do locally, so I'm not sure where the issue is.

dcbaker commented 2 months ago

I don't have an opinion on the pixi config, @bretbrownjr do you?

bretbrownjr commented 2 months ago

No opinion on a pixi.toml, though it will probably break from time to time if we don't get some sort of CI set up for it. Maybe that's OK to start.

tylerjw commented 2 months ago

It'll be easy for me to write a ci for it if you want. I mostly just want it for my local environment management.

tylerjw commented 2 months ago

Here is PR for adding pixi environment with CI: https://github.com/cps-org/cps-config/pull/55

Note that it shouldn't pass CI until after this pr is merged and rebased on it.

tylerjw commented 2 months ago

I'm out today, but I'm happy to dig into the ubuntu sanitize failure tomorrow. I think these two are ready to land if you are happy with them.