From d1eb95c7b61101c66aa43fe25efa84ce570bda1c Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Mon, 9 Oct 2023 23:04:42 +0200 Subject: [PATCH] Compile with both gcc and clang --- .github/workflows/main.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4aded7..47d94bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,6 +10,14 @@ jobs: container: image: ubuntu:22.04 + strategy: + matrix: + include: + - CC: gcc + CXX: g++ + - CC: clang + CXX: clang++ + # don't run pull requests from local branches twice if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository @@ -20,7 +28,7 @@ jobs: - name: Install packages run: | apt-get -q -y update - apt-get -q -y install build-essential cmake git + apt-get -q -y install build-essential cmake git clang - uses: actions/checkout@v3 with: @@ -30,7 +38,7 @@ jobs: run: | mkdir -p build cd build - cmake .. + CC=${{ matrix.CC }} CXX=${{ matrix.CXX }} cmake .. cmake --build . DESTDIR=../out cmake --install .