mirror of
https://github.com/threeal/cmake-action.git
synced 2025-06-10 19:21:20 +00:00
ci: use threeal/cmake-starter
for testing the action
This commit is contained in:
parent
6f06d655fe
commit
565c104d58
49
.github/workflows/test.yaml
vendored
49
.github/workflows/test.yaml
vendored
@ -58,91 +58,103 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [windows, ubuntu, macos]
|
os: [windows, ubuntu, macos]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout Project
|
||||||
|
uses: actions/checkout@v4.1.2
|
||||||
|
with:
|
||||||
|
repository: threeal/cpp-starter
|
||||||
|
|
||||||
|
- name: Checkout Action
|
||||||
uses: actions/checkout@v4.1.2
|
uses: actions/checkout@v4.1.2
|
||||||
with:
|
with:
|
||||||
path: cmake-action
|
path: cmake-action
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
action.yml
|
action.yml
|
||||||
dist
|
dist
|
||||||
test
|
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
- name: Move Project
|
|
||||||
run: mv cmake-action/test/* .
|
|
||||||
|
|
||||||
- name: Configure and Build Project
|
- name: Configure and Build Project
|
||||||
uses: ./cmake-action
|
uses: ./cmake-action
|
||||||
|
with:
|
||||||
|
options: BUILD_TESTING=ON
|
||||||
|
|
||||||
- name: Test Project
|
- name: Test Project
|
||||||
uses: threeal/ctest-action@v1.0.0
|
uses: threeal/ctest-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
build-config: Debug
|
build-config: Debug
|
||||||
tests-regex: hello_world
|
|
||||||
|
|
||||||
test-action-with-specified-dirs:
|
test-action-with-specified-dirs:
|
||||||
name: Test Action With Specified Directories
|
name: Test Action With Specified Directories
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout Project
|
||||||
|
uses: actions/checkout@v4.1.2
|
||||||
|
with:
|
||||||
|
repository: threeal/cpp-starter
|
||||||
|
path: project
|
||||||
|
|
||||||
|
- name: Checkout Action
|
||||||
uses: actions/checkout@v4.1.2
|
uses: actions/checkout@v4.1.2
|
||||||
with:
|
with:
|
||||||
path: cmake-action
|
path: cmake-action
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
action.yml
|
action.yml
|
||||||
dist
|
dist
|
||||||
test
|
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
- name: Configure and Build Project
|
- name: Configure and Build Project
|
||||||
id: cmake-action
|
|
||||||
uses: ./cmake-action
|
uses: ./cmake-action
|
||||||
with:
|
with:
|
||||||
source-dir: cmake-action/test
|
source-dir: project
|
||||||
build-dir: output
|
build-dir: output
|
||||||
|
options: BUILD_TESTING=ON
|
||||||
|
|
||||||
- name: Test Project
|
- name: Test Project
|
||||||
uses: threeal/ctest-action@v1.0.0
|
uses: threeal/ctest-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
test-dir: output
|
test-dir: output
|
||||||
tests-regex: hello_world
|
|
||||||
|
|
||||||
test-action-without-run-build:
|
test-action-without-run-build:
|
||||||
name: Test Action Without Run Build
|
name: Test Action Without Run Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout Project
|
||||||
|
uses: actions/checkout@v4.1.2
|
||||||
|
with:
|
||||||
|
repository: threeal/cpp-starter
|
||||||
|
|
||||||
|
- name: Checkout Action
|
||||||
uses: actions/checkout@v4.1.2
|
uses: actions/checkout@v4.1.2
|
||||||
with:
|
with:
|
||||||
path: cmake-action
|
path: cmake-action
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
action.yml
|
action.yml
|
||||||
dist
|
dist
|
||||||
test
|
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
- name: Modify Project
|
- name: Modify Project
|
||||||
run: echo 'invalid' >> cmake-action/test/hello_world.cpp
|
run: echo 'invalid' >> src/main.cpp
|
||||||
|
|
||||||
- name: Configure Project
|
- name: Configure Project
|
||||||
id: cmake-action
|
|
||||||
uses: ./cmake-action
|
uses: ./cmake-action
|
||||||
with:
|
with:
|
||||||
source-dir: cmake-action/test
|
|
||||||
run-build: false
|
run-build: false
|
||||||
|
|
||||||
test-action-with-custom-generator:
|
test-action-with-custom-generator:
|
||||||
name: Test Action With Custom Generator
|
name: Test Action With Custom Generator
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout Project
|
||||||
|
uses: actions/checkout@v4.1.2
|
||||||
|
with:
|
||||||
|
repository: threeal/cpp-starter
|
||||||
|
|
||||||
|
- name: Checkout Action
|
||||||
uses: actions/checkout@v4.1.2
|
uses: actions/checkout@v4.1.2
|
||||||
with:
|
with:
|
||||||
path: cmake-action
|
path: cmake-action
|
||||||
sparse-checkout: |
|
sparse-checkout: |
|
||||||
action.yml
|
action.yml
|
||||||
dist
|
dist
|
||||||
test
|
|
||||||
sparse-checkout-cone-mode: false
|
sparse-checkout-cone-mode: false
|
||||||
|
|
||||||
- name: Setup Ninja
|
- name: Setup Ninja
|
||||||
@ -152,7 +164,6 @@ jobs:
|
|||||||
id: cmake-action
|
id: cmake-action
|
||||||
uses: ./cmake-action
|
uses: ./cmake-action
|
||||||
with:
|
with:
|
||||||
source-dir: cmake-action/test
|
|
||||||
generator: Ninja
|
generator: Ninja
|
||||||
run-build: false
|
run-build: false
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user