Skip to content

Add compiler defenses flags #119

Add compiler defenses flags

Add compiler defenses flags #119

Workflow file for this run

name: review
on: [pull_request]
jobs:
checkpatch:
name: checkpatch review
runs-on: ubuntu-latest
steps:
- name: 'Calculate PR commits + 1'
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
- name: Run checkpatch review
uses: webispy/checkpatch-action@v9
make:
name: Compilation test with gcc
strategy:
matrix:
gcc-version: [7, 8, 9, 10, 11, 12, 13]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Add ubuntu repository'
run: sudo add-apt-repository "deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe"
- name: 'Install gcc'
run: sudo apt-get update && sudo apt-get install gcc-${{ matrix.gcc-version }} g++-${{ matrix.gcc-version }}
- name: 'Install dependencies'
run: sudo apt-get install pkg-config automake autoconf autoconf-archive make libsgutils2-dev libudev-dev libpci-dev check
- name: 'Generate compiling configurations'
run: ./autogen.sh && ./configure --enable-test --enable-library
- name: 'Make'
run: CC=gcc-${{ matrix.gcc-version }} CXX=g++-${{ matrix.gcc-version }} && V=1 make -j$(nproc)