mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-21 11:01:20 +00:00
docs: add cmake build and ctest steps example
This commit is contained in:
parent
a320b8e14b
commit
75d5a7178b
10
README.md
10
README.md
@ -49,11 +49,17 @@ jobs:
|
|||||||
build-project:
|
build-project:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v3.3.0
|
uses: actions/checkout@v3.3.0
|
||||||
|
|
||||||
- name: Configure the project
|
- name: Configure the project
|
||||||
uses: threeal/cmake-action@latest
|
uses: threeal/cmake-action@latest
|
||||||
|
|
||||||
|
- name: Build the project
|
||||||
|
runs: cmake --build build
|
||||||
|
|
||||||
|
- name: Test the project
|
||||||
|
runs: ctest --test-dir build
|
||||||
```
|
```
|
||||||
|
|
||||||
> Note: You can replace `@latest` 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 `@latest` with any version you prefer. See [this](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses).
|
||||||
@ -82,7 +88,7 @@ jobs:
|
|||||||
#### 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 this project
|
- name: Configure and build the project
|
||||||
uses: threeal/cmake-action@latest
|
uses: threeal/cmake-action@latest
|
||||||
with:
|
with:
|
||||||
generator: Ninja
|
generator: Ninja
|
||||||
|
Loading…
Reference in New Issue
Block a user