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 committed Jan 28, 2024
1 parent c587660 commit 1d3f685
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,32 @@ 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}}
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

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

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

0 comments on commit 1d3f685

Please sign in to comment.