diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index 45c74c7..222bf04 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -16,4 +16,4 @@ jobs: - run: pixi run build - # TODO(emilk): Add a step to check formatting etc + - run: pixi run fmt-check diff --git a/.vscode/spellright.dict b/.vscode/spellright.dict deleted file mode 100644 index e9ba410..0000000 --- a/.vscode/spellright.dict +++ /dev/null @@ -1 +0,0 @@ -extrinsics diff --git a/pixi.toml b/pixi.toml index aab2517..e33a5ad 100644 --- a/pixi.toml +++ b/pixi.toml @@ -24,16 +24,30 @@ version = "0.1.0" [tasks] +# ------------------------------------------------------------------------------------------ # C++ stuff: # Note: extra CLI argument after `pixi run TASK` are passed to the task cmd. + +# Clean C++ build artifacts clean = { cmd = "rm -rf build bin CMakeFiles/" } print-env = { cmd = "echo $PATH" } prepare = "cmake -G 'Ninja' -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo" + +# Build C++ example build = { cmd = "cmake --build build --config RelWithDebInfo --target all", depends_on = [ "prepare", ] } + +# Run C++ example example = { cmd = "build/rerun_template", depends_on = ["build"] } -format = { cmd = "clang-format -i src/*" } + +# Format C++ code +fmt = { cmd = "clang-format -i src/*" } + +# Check formatting of C++ code +fmt-check = { cmd = "clang-format --dry-run --Werror -i src/*" } + +# ------------------------------------------------------------------------------------------ [dependencies] # C++ build-tools: