mirror of
https://github.com/threeal/cmake-action.git
synced 2025-06-09 10:41:22 +00:00
ci: adjust step names in workflow jobs
This commit is contained in:
parent
36e8b9fe88
commit
5a179f0584
10
.github/workflows/build.yaml
vendored
10
.github/workflows/build.yaml
vendored
@ -20,20 +20,20 @@ jobs:
|
||||
- name: Update Yarn
|
||||
run: corepack enable && yarn set version stable
|
||||
|
||||
- name: Cache deps
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v3.3.2
|
||||
with:
|
||||
path: .yarn
|
||||
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||
|
||||
- name: Install deps
|
||||
- name: Install Dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: Check lib
|
||||
- name: Check Package
|
||||
run: yarn check
|
||||
|
||||
- name: Bundle dist
|
||||
- name: Bundle Package
|
||||
run: yarn bundle
|
||||
|
||||
- name: Check diff
|
||||
- name: Check Differences
|
||||
run: git diff --exit-code HEAD
|
||||
|
44
.github/workflows/test.yml
vendored
44
.github/workflows/test.yml
vendored
@ -23,16 +23,16 @@ jobs:
|
||||
with:
|
||||
node-version: latest
|
||||
|
||||
- name: Cache deps
|
||||
- name: Cache Dependencies
|
||||
uses: actions/cache@v3.3.2
|
||||
with:
|
||||
path: .yarn
|
||||
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||
|
||||
- name: Install deps
|
||||
- name: Install Dependencies
|
||||
run: corepack enable && yarn install
|
||||
|
||||
- name: Test lib
|
||||
- name: Test Package
|
||||
run: yarn test
|
||||
|
||||
test-action:
|
||||
@ -43,26 +43,26 @@ jobs:
|
||||
matrix:
|
||||
os: [windows, ubuntu, macos]
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Move the test project to the working directory
|
||||
- name: Move Project
|
||||
run: mv test/* .
|
||||
|
||||
- name: Use the action
|
||||
- name: Configure Project
|
||||
id: cmake-action
|
||||
uses: ./
|
||||
|
||||
- name: Try to test the project
|
||||
- name: Try to Test Project
|
||||
id: failed-step
|
||||
continue-on-error: true
|
||||
run: ctest --test-dir ${{ steps.cmake-action.outputs.build-dir }} --output-on-failure --no-tests=error -R hello_world ${{ matrix.os == 'windows' && '-C Debug' || '' }}
|
||||
|
||||
- name: Check on success
|
||||
- name: Previous Step Should Failed
|
||||
if: steps.failed-step.outcome == 'success'
|
||||
run: exit 1
|
||||
|
||||
- name: Build and test the project
|
||||
- name: Build and Test Project
|
||||
run: |
|
||||
cmake --build ${{ steps.cmake-action.outputs.build-dir }}
|
||||
ctest --test-dir ${{ steps.cmake-action.outputs.build-dir }} --output-on-failure --no-tests=error -R hello_world ${{ matrix.os == 'windows' && '-C Debug' || '' }}
|
||||
@ -71,21 +71,21 @@ jobs:
|
||||
name: Test Action With Specified Directories
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Use the action with specified directories
|
||||
- name: Configure Project
|
||||
id: cmake-action
|
||||
uses: ./
|
||||
with:
|
||||
source-dir: test
|
||||
build-dir: output
|
||||
|
||||
- name: Check if the default build directory does not exist
|
||||
- name: Default Build Directory Should Not Exist
|
||||
shell: bash
|
||||
run: test ! -e build && test ! -e test/build
|
||||
|
||||
- name: Build and test the project
|
||||
- name: Build and Test Project
|
||||
run: |
|
||||
cmake --build ${{ steps.cmake-action.outputs.build-dir }}
|
||||
ctest --test-dir ${{ steps.cmake-action.outputs.build-dir }} --output-on-failure --no-tests=error -R hello_world
|
||||
@ -94,10 +94,10 @@ jobs:
|
||||
name: Test Action With Run Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Use the action with run build enabled
|
||||
- name: Configure and Build Project
|
||||
id: cmake-action
|
||||
uses: ./
|
||||
with:
|
||||
@ -105,17 +105,17 @@ jobs:
|
||||
run-build: true
|
||||
build-args: --target test_c --target test_cpp
|
||||
|
||||
- name: Test the project
|
||||
- name: Test Project
|
||||
run: ctest --test-dir ${{ steps.cmake-action.outputs.build-dir }} --output-on-failure --no-tests=error -R test
|
||||
|
||||
test-action-with-run-test:
|
||||
name: Test Action With Run Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Use the action with run test enabled
|
||||
- name: Configure, Build, and Test Project
|
||||
uses: ./
|
||||
with:
|
||||
source-dir: test
|
||||
@ -130,10 +130,10 @@ jobs:
|
||||
matrix:
|
||||
compiler: [gcc, msvc]
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Use the action with additional compiler flags
|
||||
- name: Configure, Build, and Test Project
|
||||
uses: ./
|
||||
with:
|
||||
source-dir: test
|
||||
@ -153,10 +153,10 @@ jobs:
|
||||
matrix:
|
||||
os: [windows, ubuntu, macos]
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Use the action with specified generator and compilers
|
||||
- name: Configure, Build, and Test Project
|
||||
uses: ./
|
||||
with:
|
||||
source-dir: test
|
||||
|
Loading…
Reference in New Issue
Block a user