Improve CI builds using matrix strategy

This commit is contained in:
Robert Scheck 2023-02-04 01:59:33 +01:00
parent 633a9452c7
commit b3af6e8c74
4 changed files with 36 additions and 50 deletions

35
.github/workflows/build.yml vendored Normal file
View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,7 +1,6 @@
# ssldump - (de-facto repository gathering patches around the cyberspace) # ssldump - (de-facto repository gathering patches around the cyberspace)
![Clang CI](https://github.com/adulau/ssldump/workflows/Clang%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)
![GCC CI](https://github.com/adulau/ssldump/workflows/GCC%20CI/badge.svg)
# Release and tagging # Release and tagging