ci: Add simple CI test

with relaxed criteria on the lingering test, as the fix is not added yet
This commit is contained in:
David Cermak
2024-09-10 14:53:04 +02:00
parent 531e7999e8
commit f49974d881
22 changed files with 999 additions and 21 deletions
+38 -16
View File
@@ -1,32 +1,31 @@
name: CI
on:
push:
branches: [master]
on: [push, pull_request]
jobs:
build:
build-and-test:
strategy:
matrix:
compiler: [gcc, clang]
env:
CC: ${{ matrix.compiler }}
LSAN_OPTIONS: verbosity=1:log_threads=1
WGET_CHECK2JUNIT_PY: https://raw.githubusercontent.com/gsauthof/utility/42792030/check2junit.py
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install deps
run: sudo apt-get install check ninja-build doxygen
run: |
sudo apt-get install check ninja-build doxygen
python -m pip install lxml junit-xml
wget --no-verbose ${WGET_CHECK2JUNIT_PY}
- name: Build and Run unit tests with make and cmake
run: ./test/ci/unit_tests.sh
- name: Copy lwipcfg.h for example app
run: cp contrib/examples/example_app/lwipcfg.h.ci contrib/examples/example_app/lwipcfg.h
- name: Build unit tests with make
run: make -C contrib/ports/unix/check
- name: Run unit tests
run: make -C contrib/ports/unix/check check
- name: Run cmake
run: mkdir build && cd build && cmake .. -G Ninja
- name: Build with cmake
@@ -35,9 +34,32 @@ jobs:
run: cd build && cmake --build . --target lwipdocs
- name: Validate combinations of options
run: cd contrib/ports/unix/example_app && ./iteropts.sh
run: ./test/ci/validate_opts.sh
- name: Build the default example app
run: |
cp contrib/examples/example_app/lwipcfg.h.example contrib/examples/example_app/lwipcfg.h
make -C contrib/ports/unix/example_app TESTFLAGS="-Wno-documentation" -j 4
- name: Build and run test apps
run: ./test/ci/test_apps.sh
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: Test Results ${{ matrix.compiler }}
path: "*.xml"
publish-test-results:
name: "Publish Tests Results"
needs: build-and-test
runs-on: ubuntu-latest
permissions:
checks: write
if: always()
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
junit_files: "artifacts/**/*.xml"