mirror of
https://github.com/threeal/cmake-action.git
synced 2025-06-09 02:31:21 +00:00
docs: adjust and fix examples
This commit is contained in:
parent
699012010f
commit
735354b97a
23
README.md
23
README.md
@ -65,6 +65,16 @@ jobs:
|
|||||||
|
|
||||||
> **Note**: You can replace [`v1.2.0`](https://github.com/threeal/cmake-action/releases/tag/v1.2.0) with any version you prefer. See [this](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses).
|
> **Note**: You can replace [`v1.2.0`](https://github.com/threeal/cmake-action/releases/tag/v1.2.0) with any version you prefer. See [this](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses).
|
||||||
|
|
||||||
|
#### Configure, Build, and Test in the Same Step
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Configure, build, and test the project
|
||||||
|
uses: threeal/cmake-action@v1.2.0
|
||||||
|
with:
|
||||||
|
run-build: true
|
||||||
|
run-test: true
|
||||||
|
```
|
||||||
|
|
||||||
#### Specify the Source and Build Directories
|
#### Specify the Source and Build Directories
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@ -75,21 +85,10 @@ jobs:
|
|||||||
build-dir: submodules/out
|
build-dir: submodules/out
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Configure, Build, and Test in the Same Step
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: Configure, build, and test the project
|
|
||||||
uses: threeal/cmake-action@v1.2.0
|
|
||||||
with:
|
|
||||||
options: BUILD_TESTING=ON
|
|
||||||
run-build: true
|
|
||||||
run-test: true
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Using Ninja as the Generator and Clang as the Compiler
|
#### Using Ninja as the Generator and Clang as the Compiler
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Configure and build the project
|
- name: Configure the project
|
||||||
uses: threeal/cmake-action@v1.2.0
|
uses: threeal/cmake-action@v1.2.0
|
||||||
with:
|
with:
|
||||||
generator: Ninja
|
generator: Ninja
|
||||||
|
Loading…
Reference in New Issue
Block a user