diff --git a/.github/actions/build-tntcxx/action.yml b/.github/actions/build-tntcxx/action.yml index 9a715f7f4..c7fef8e20 100644 --- a/.github/actions/build-tntcxx/action.yml +++ b/.github/actions/build-tntcxx/action.yml @@ -9,6 +9,16 @@ inputs: default: 'false' cxx-standard: desciption: 'Corresponds to CMAKE_CXX_STANDARD option of CMake' + cxx-flags: + desciption: 'Corresponds to CMAKE_CXX_FLAGS option of CMake' + cxx-compiler: + description: 'a' + c-compiler: + description: 'a' + cxx-compiler-flags: + description: 'a' + exe-linker-flags: + description: 'b' runs: using: "composite" @@ -23,6 +33,10 @@ runs: -DTNTCXX_ENABLE_SSL=ON \ -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} \ -DTNTCXX_ENABLE_SANITIZERS=${{ inputs.enable-sanitizers }} \ - -DCMAKE_CXX_STANDARD=${{ inputs.cxx-standard }} + -DCMAKE_CXX_STANDARD=${{ inputs.cxx-standard }} \ + -DCMAKE_C_COMPILER=${{ inputs.c-compiler }} \ + -DCMAKE_CXX_COMPILER=${{ inputs.cxx-compiler }} \ + -DCMAKE_CXX_FLAGS=${{ inputs.cxx-compiler-flags }} \ + -DCMAKE_EXE_LINKER_FLAGS=${{ inputs.exe-linker-flags }} make -j shell: bash diff --git a/.github/workflows/reusable-testing.yml b/.github/workflows/reusable-testing.yml index 0937525fc..8532a7785 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -12,6 +12,18 @@ on: cxx-standard: required: false type: number + c-compiler: + default: gcc + type: string + cxx-compiler: + default: g++ + type: string + cxx-compiler-flags: + required: false + type: string + exe-linker-flags: + required: false + type: string use-valgrind: default: false type: boolean @@ -41,6 +53,10 @@ jobs: build-type: ${{ inputs.build-type }} enable-sanitizers: ${{ inputs.enable-sanitizers }} cxx-standard: ${{ inputs.cxx-standard }} + c-compiler: ${{ inputs.c-compiler }} + cxx-compiler: ${{ inputs.cxx-compiler }} + cxx-compiler-flags: ${{ inputs.cxx-compiler-flags }} + exe-linker-flags: ${{ inputs.exe-linker-flags }} - name: Test tntcxx uses: ./.github/actions/test-tntcxx diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 313e3f9a9..0890c2b4f 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -18,6 +18,9 @@ jobs: - ubuntu-22.04 - macos-11 - macos-12 + compiler: + - {c: gcc, cxx: g++} + - {c: clang, cxx: clang++, cxx-compiler-flags: '-stdlib=libc++', exe-linker-flags: '-stdlib=libc++'} build-type: - Debug - RelWithDebInfo @@ -28,6 +31,10 @@ jobs: runs-on: ${{ matrix.runs-on }} build-type: ${{ matrix.build-type }} cxx-standard: ${{ matrix.cxx-standard }} + c-compiler: ${{ matrix.compiler.c }} + cxx-compiler: ${{ matrix.compiler.cxx }} + cxx-compiler-flags: ${{ matrix.compiler.cxx-compiler-flags }} + exe-linker-flags: ${{ matrix.compiler.exe-linker-flags }} valgrind: uses: ./.github/workflows/reusable-testing.yml