From c4bfd2074e36233c49f6e9ce240c4716fdea6ffb Mon Sep 17 00:00:00 2001 From: Jose Plaud Date: Wed, 31 Jul 2024 07:40:16 -0400 Subject: [PATCH] CI/CD matrix for GNU and Clang Compiler versions within github actions - first version --- .github/workflows/main.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 981aa04..3af7b84 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,8 +9,28 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + compiler: + - { name: 'clang', version: '13' } + - { name: 'clang', version: '14' } + - { name: 'clang', version: '15' } + - { name: 'gnu', version: '10' } + - { name: 'gnu', version: '11' } + - { name: 'gnu', version: '12' } steps: - uses: actions/checkout@v4 + - name: Set up compiler + run: | + sudo apt-get update + if [ "${{ matrix.compiler.name }}" == "gnu" ]; then + sudo apt-get install -y g++-${{ matrix.compiler.version }} + elif [ "${{ matrix.compiler.name }}" == "clang" ]; then + sudo apt-get install -y clang-${{ matrix.compiler.version }} + fi + - name: make check - run: make check \ No newline at end of file + run: make check + env: + CXX: ${{ matrix.compiler.name }}-${{ matrix.compiler.version }} \ No newline at end of file