ssldump/.github/workflows/build.yml

52 lines
1.4 KiB
YAML
Raw Normal View History

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:
2023-04-12 10:28:39 +00:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
2023-04-12 10:28:39 +00:00
os: [ubuntu-latest, macos-latest]
compiler: [cc, clang, gcc-12]
2023-04-12 10:28:39 +00:00
exclude:
- os: macos-latest
compiler: cc
- os: macos-latest
compiler: gcc-12
steps:
- name: Checkout code
uses: actions/checkout@v3
2023-04-12 10:28:39 +00:00
- name: Install macOS autogen prerequisites
run: brew install autoconf automake
if: ${{ runner.os == 'macOS' }}
2023-02-04 23:50:29 +00:00
- name: ./autogen.sh
run: ./autogen.sh
- name: Compiler version
run: $CC -v
env:
CC: ${{ matrix.compiler }}
2023-04-12 10:28:39 +00:00
- name: Install Linux dependencies
2023-02-06 01:51:00 +00:00
run: sudo apt install autoconf libssl-dev libpcap-dev libnet1-dev libjson-c-dev
2023-04-12 10:28:39 +00:00
if: ${{ runner.os == 'Linux' }}
- name: Install macOS dependencies
run: |
brew install openssl@3 libpcap libnet json-c
echo "LDFLAGS=-L$(brew --prefix openssl@3)/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I$(brew --prefix openssl@3)/include" >> $GITHUB_ENV
if: ${{ runner.os == 'macOS' }}
- name: ./configure
run: ./configure
env:
CC: ${{ matrix.compiler }}
- name: make
run: make