Skip to content

Make it easier to see the steps needed for the two packet paths by re… #423

Make it easier to see the steps needed for the two packet paths by re…

Make it easier to see the steps needed for the two packet paths by re… #423

Workflow file for this run

---
name: Quick Tests
# yamllint disable-line rule:truthy
on:
push:
pull_request:
workflow_dispatch:
jobs:
smoketest:
name: Smoke test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fix Checkout
run: |
git fetch --force --tags
- name: Run minimal test set
run: |
./autogen.sh
./configure
make -j4 all
make test
- if: ${{ failure() }}
name: Upload tests output
uses: actions/upload-artifact@v4
with:
name: tests-smoketest
path: tests
smoketest_all_opts:
name: Smoke test With all options turned on
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fix Checkout
run: |
git fetch --force --tags
- name: Install libraries needed for all options turned on
run: |
sudo apt-get install -y \
libminiupnpc-dev \
libnatpmp-dev \
libpcap-dev \
libcap-dev \
libzstd-dev
- name: Run minimal test set
run: |
./autogen.sh
./configure \
--enable-pthread \
--enable-miniupnp \
--enable-natpmp \
--enable-cap \
--enable-pcap \
--with-openssl \
--with-zstd \
CFLAGS="-O3 -fprofile-arcs -ftest-coverage"
LDFLAGS="--coverage"
make build-dep
make -j4 all
make test
- name: Generate coverage reports
run: |
make gcov
make cover COVERAGEDIR=coverage/ubuntu-latest
shell: bash
- name: Upload gcovr report artifact
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage
- name: Upload data to codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# TODO: Since windows has a bunch of build differences, it would be good to
# have a smoketest for it, but it is about 5 times slower than the other
# quick tests...
#
# smoketest_windows:
# name: Smoke test Windows
# runs-on: windows-latest
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Fix Checkout
# run: |
# git fetch --force --tags
#
# - name: Run minimal test set
# run: |
# ./scripts/hack_fakeautoconf.sh
# make
# make test.units
# shell: bash
lint:
name: Code syntax
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fix Checkout
run: |
git fetch --force --tags
- name: Make the makefiles
run: |
./autogen.sh
./configure
- name: Install essential
run: |
sudo apt update
make build-dep
- name: Run the lint tools
run: |
make lint