mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-21 19:11:21 +00:00
Some checks failed
Build / Build Package (push) Has been cancelled
Check / Check Package (push) Has been cancelled
Test / Test Package (push) Has been cancelled
Test / Test Action (macos-14) (push) Has been cancelled
Test / Test Action (ubuntu-24.04) (push) Has been cancelled
Test / Test Action (windows-2022) (push) Has been cancelled
Test / Test Action With Specified Directories (push) Has been cancelled
Test / Test Action Without Run Build (push) Has been cancelled
Test / Test Action With Additional Options (push) Has been cancelled
Test / Test Action With Custom Generator (push) Has been cancelled
Bumps [seanmiddleditch/gha-setup-ninja](https://github.com/seanmiddleditch/gha-setup-ninja) from 5 to 6. - [Release notes](https://github.com/seanmiddleditch/gha-setup-ninja/releases) - [Commits](https://github.com/seanmiddleditch/gha-setup-ninja/compare/v5...v6) --- updated-dependencies: - dependency-name: seanmiddleditch/gha-setup-ninja 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>
171 lines
4.2 KiB
YAML
171 lines
4.2 KiB
YAML
name: Test
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
jobs:
|
|
test-package:
|
|
name: Test Package
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout Project
|
|
uses: actions/checkout@v4.2.2
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4.2.0
|
|
with:
|
|
node-version-file: .nvmrc
|
|
|
|
- name: Setup Yarn
|
|
uses: threeal/setup-yarn-action@v2.0.0
|
|
|
|
- name: Test Package
|
|
run: yarn test
|
|
|
|
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@v4.2.2
|
|
with:
|
|
repository: threeal/cpp-starter
|
|
ref: v1.0.0
|
|
|
|
- name: Checkout Action
|
|
uses: actions/checkout@v4.2.2
|
|
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@v4.2.2
|
|
with:
|
|
repository: threeal/cpp-starter
|
|
ref: v1.0.0
|
|
path: project
|
|
|
|
- name: Checkout Action
|
|
uses: actions/checkout@v4.2.2
|
|
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@v4.2.2
|
|
with:
|
|
repository: threeal/cpp-starter
|
|
ref: v1.0.0
|
|
|
|
- name: Checkout Action
|
|
uses: actions/checkout@v4.2.2
|
|
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@v4.2.2
|
|
with:
|
|
repository: threeal/cpp-starter
|
|
ref: v1.0.0
|
|
|
|
- name: Checkout Action
|
|
uses: actions/checkout@v4.2.2
|
|
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@v4.2.2
|
|
with:
|
|
repository: threeal/cpp-starter
|
|
ref: v1.0.0
|
|
|
|
- name: Checkout Action
|
|
uses: actions/checkout@v4.2.2
|
|
with:
|
|
path: cmake-action
|
|
sparse-checkout: |
|
|
action.yml
|
|
dist
|
|
sparse-checkout-cone-mode: false
|
|
|
|
- name: Setup Ninja
|
|
uses: seanmiddleditch/gha-setup-ninja@v6
|
|
|
|
- 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 }}
|