ssldump/.github/workflows/build.yml

47 lines
1.4 KiB
YAML
Raw Permalink 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@v4
- name: Compiler version
run: $CC -v
env:
CC: ${{ matrix.compiler }}
2023-04-12 10:28:39 +00:00
- name: Install Linux dependencies
2023-08-10 09:07:37 +00:00
run: sudo apt install cmake ninja-build 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: |
2023-08-10 09:07:37 +00:00
brew install cmake ninja openssl@3 libpcap libnet json-c
2023-04-12 10:28:39 +00:00
echo "LDFLAGS=-L$(brew --prefix openssl@3)/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I$(brew --prefix openssl@3)/include" >> $GITHUB_ENV
if: ${{ runner.os == 'macOS' }}
2023-08-10 09:07:37 +00:00
- name: cmake -B ${{github.workspace}}/build -G Ninja
run: cmake -B ${{github.workspace}}/build -G Ninja
env:
CC: ${{ matrix.compiler }}
2023-08-10 09:07:37 +00:00
- name: ninja -C ${{github.workspace}}/build
run: ninja -C ${{github.workspace}}/build