From b3af6e8c7452f863f4637d0172bc0b46f37c23b6 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Sat, 4 Feb 2023 01:59:33 +0100 Subject: [PATCH] Improve CI builds using matrix strategy --- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++++++++ .github/workflows/clang.yml | 24 ------------------------ .github/workflows/gcc.yml | 24 ------------------------ README.md | 3 +-- 4 files changed, 36 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/clang.yml delete mode 100644 .github/workflows/gcc.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1c53206 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + # build the main branch every Monday morning + - cron: '37 9 * * 1' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + compiler: [cc, clang, clang-13, gcc-10] + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: ./autogen + run: ./autogen.sh + - name: Compiler version + run: $CC -v + env: + CC: ${{ matrix.compiler }} + - name: Install dependencies + run: sudo apt-get install autoconf libtls-dev libpcap-dev libnet1-dev libjson-c-dev + - name: ./configure + run: ./configure + env: + CC: ${{ matrix.compiler }} + - name: make + run: make diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml deleted file mode 100644 index e87c3f4..0000000 --- a/.github/workflows/clang.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Clang CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: | - sudo apt install clang autoconf libpcap-dev libssl-dev libnet1-dev libjson-c-dev - - name: autogen - run: ./autogen.sh - - name: configure - run: ./configure CC=/usr/bin/clang - - name: make - run: make diff --git a/.github/workflows/gcc.yml b/.github/workflows/gcc.yml deleted file mode 100644 index d09f539..0000000 --- a/.github/workflows/gcc.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: GCC CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: | - sudo apt install autoconf libpcap-dev libssl-dev libnet1-dev libjson-c-dev - - name: autogen - run: ./autogen.sh - - name: configure - run: ./configure CC=/usr/bin/gcc - - name: make - run: make diff --git a/README.md b/README.md index 9919f61..b143770 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # ssldump - (de-facto repository gathering patches around the cyberspace) -![Clang CI](https://github.com/adulau/ssldump/workflows/Clang%20CI/badge.svg) -![GCC CI](https://github.com/adulau/ssldump/workflows/GCC%20CI/badge.svg) +[![Build CI](https://github.com/adulau/ssldump/actions/workflows/build.yml/badge.svg)](https://github.com/adulau/ssldump/actions/workflows/build.yml) # Release and tagging