mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-28 23:00:50 +00:00
Switch from travis to github actions for CI
travis.org is no longer active
This commit is contained in:
parent
7c84799c4f
commit
853258fff0
39
.github/workflows/ci-linux.yml
vendored
Normal file
39
.github/workflows/ci-linux.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
compiler: [gcc, clang]
|
||||||
|
env:
|
||||||
|
CC: ${{ matrix.compiler }}
|
||||||
|
LSAN_OPTIONS: verbosity=1:log_threads=1
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install deps
|
||||||
|
run: sudo apt-get install check ninja-build doxygen
|
||||||
|
|
||||||
|
- 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
|
||||||
|
run: cd build && cmake --build .
|
||||||
|
- name: Build docs with cmake
|
||||||
|
run: cd build && cmake --build . --target lwipdocs
|
||||||
|
|
||||||
|
- name: Validate combinations of options
|
||||||
|
run: cd contrib/ports/unix/example_app && ./iteropts.sh
|
||||||
|
|
42
.travis.yml
42
.travis.yml
@ -1,42 +0,0 @@
|
|||||||
language: c
|
|
||||||
os: linux
|
|
||||||
sudo: required
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- compiler: gcc-7
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
|
||||||
- check
|
|
||||||
- libsubunit-dev
|
|
||||||
- gcc-7
|
|
||||||
- ninja-build
|
|
||||||
- doxygen
|
|
||||||
env:
|
|
||||||
- LSAN_OPTIONS=verbosity=1:log_threads=1
|
|
||||||
|
|
||||||
- compiler: clang-7
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
- llvm-toolchain-trusty-7
|
|
||||||
packages:
|
|
||||||
- check
|
|
||||||
- libsubunit-dev
|
|
||||||
- clang-7
|
|
||||||
- ninja-build
|
|
||||||
- doxygen
|
|
||||||
env:
|
|
||||||
- LSAN_OPTIONS=verbosity=1:log_threads=1
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
# Install cmake
|
|
||||||
- wget -O cmake.sh https://cmake.org/files/v3.12/cmake-3.12.0-Linux-x86_64.sh
|
|
||||||
- sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local
|
|
||||||
|
|
||||||
script:
|
|
||||||
- ./travis.sh
|
|
65
travis.sh
65
travis.sh
@ -1,65 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
RETVAL=0
|
|
||||||
|
|
||||||
cd contrib/ports/unix/check
|
|
||||||
|
|
||||||
#build and run unit tests
|
|
||||||
make clean all
|
|
||||||
|
|
||||||
# Build test using make, this tests the Makefile toolchain
|
|
||||||
make check -j 4
|
|
||||||
ERR=$?
|
|
||||||
echo Return value from unittests: $ERR
|
|
||||||
if [ $ERR != 0 ]; then
|
|
||||||
echo "++++++++++++++++++++++++++++++ unittests build failed"
|
|
||||||
RETVAL=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build example_app using cmake, this tests the CMake toolchain
|
|
||||||
cd ../../../../
|
|
||||||
# Copy lwipcfg for example app
|
|
||||||
cp contrib/examples/example_app/lwipcfg.h.travis contrib/examples/example_app/lwipcfg.h
|
|
||||||
|
|
||||||
# Generate CMake
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
/usr/local/bin/cmake .. -G Ninja
|
|
||||||
ERR=$?
|
|
||||||
echo Return value from cmake generate: $ERR
|
|
||||||
if [ $ERR != 0 ]; then
|
|
||||||
echo "++++++++++++++++++++++++++++++ cmake GENERATE failed"
|
|
||||||
RETVAL=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build CMake
|
|
||||||
/usr/local/bin/cmake --build .
|
|
||||||
ERR=$?
|
|
||||||
echo Return value from build: $ERR
|
|
||||||
if [ $ERR != 0 ]; then
|
|
||||||
echo "++++++++++++++++++++++++++++++ cmake build failed"
|
|
||||||
RETVAL=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build docs
|
|
||||||
/usr/local/bin/cmake --build . --target lwipdocs
|
|
||||||
ERR=$?
|
|
||||||
echo Return value from lwipdocs: $ERR
|
|
||||||
if [ $ERR != 0 ]; then
|
|
||||||
echo "++++++++++++++++++++++++++++++ lwIP documentation failed"
|
|
||||||
RETVAL=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Test different lwipopts.h
|
|
||||||
cd ..
|
|
||||||
cd contrib/ports/unix/example_app
|
|
||||||
./iteropts.sh
|
|
||||||
ERR=$?
|
|
||||||
echo Return value from iteropts: $ERR
|
|
||||||
if [ $ERR != 0 ]; then
|
|
||||||
echo "++++++++++++++++++++++++++++++ lwIP iteropts test failed"
|
|
||||||
RETVAL=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo Exit value: $RETVAL
|
|
||||||
exit $RETVAL
|
|
Loading…
Reference in New Issue
Block a user