From b9497036aebaeb83a04debc9995d599fbc92d98b Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Sat, 26 Nov 2022 11:15:33 +0100 Subject: [PATCH] Add matrix --- .github/workflows/github-actions.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 5c38106d0..df3753e52 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -47,23 +47,31 @@ jobs: # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. # You can convert this to a matrix build if you need cross-platform coverage. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - example_matrix: - strategy: - matrix: - os: [ubuntu-latest, ubuntu-20.04, ubuntu-22.04, ubuntu-18.04, macos-12, macos-11, macos-10.15] + strategy: + matrix: + cc: [gcc, clang] + os: [ubuntu-latest, ubuntu-20.04, ubuntu-22.04, ubuntu-18.04, macos-12, macos-11, macos-10.15] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Start worker - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." && echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"; echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + run: | + echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." && echo "🖥️ The workflow is now ready to test your code on the runner." + run: | + echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + echo "🖥️ The workflow is now ready to test your code on the runner." - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y debhelper bison check cmake flex groff libbsd-dev libcurl4-openssl-dev libgtk2.0-dev libidn11-dev librtmp-dev libltdl-dev libluajit-5.1-dev libncurses5-dev libnet1-dev libpcap-dev libpcre3-dev libssl-dev libgtk-3-dev libgeoip-dev + run: | + sudo apt-get update + sudo apt-get install -y ${{ matrix.cc }} debhelper bison check cmake flex groff libbsd-dev libcurl4-openssl-dev libgtk2.0-dev libidn11-dev librtmp-dev libltdl-dev libluajit-5.1-dev libncurses5-dev libnet1-dev libpcap-dev libpcre3-dev libssl-dev libgtk-3-dev libgeoip-dev - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.