Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
drewdzzz committed Jan 12, 2024
1 parent 61d46cf commit 5c762d9
Showing 3 changed files with 38 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/actions/build-tntcxx/action.yml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions .github/workflows/reusable-testing.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5c762d9

Please sign in to comment.