Skip to content

Commit

Permalink
Add clang as a compiler for CI
Browse files Browse the repository at this point in the history
Build with gcc and clang, to catch problems with either.
  • Loading branch information
peadar committed Jun 13, 2024
1 parent 24c6980 commit 119b314
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,35 @@ name: C/C++ CI

on:
push:
branches: [ "master", "ci" ]
branches: [ "master", "clang-ci" ]
pull_request:
branches: [ "master", "ci" ]
branches: [ "master", "clang-ci" ]

jobs:
build:
build-gcc:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: configure
run: cmake -DCMAKE_BUILD_TYPE=Release
run: |
sudo apt install g++
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++
- name: make
run: make
run: make VERBOSE=1
- name: make check
run: make check CTEST_OUTPUT_ON_FAILURE=TRUE

build-clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: configure
run: |
sudo apt install clang
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
- name: make
run: make VERBOSE=1
- name: make check
run: make check CTEST_OUTPUT_ON_FAILURE=TRUE

0 comments on commit 119b314

Please sign in to comment.