GitHub Action
actions-setup-cmake
Github action to setup the cmake build script generator.
This action will update the path for your workflow to include cmake matching the platform and version requirements.
Adding a step that uses this action to your workflow will setup cmake and make it available to subsequent steps:
jobs:
example:
runs-on: ubuntu-latest
steps:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.7
with:
cmake-version: '3.16.x'
- name: Use cmake
run: cmake --version
There are two options for the action:
-
cmake-version
controls the version of CMake that is added to the path. This can be a fully specified verison3.3.0
, partly specified3.2
, a wildcard version3.2.x
. By default it is empty which will give the latest CMake version available on GitHub.The version tests show some expected values for given versions.
-
github-api-token
is optional, but is used to authenticate with GitHub's API. By default it will use the token generated by the workflow. If set to blank then no authentication is used to access the API and there is a chance that the test runner will have hit the API rate limit causing the action to fail to download the available versions from GitHub.See also:
The action will download the list of releases of CMake available on GitHub and choose the best match for the test runner's platform and the version requirements given as as option. The CMake package is then either downloaded from GitHub, or a cached version from the action's tool cache is used, and the executables are provided on the path for subsequent workflow steps.