ci: checkout action to cmake-action directory

This commit is contained in:
Alfi Maulana 2024-03-25 13:21:54 +07:00
parent d83693c521
commit 495dcb2d38
No known key found for this signature in database
GPG Key ID: 2242A64C2A8DF5A4

View File

@ -61,6 +61,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4.1.2 uses: actions/checkout@v4.1.2
with: with:
path: cmake-action
sparse-checkout: | sparse-checkout: |
action.yml action.yml
dist dist
@ -68,10 +69,10 @@ jobs:
sparse-checkout-cone-mode: false sparse-checkout-cone-mode: false
- name: Move Project - name: Move Project
run: mv test/* . run: mv cmake-action/test/* .
- name: Configure and Build Project - name: Configure and Build Project
uses: ./ uses: ./cmake-action
- name: Test Project - name: Test Project
uses: threeal/ctest-action@v1.0.0 uses: threeal/ctest-action@v1.0.0
@ -86,6 +87,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4.1.2 uses: actions/checkout@v4.1.2
with: with:
path: cmake-action
sparse-checkout: | sparse-checkout: |
action.yml action.yml
dist dist
@ -94,14 +96,14 @@ jobs:
- name: Configure and Build Project - name: Configure and Build Project
id: cmake-action id: cmake-action
uses: ./ uses: ./cmake-action
with: with:
source-dir: test source-dir: cmake-action/test
build-dir: output build-dir: output
- name: Default Build Directory Should Not Exist - name: Default Build Directory Should Not Exist
shell: bash shell: bash
run: test ! -e build && test ! -e test/build run: test ! -e build && test ! -e cmake-action/test/build
- name: Test Project - name: Test Project
uses: threeal/ctest-action@v1.0.0 uses: threeal/ctest-action@v1.0.0
@ -116,6 +118,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4.1.2 uses: actions/checkout@v4.1.2
with: with:
path: cmake-action
sparse-checkout: | sparse-checkout: |
action.yml action.yml
dist dist
@ -124,9 +127,9 @@ jobs:
- name: Configure Project - name: Configure Project
id: cmake-action id: cmake-action
uses: ./ uses: ./cmake-action
with: with:
source-dir: test source-dir: cmake-action/test
run-build: false run-build: false
- name: Try to Test Project - name: Try to Test Project
@ -152,6 +155,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4.1.2 uses: actions/checkout@v4.1.2
with: with:
path: cmake-action
sparse-checkout: | sparse-checkout: |
action.yml action.yml
dist dist
@ -160,9 +164,9 @@ jobs:
- name: Configure and Build Project - name: Configure and Build Project
id: cmake-action id: cmake-action
uses: ./ uses: ./cmake-action
with: with:
source-dir: test source-dir: cmake-action/test
c-flags: ${{ matrix.compiler == 'msvc' && '/w /WX-' || '-Wno-unused-variable' }} c-flags: ${{ matrix.compiler == 'msvc' && '/w /WX-' || '-Wno-unused-variable' }}
cxx-flags: ${{ matrix.compiler == 'msvc' && '/w /WX-' || '-Wno-unused-variable' }} cxx-flags: ${{ matrix.compiler == 'msvc' && '/w /WX-' || '-Wno-unused-variable' }}
options: CHECK_SURPASS_WARNING=ON options: CHECK_SURPASS_WARNING=ON
@ -186,6 +190,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v4.1.2 uses: actions/checkout@v4.1.2
with: with:
path: cmake-action
sparse-checkout: | sparse-checkout: |
action.yml action.yml
dist dist
@ -197,9 +202,9 @@ jobs:
- name: Configure and Build Project - name: Configure and Build Project
id: cmake-action id: cmake-action
uses: ./ uses: ./cmake-action
with: with:
source-dir: test source-dir: cmake-action/test
generator: Ninja generator: Ninja
c-compiler: clang c-compiler: clang
cxx-compiler: clang++ cxx-compiler: clang++