Skip to content

Commit

Permalink
ci: support clang
Browse files Browse the repository at this point in the history
Ubuntu 22.04 have clang 14 by default, which partially supports
consteval - it fails tntcxx build.
  • Loading branch information
drewdzzz committed Jan 12, 2024
1 parent 61d46cf commit c7f5ba6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/actions/build-tntcxx/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ 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'

runs:
using: "composite"
Expand All @@ -23,6 +25,8 @@ 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 }}
make -j
shell: bash
12 changes: 12 additions & 0 deletions .github/workflows/reusable-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ on:
cxx-standard:
required: false
type: number
c-compiler:
default: gcc
type: string
cxx-compiler:
default: g++
type: string
cxx-flags:
required: false
type: string
use-valgrind:
default: false
type: boolean
Expand Down Expand Up @@ -41,6 +50,9 @@ 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-flags: ${{ inputs.cxx-flags }}

- name: Test tntcxx
uses: ./.github/actions/test-tntcxx
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
- ubuntu-22.04
- macos-11
- macos-12
compiler:
- {c: gcc, cxx: g++, cxx-flags: ''}
- {c: clang, cxx: clang++, cxx-flags: '-stdlib=libc++'}
build-type:
- Debug
- RelWithDebInfo
Expand All @@ -28,6 +31,9 @@ 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-flags: ${{ matrix.compiler.cxx-flags }}

valgrind:
uses: ./.github/workflows/reusable-testing.yml
Expand Down

0 comments on commit c7f5ba6

Please sign in to comment.