You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-20Lines changed: 36 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
-[The **get-cmake** action installs as fast as possible your desired versions of CMake and Ninja](#the-get-cmake-action-installs-as-fast-as-possible-your-desired-versions-of-cmake-and-ninja)
6
6
-[Quickstart](#quickstart)
7
+
-[If you want to use **latest stable** you can use this one-liner:](#if-you-want-to-use--latest-stable-you-can-use-this-one-liner)
8
+
-[If you want to **pin** the workflow to **specific range of versions** of CMake and Ninja:](#if-you-want-to-pin-the-workflow-to-specific-range-of-versions-of-cmake-and-ninja)
7
9
-[Action reference: all input/output parameters](#action-reference-all-inputoutput-parameters)
8
10
-[Who is using `get-cmake`](#who-is-using-get-cmake)
# [The **get-cmake** action installs as fast as possible your desired versions of CMake and Ninja](https://github.com/marketplace/actions/get-cmake)
21
-
The action restores from the GitHub cloud based cache, or downloads and caches, both CMake and Ninja. You can select your desired version of each, or by default CMake **v3.24.3** and Ninja **v1.11.1** are installed.
23
+
The action restores from the GitHub cloud based cache, or downloads and caches, both CMake and Ninja. You can select your desired version using [semantic versioning ranges](https://docs.npmjs.com/about-semantic-versioning), and also use `install`or `installrc` special versions to install the latest stable or release candidate.
22
24
Works for Linux/macOS/Windows.
23
25
24
26
Steps of `get-cmake`:
@@ -31,29 +33,43 @@ Steps of `get-cmake`:
31
33
<br>
32
34
33
35
## Quickstart
36
+
### If you want to use **latest stable** you can use this one-liner:
34
37
```yaml
35
-
# - uses: actions/cache@v1 <-----= YOU DO NOT NEED THIS
36
-
# key: <key> <-----= YOU DO NOT NEED THIS
37
-
# path: <path> <-----= YOU DO NOT NEED THIS
38
-
39
-
- name: Get latest CMake and Ninja
40
-
# Using 'latest' branch, the most recent CMake and ninja are installed.
41
-
uses: lukka/get-cmake@latest # <--= THIS IS THE ONE LINER YOU NEED
42
-
38
+
# Option 1: using 'latest' branch, the most recent CMake and ninja are installed.
39
+
- uses: lukka/get-cmake@latest # <--= Just this one-liner suffices.
40
+
```
41
+
or there is another option:
42
+
```yaml
43
+
# Option 2: specify 'latest' or 'latestrc' in the input version arguments:
44
+
- name: Get latest CMake and Ninja
45
+
uses: lukka/get-cmake@latest
46
+
with:
47
+
cmakeVersion: latestrc # <--= optional, use the latest release candidate (notice the 'rc' suffix).
48
+
ninjaVersion: latest # <--= optional, use the latest release (non candidate).
49
+
```
43
50
44
-
# If you need to _pin_ your workflow to specific CMake/Ninja versions you have TWO options:
51
+
<br>
45
52
46
-
# Option 1: specify in a input parameter the desired version (using multiple lines).
47
-
- name: Get specific version CMake, v3.24.3, and Ninja v1.11.1
48
-
uses: lukka/get-cmake@latest
53
+
### If you want to **pin** the workflow to **specific range of versions** of CMake and Ninja:
54
+
```yaml
55
+
# Option 1: specify in a input parameter the desired version using ranges.
56
+
- uses: lukka/get-cmake@latest
49
57
with:
50
-
cmakeVersion: 3.24.3 # <--= optional, overrides the _latest_ version of CMake
51
-
ninjaVersion: 1.11.1 # <--= optional, overrides the _latest_ version of Ninja
52
-
58
+
cmakeVersion: "~3.25.0"# <--= optional, use most recent 3.25.x version
59
+
ninjaVersion: "^1.11.1"# <--= optional, use most recent 1.x version
60
+
61
+
# or using a specific version (no range)
62
+
- uses: lukka/get-cmake@latest
63
+
with:
64
+
cmakeVersion: 3.25.1 # <--= optional, stick to exactly 3.25.1 version
65
+
ninjaVersion: 1.11.1 # <--= optional, stick to exactly 1.11.1 version
66
+
```
67
+
or there is another option:
68
+
```yaml
53
69
# Option 2: or you can use the Git 'tag' to select the version, and you can have a one-liner statement,
54
-
# but note that you can only use one of the existing tags, create a PR to add more tags!
55
-
- name: Get specific version CMake, v3.24.3
56
-
uses: lukka/get-cmake@v3.24.3# <- THIS IS THE ONE LINER YOU NEED
70
+
# but note that you can only use one of the existing tags, create a PR to add the tag you need!
71
+
- name: Get specific version CMake, v3.25.1
72
+
uses: lukka/get-cmake@v3.25.1# <- this one-liner is all you need.
57
73
```
58
74
<br>
59
75
@@ -88,7 +104,7 @@ Launch `lint` by:
88
104
## Generate the catalog of CMake releases
89
105
To generate the catalog of CMake releases, run a special test with this command:
90
106
91
-
> npx jest --config=./jest.config-generate-catalog.js
107
+
> npm run generate-catalog
92
108
93
109
Then embed the new catalog by packaging the action.
0 commit comments