diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d9a62b..33af546 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -55,6 +55,9 @@ jobs: use-action-with-specified-compiler: runs-on: ubuntu-latest + strategy: + matrix: + lang: [C, CXX] steps: - name: Checkout repository uses: actions/checkout@v3.3.0 @@ -63,11 +66,14 @@ jobs: uses: ./ with: source-dir: test - c-compiler: clang - cxx-compiler: clang++ + c-compiler: ${{ matrix.lang == 'C' && '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 - run: build/hello_world + run: build/${{ matrix.lang == 'C' && 'hello_world_c' || 'hello_world' }} use-action-with-additional-args: runs-on: ubuntu-latest