Skip to content

Commit 67a1d8d

Browse files
committed
feat: add support for cmakelang, cmake-lint, cmake-format
1 parent d7f5466 commit 67a1d8d

File tree

11 files changed

+59
-12
lines changed

11 files changed

+59
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Setting up a **cross-platform** environment for building and testing C++/C proje
1717
| category | tools |
1818
| --------------------- | --------------------------------------------------------------------------- |
1919
| compiler and analyzer | llvm, gcc, msvc, apple-clang, vcvarsall, cppcheck, clang-tidy, clang-format |
20-
| build system | cmake, ninja, meson, make, task, bazel |
20+
| build system | cmake, ninja, meson, make, task, bazel, cmakelang, cmake-format, cmake-lint |
2121
| package manager | vcpkg, conan, choco, brew, nala |
2222
| cache | ccache, sccache |
2323
| documentation | doxygen, graphviz |

action.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,21 @@ inputs:
7070
cmake:
7171
description: "Wether to install cmake (true/false) or the specific version to install."
7272
required: false
73+
cmakelang:
74+
description: "Wether to install cmakelang (true/false) or the specific version to install."
75+
required: false
76+
cmake-lint:
77+
description: "Wether to install cmake-lint (true/false) or the specific version to install."
78+
required: false
79+
cmakelint:
80+
description: "Wether to install cmake-lint (true/false) or the specific version to install."
81+
required: false
82+
cmake-format:
83+
description: "Wether to install cmake-format (true/false) or the specific version to install."
84+
required: false
85+
cmakeformat:
86+
description: "Wether to install cmake-format (true/false) or the specific version to install."
87+
required: false
7388
ninja:
7489
description: "Wether to install ninja (true/false) or the specific version to install."
7590
required: false

cspell.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ words:
2828
- choco
2929
- clangd
3030
- cmake
31+
- cmakeformat
3132
- cobertura
3233
- copr
3334
- CPATH

dist/legacy/setup-cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/setup-cpp.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/modern/setup-cpp.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli-options.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ All the available tools:
3535
"compiler and analyzer": {
3636
tools: "--llvm, --gcc, --msvc, --apple-clang, --vcvarsall, --cppcheck, --clang-tidy, --clang-format",
3737
},
38-
"build system": { tools: "--cmake, --ninja, --meson, --make, --task, --bazel" },
38+
"build system": {
39+
tools: "--cmake, --ninja, --meson, --make, --task, --bazel, --cmakelang, --cmake-lint, --cmake-format",
40+
},
3941
"package manager": { tools: "--vcpkg, --conan, --choco, --brew, --nala" },
4042
cache: { tools: "--ccache, --sccache" },
4143
documentation: { tools: "--doxygen, --graphviz" },
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
2+
import { testBin } from "../../utils/tests/test-helpers.js"
3+
import { getVersion } from "../../versions/versions.js"
4+
import { setupCmakelang } from "../cmakelang.js"
5+
6+
jest.setTimeout(300000)
7+
describe("setup-cmakelang", () => {
8+
it("should setup cmakelang", async () => {
9+
const installInfo = await setupCmakelang(getVersion("cmakelang", "true", await ubuntuVersion()), "", process.arch)
10+
await testBin("cmake-lint", ["--version"], installInfo.binDir)
11+
await testBin("cmake-format", ["--version"], installInfo.binDir)
12+
})
13+
})

src/cmakelang/cmakelang.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { setupPipPack } from "../utils/setup/setupPipPack.js"
2+
3+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4+
export function setupCmakelang(version: string | undefined, _setupDir: string, _arch: string) {
5+
return setupPipPack("cmakelang[YAML]", version)
6+
}

0 commit comments

Comments
 (0)