From f0c9f5f9f04a9b4da45aa56c13d2165d68a197c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Fekete?= Date: Thu, 19 Jan 2023 17:56:16 -0500 Subject: [PATCH] Multi compiler test (#5991) * First attempt with GCC only * Make the test run on every push temporarily Also clean up the description of the workflow * Fix invalid job name * Missing hunks added * Try out matrix actions * Fix missing 'runs-on' * Only needs to run on Ubuntu * Use local installations of gcc/clang instead of containers * Explicitly list out compilers to test * Clean up names and concurrency group * Only need to run on PRs and important branches Co-authored-by: Andras Fekete --- .github/workflows/multi-compiler.yml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/multi-compiler.yml diff --git a/.github/workflows/multi-compiler.yml b/.github/workflows/multi-compiler.yml new file mode 100644 index 000000000..114dd20ed --- /dev/null +++ b/.github/workflows/multi-compiler.yml @@ -0,0 +1,39 @@ +name: Multiple compilers and versions +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +on: + push: + branches: [ 'master', 'main', 'release/**' ] + pull_request: + branches: [ '*' ] + +jobs: + my_matrix: + name: Compiler test + strategy: + matrix: + include: + - CC: gcc-9 + CXX: g++-9 + - CC: gcc-10 + CXX: g++-10 + - CC: gcc-11 + CXX: g++-11 + - CC: gcc-12 + CXX: g++-12 + - CC: clang-12 + CXX: clang++-12 + - CC: clang-13 + CXX: clang++-13 + - CC: clang-14 + CXX: clang++-14 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build + env: + CC: ${{ matrix.CC }} + CXX: ${{ matrix.CXX }} + run: ./autogen.sh && ./configure && make && make dist