mirror of
https://github.com/threeal/cmake-action.git
synced 2025-04-21 19:11:21 +00:00
use matrix for testing action with specified C and CXX compiler
This commit is contained in:
parent
2511f03a88
commit
c7a5566aa6
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@ -55,6 +55,9 @@ jobs:
|
|||||||
|
|
||||||
use-action-with-specified-compiler:
|
use-action-with-specified-compiler:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
lang: [C, CXX]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3.3.0
|
uses: actions/checkout@v3.3.0
|
||||||
@ -63,11 +66,14 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
source-dir: test
|
source-dir: test
|
||||||
c-compiler: clang
|
c-compiler: ${{ matrix.lang == 'C' && 'clang' || '' }}
|
||||||
cxx-compiler: clang++
|
cxx-compiler: ${{ matrix.lang == 'CXX' && 'clang++' || '' }}
|
||||||
|
args: |
|
||||||
|
-D BUILD_C=${{ matrix.lang == 'C' && 'ON' || 'OFF' }}
|
||||||
|
-D BUILD_CXX=${{ matrix.lang == 'CXX' && 'ON' || 'OFF' }}
|
||||||
|
|
||||||
- name: Run build result
|
- name: Run build result
|
||||||
run: build/hello_world
|
run: build/${{ matrix.lang == 'C' && 'hello_world_c' || 'hello_world' }}
|
||||||
|
|
||||||
use-action-with-additional-args:
|
use-action-with-additional-args:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
Loading…
Reference in New Issue
Block a user