Skip to content

Commit

Permalink
linux CI: Add clang
Browse files Browse the repository at this point in the history
Clang is stricter, especially when it comes to constexpr usage.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
  • Loading branch information
neheb authored and robUx4 committed Feb 24, 2024
1 parent 1abc68e commit 1beb075
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,34 @@ jobs:

- name: Run tests
run: ctest --test-dir _build
Linux-Clang:
runs-on: ubuntu-20.04
strategy:
matrix:
cxx: ['7', '17']
env:
CMAKE_OPTIONS: -DDEV_MODE=ON -DBUILD_TESTING=ON -DCMAKE_CXX_FLAGS="-stdlib=libc++"
steps:
- uses: lukka/get-cmake@latest
- uses: egor-tensin/setup-clang@v1
with:
version: ${{matrix.cxx}}

- name: Install libc++
run: |
sudo apt install -y libc++abi-${{matrix.cxx}}-dev libc++-${{matrix.cxx}}-dev
- name: Get pushed code
uses: actions/checkout@v3

- name: Configure
run: cmake -S . -B _build ${{ env.CMAKE_OPTIONS }} -DCMAKE_INSTALL_PREFIX:STRING=${GITHUB_WORKSPACE}/_built

- name: Build
run: cmake --build _build --parallel --verbose

- name: Test installation
run: cmake --install _build --prefix ${GITHUB_WORKSPACE}/_built

- name: Run tests
run: ctest --test-dir _build

0 comments on commit 1beb075

Please sign in to comment.