mirror of
https://github.com/threeal/cmake-action.git
synced 2025-09-13 19:17:21 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.2.2...v5.0.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
150 lines
3.7 KiB
YAML
150 lines
3.7 KiB
YAML
name: Test
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
jobs:
|
|
test-action:
|
|
name: Test Action
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-24.04, macos-14, windows-2022]
|
|
steps:
|
|
- name: Checkout Sample Project
|
|
uses: actions/checkout@v5.0.0
|
|
with:
|
|
repository: threeal/cpp-starter
|
|
ref: v1.0.0
|
|
|
|
- name: Checkout Action
|
|
uses: actions/checkout@v5.0.0
|
|
with:
|
|
path: cmake-action
|
|
sparse-checkout: |
|
|
action.yml
|
|
dist
|
|
sparse-checkout-cone-mode: false
|
|
|
|
- name: Build Sample Project
|
|
id: cmake-action
|
|
uses: ./cmake-action
|
|
|
|
- name: Run Sample Project
|
|
run: ${{ steps.cmake-action.outputs.build-dir }}/${{ matrix.os == 'windows-2022' && 'Debug/generate_sequence.exe' || 'generate_sequence' }} 5
|
|
|
|
test-action-with-specified-dirs:
|
|
name: Test Action With Specified Directories
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout Sample Project
|
|
uses: actions/checkout@v5.0.0
|
|
with:
|
|
repository: threeal/cpp-starter
|
|
ref: v1.0.0
|
|
path: project
|
|
|
|
- name: Checkout Action
|
|
uses: actions/checkout@v5.0.0
|
|
with:
|
|
path: cmake-action
|
|
sparse-checkout: |
|
|
action.yml
|
|
dist
|
|
sparse-checkout-cone-mode: false
|
|
|
|
- name: Build Sample Project
|
|
id: cmake-action
|
|
uses: ./cmake-action
|
|
with:
|
|
source-dir: project
|
|
build-dir: output
|
|
|
|
- name: Run Sample Project
|
|
run: output/generate_sequence 5
|
|
|
|
test-action-without-run-build:
|
|
name: Test Action Without Run Build
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout Sample Project
|
|
uses: actions/checkout@v5.0.0
|
|
with:
|
|
repository: threeal/cpp-starter
|
|
ref: v1.0.0
|
|
|
|
- name: Checkout Action
|
|
uses: actions/checkout@v5.0.0
|
|
with:
|
|
path: cmake-action
|
|
sparse-checkout: |
|
|
action.yml
|
|
dist
|
|
sparse-checkout-cone-mode: false
|
|
|
|
- name: Modify Sample Project
|
|
run: echo 'invalid' >> src/main.cpp
|
|
|
|
- name: Configure Sample Project
|
|
uses: ./cmake-action
|
|
with:
|
|
run-build: false
|
|
|
|
test-action-with-additional-options:
|
|
name: Test Action With Additional Options
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout Sample Project
|
|
uses: actions/checkout@v5.0.0
|
|
with:
|
|
repository: threeal/cpp-starter
|
|
ref: v1.0.0
|
|
|
|
- name: Checkout Action
|
|
uses: actions/checkout@v5.0.0
|
|
with:
|
|
path: cmake-action
|
|
sparse-checkout: |
|
|
action.yml
|
|
dist
|
|
sparse-checkout-cone-mode: false
|
|
|
|
- name: Build Sample Project
|
|
uses: ./cmake-action
|
|
with:
|
|
options: BUILD_TESTING=ON
|
|
|
|
- name: Test Sample Project
|
|
uses: threeal/ctest-action@v1.1.0
|
|
|
|
test-action-with-custom-generator:
|
|
name: Test Action With Custom Generator
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout Sample Project
|
|
uses: actions/checkout@v5.0.0
|
|
with:
|
|
repository: threeal/cpp-starter
|
|
ref: v1.0.0
|
|
|
|
- name: Checkout Action
|
|
uses: actions/checkout@v5.0.0
|
|
with:
|
|
path: cmake-action
|
|
sparse-checkout: |
|
|
action.yml
|
|
dist
|
|
sparse-checkout-cone-mode: false
|
|
|
|
- name: Configure Sample Project
|
|
id: cmake-action
|
|
uses: ./cmake-action
|
|
with:
|
|
generator: Ninja
|
|
run-build: false
|
|
|
|
- name: Build Sample Project
|
|
run: ninja -C ${{ steps.cmake-action.outputs.build-dir }}
|