From: Vincent Bernat Date: Sun, 8 Nov 2020 15:01:20 +0000 (+0100) Subject: github: move away from Travis to GitHub Actions X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Ffeature%2Fgithub-actions;p=thirdparty%2Flldpd.git github: move away from Travis to GitHub Actions --- diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..bd01dc0f --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,68 @@ +name: CI +on: + push: + pull_request: + schedule: + - cron: 0 7 1 * * +jobs: + build: + strategy: + matrix: + os: + - ubuntu-latest + config-args: + - "--with-embedded-libevent" + - "--disable-shared --enable-static" + - "--disable-privsep --with-snmp" + - "--with-snmp --disable-lldpmed --disable-dot1 --disable-dot3 --disable-custom" + - "--enable-oldies" + - "--enable-dtrace" + - "--with-seccomp" + compiler: + - gcc + release: + - false + include: + - os: ubuntu-latest + config-args: '' + release: true + - os: ubuntu-latest + compiler: clang + config-args: "--with-snmp --with-xml" + - os: macos-latest + compiler: clang + config-args: "--with-snmp --with-xml" + - os: macos-latest + compiler: clang + config-args: > + --prefix=/usr/local + --localstatedir=/var + --sysconfdir=/private/etc + --with-embedded-libevent + --without-snmp + --without-xml + release: true + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install stuff + run: ./tests/ci/install.sh + - name: Build and run tests + run: ./tests/ci/run.sh + env: + LLDPD_CONFIG_ARGS: ${{ matrix.config-args }} + CC: ${{ matrix.compiler }} + - name: Upload release tarball + uses: actions/upload-artifact@v2 + if: matrix.release && matrix.os == 'ubuntu-latest' + with: + name: tarball + path: lldpd-*.tar.gz + - name: Upload MacOS release package + uses: actions/upload-artifact@v2 + if: matrix.release && matrix.os == 'macos-latest' + with: + name: package + path: lldpd-*.pkg diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a92b49db..00000000 --- a/.travis.yml +++ /dev/null @@ -1,51 +0,0 @@ -language: c -os: linux -dist: bionic -compiler: gcc -sudo: require -install: - - ./tests/ci/install.sh -script: - - ./tests/ci/run.sh -env: - matrix: - - LLDPD_CONFIG_ARGS="" - - LLDPD_CONFIG_ARGS="--with-embedded-libevent" - - LLDPD_CONFIG_ARGS="--disable-shared --enable-static" - - LLDPD_CONFIG_ARGS="--disable-privsep --with-snmp" - - LLDPD_CONFIG_ARGS="--with-snmp --disable-lldpmed --disable-dot1 --disable-dot3 --disable-custom" - - LLDPD_CONFIG_ARGS="--enable-oldies" - - LLDPD_CONFIG_ARGS="--enable-dtrace" - - LLDPD_CONFIG_ARGS="--with-seccomp" -matrix: - include: - - os: linux - compiler: clang - env: LLDPD_CONFIG_ARGS="--with-snmp --with-xml" - - os: linux - arch: ppc64el - env: LLDPD_CONFIG_ARGS="--with-snmp --with-xml" - - os: osx - compiler: clang - env: LLDPD_CONFIG_ARGS="--with-snmp --with-xml" - - os: osx - compiler: clang - env: - - MAKE_ARGS="" - - LLDPD_CONFIG_ARGS="--with-embedded-libevent" - - os: osx - compiler: clang - if: tag =~ ^[0-9] - env: - - MAKE_ARGS="" - - LLDPD_UPLOAD=1 - - LLDPD_CONFIG_ARGS="--prefix=/usr/local --localstatedir=/var --sysconfdir=/private/etc --with-embedded-libevent --without-snmp --without-xml" -deploy: - - provider: s3 - skip_cleanup: true - local_dir: upload - bucket: lldpd-releases - acl: public_read - on: - all_branches: true - condition: "$LLDPD_UPLOAD = 1" diff --git a/README.md b/README.md index 0fd3a24b..039585a8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ lldpd: implementation of IEEE 802.1ab (LLDP) ============================================ -[![Build Status](https://secure.travis-ci.org/vincentbernat/lldpd.png?branch=master)](http://travis-ci.org/vincentbernat/lldpd) +![Build Status](https://github.com/vincentbernat/lldpd/workflows/CI/badge.svg) http://vincentbernat.github.com/lldpd/ diff --git a/tests/ci/install.sh b/tests/ci/install.sh index 580fcfd2..fbef05ad 100755 --- a/tests/ci/install.sh +++ b/tests/ci/install.sh @@ -6,6 +6,8 @@ case "$(uname -s)" in Darwin) brew update > /dev/null brew bundle --file=- <<-EOS +brew "automake" +brew "autoconf" brew "libtool" brew "libxml2" brew "check" diff --git a/tests/ci/run.sh b/tests/ci/run.sh index 24a727ff..e1d36f3e 100755 --- a/tests/ci/run.sh +++ b/tests/ci/run.sh @@ -9,10 +9,12 @@ case "$(uname -s)" in [ $(uname -m) != x86_64 ] || \ LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --enable-sanitizers" LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS LDFLAGS=-fuse-ld=gold" + MAKE_ARGS="-Werror" ;; Darwin) LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS CFLAGS=-mmacosx-version-min=10.9" LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS LDFLAGS=-mmacosx-version-min=10.9" + MAKE_ARGS="" ;; esac @@ -38,8 +40,6 @@ case "$(uname -s)" in # Create a package make -C osx pkg otool -l osx/lldpd*/usr/local/sbin/lldpd - mkdir upload - mv *.pkg upload ;; Linux) # Integration tests