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..00551fff7 100644 --- a/.github/workflows/reusable-testing.yml +++ b/.github/workflows/reusable-testing.yml @@ -12,6 +12,12 @@ on: cxx-standard: required: false type: number + c-compiler: + default: gcc + type: string + cxx-compiler: + default: g++ + type: string use-valgrind: default: false type: boolean @@ -35,12 +41,21 @@ jobs: if: inputs.use-valgrind run: sudo apt update && sudo apt install -y valgrind + - name: Remove gcc-13 + if: ${{ inputs.runs-on == ubuntu-22.04 && inputs.cxx-compiler == clang++ }} + run: | + sudo apt remove gcc-13 g++-13 libstdc++-13-dev gcc g++ libstdc++-dev + sudo apt autoremove + sudo apt install g++-12 + - name: Build tntcxx uses: ./.github/actions/build-tntcxx with: 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 }} - name: Test tntcxx uses: ./.github/actions/test-tntcxx diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 313e3f9a9..fe2a04f34 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -18,16 +18,27 @@ jobs: - ubuntu-22.04 - macos-11 - macos-12 + compiler: + - {c: gcc, cxx: g++} + - {c: clang, cxx: clang++} build-type: - Debug - RelWithDebInfo cxx-standard: - 17 - 20 + exclude: + - runs-on: macos-11 + compiler: {c: gcc, cxx: g++} + - runs-on: macos-12 + compiler: {c: gcc, cxx: g++} + with: 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 }} valgrind: uses: ./.github/workflows/reusable-testing.yml