{"id":16962533,"url":"https://github.com/threeal/cmake-action","last_synced_at":"2025-03-23T17:31:02.873Z","repository":{"id":65429936,"uuid":"585801189","full_name":"threeal/cmake-action","owner":"threeal","description":"Configure and build CMake projects on GitHub Actions","archived":false,"fork":false,"pushed_at":"2024-10-29T13:17:49.000Z","size":1343,"stargazers_count":25,"open_issues_count":8,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-29T16:00:58.569Z","etag":null,"topics":["action","actions","build","build-tool","ci","cmake","github-actions"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/cmake-action","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/threeal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-06T05:30:39.000Z","updated_at":"2024-10-29T13:16:53.000Z","dependencies_parsed_at":"2023-12-07T08:23:32.426Z","dependency_job_id":"e0805669-52a3-4f0d-bce9-d3c56e4ed0c8","html_url":"https://github.com/threeal/cmake-action","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fcmake-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fcmake-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fcmake-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threeal%2Fcmake-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threeal","download_url":"https://codeload.github.com/threeal/cmake-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244313970,"owners_count":20433021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","actions","build","build-tool","ci","cmake","github-actions"],"created_at":"2024-10-13T23:07:02.985Z","updated_at":"2025-03-23T17:31:02.855Z","avatar_url":"https://github.com/threeal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CMake Action\n\nConfigure and build [CMake](https://cmake.org/) projects on [GitHub Actions](https://github.com/features/actions).\n\nThis action wraps the [`cmake`](https://cmake.org/cmake/help/latest/manual/cmake.1.html) command for configuring and building CMake projects. It provides a more streamlined syntax for specifying build options compared to calling the `cmake` command directly.\n\n## Available Inputs\n\n| Name | Value Type | Description |\n| --- | --- | --- |\n| `source-dir` | Path | The source directory of the CMake project. Defaults to the current working directory. |\n| `build-dir` | Path | The build directory of the CMake project. Defaults to the `build` directory inside the source directory. |\n| `generator` | String | The build system generator for the CMake project. Equivalent to setting the `-G` option. |\n| `c-compiler` | String | The preferred executable for compiling C language files. Equivalent to defining the `CMAKE_C_COMPILER` variable. |\n| `cxx-compiler` | String | The preferred executable for compiling C++ language files. Equivalent to defining the `CMAKE_CXX_COMPILER` variable. |\n| `c-flags` | Multiple strings | Additional flags to pass when compiling C language files. Equivalent to defining the `CMAKE_C_FLAGS` variable. |\n| `cxx-flags` | Multiple strings | Additional flags to pass when compiling C++ language files. Equivalent to defining the `CMAKE_CXX_FLAGS` variable. |\n| `options` | Multiple strings | Additional options to pass during the CMake configuration. Equivalent to setting the `-D` option. |\n| `args` | Multiple strings | Additional arguments to pass during the CMake configuration. |\n| `run-build` | `true` or `false` | If enabled, builds the project using CMake. Defaults to `true`. |\n| `build-args` | Multiple strings | Additional arguments to pass during the CMake build. |\n\n## Available Outputs\n\n| Name | Value Type | Description |\n| --- | --- | --- |\n| `build-dir` | Path | The build directory of the CMake project. |\n\n## Example Usages\n\nThis example demonstrates how to use this action to configure and build a CMake project in a GitHub Actions workflow:\n\n```yaml\nname: Build\non:\n  push:\njobs:\n  build-project:\n    name: Build Project\n    runs-on: ubuntu-24.04\n    steps:\n      - name: Checkout Project\n        uses: actions/checkout@v4.2.2\n\n      - name: Build Project\n        uses: threeal/cmake-action@v2.1.0\n```\n\n### Specify the Source and Build Directories\n\nBy default, this action uses the current working directory as the source directory and the `build` directory inside the source directory as the build directory. To use different directories, set the `source-dir` and/or `build-dir` inputs:\n\n```yaml\n- name: Build Project\n  uses: threeal/cmake-action@v2.1.0\n  with:\n    source-dir: source\n    build-dir: output\n```\n\n### Specify Build System Generator and Compiler\n\nThe following example demonstrates how to use this action to configure and build the project using [Ninja](https://ninja-build.org/) as the build system generator and [Clang](https://clang.llvm.org/) as the compiler:\n\n```yaml\n- name: Setup Ninja\n  uses: seanmiddleditch/gha-setup-ninja@v5\n\n- name: Build Project\n  uses: threeal/cmake-action@v2.1.0\n  with:\n    generator: Ninja\n    cxx-compiler: clang++\n```\n\n### Specify Additional Options\n\nUse the `options` input to specify additional options for configuring a project:\n\n```yaml\n- name: Build Project\n  uses: threeal/cmake-action@v2.1.0\n  with:\n    options: |\n      BUILD_TESTS=ON\n      BUILD_EXAMPLES=ON\n```\n\nThe above example is equivalent to calling the `cmake` command with the `-DBUILD_TESTS=ON` and `-DBUILD_EXAMPLES=ON` arguments.\n\n### Configure Project Without Building\n\nBy default, this action builds the project after configuration. To skip the build process, set the `run-build` option to `false`:\n\n```yaml\n- name: Configure Project\n  uses: threeal/cmake-action@v2.1.0\n  with:\n    run-build: false\n```\n\n## License\n\nThis project is licensed under the terms of the [MIT License](./LICENSE).\n\nCopyright © 2023-2025 [Alfi Maulana](https://github.com/threeal/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreeal%2Fcmake-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreeal%2Fcmake-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreeal%2Fcmake-action/lists"}