Update gh workflows

This commit is contained in:
William Robinet 2023-08-10 11:07:37 +02:00
parent 3a6892ef5c
commit d94cbfa088
No known key found for this signature in database
GPG key ID: 003FA3DF74C7A949
2 changed files with 9 additions and 15 deletions

View file

@ -25,27 +25,22 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install macOS autogen prerequisites
run: brew install autoconf automake
if: ${{ runner.os == 'macOS' }}
- name: ./autogen.sh
run: ./autogen.sh
- name: Compiler version - name: Compiler version
run: $CC -v run: $CC -v
env: env:
CC: ${{ matrix.compiler }} CC: ${{ matrix.compiler }}
- name: Install Linux dependencies - name: Install Linux dependencies
run: sudo apt install autoconf libssl-dev libpcap-dev libnet1-dev libjson-c-dev run: sudo apt install cmake ninja-build libssl-dev libpcap-dev libnet1-dev libjson-c-dev
if: ${{ runner.os == 'Linux' }} if: ${{ runner.os == 'Linux' }}
- name: Install macOS dependencies - name: Install macOS dependencies
run: | run: |
brew install openssl@3 libpcap libnet json-c brew install cmake ninja openssl@3 libpcap libnet json-c
echo "LDFLAGS=-L$(brew --prefix openssl@3)/lib" >> $GITHUB_ENV echo "LDFLAGS=-L$(brew --prefix openssl@3)/lib" >> $GITHUB_ENV
echo "CPPFLAGS=-I$(brew --prefix openssl@3)/include" >> $GITHUB_ENV echo "CPPFLAGS=-I$(brew --prefix openssl@3)/include" >> $GITHUB_ENV
if: ${{ runner.os == 'macOS' }} if: ${{ runner.os == 'macOS' }}
- name: ./configure - name: cmake -B ${{github.workspace}}/build -G Ninja
run: ./configure run: cmake -B ${{github.workspace}}/build -G Ninja
env: env:
CC: ${{ matrix.compiler }} CC: ${{ matrix.compiler }}
- name: make - name: ninja -C ${{github.workspace}}/build
run: make run: ninja -C ${{github.workspace}}/build

View file

@ -31,10 +31,9 @@ jobs:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
- name: Build Application using script - name: Build Application using script
run: | run: |
./autogen.sh sudo apt install cmake ninja-build libssl-dev libpcap-dev libnet1-dev libjson-c-dev
sudo apt install autoconf libssl-dev libpcap-dev libnet1-dev libjson-c-dev cmake -B ${{github.workspace}}/build -G Ninja
./configure ninja -C ${{github.workspace}}/build
make
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2 uses: github/codeql-action/analyze@v2
with: with: