]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
github: move away from Travis to GitHub Actions
authorVincent Bernat <vincent@bernat.ch>
Sun, 8 Nov 2020 15:01:20 +0000 (16:01 +0100)
committerVincent Bernat <vincent@bernat.ch>
Sun, 8 Nov 2020 16:26:56 +0000 (17:26 +0100)
.github/workflows/tests.yml [new file with mode: 0644]
.travis.yml [deleted file]
README.md
tests/ci/install.sh
tests/ci/run.sh

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644 (file)
index 0000000..4b0cf1c
--- /dev/null
@@ -0,0 +1,70 @@
+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
+          if-no-files-found: error
+      - name: Upload MacOS release package
+        uses: actions/upload-artifact@v2
+        if: matrix.release && matrix.os == 'macos-latest'
+        with:
+          name: package
+          path: lldpd-*.pkg
+          if-no-files-found: error
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644 (file)
index a92b49d..0000000
+++ /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"
index 0fd3a24b736b54b0af49e171bec66a0b25aa0f69..039585a878d078f0b9bc85b26f24db87c54c8b82 100644 (file)
--- 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/
 
index 580fcfd2f4d73a7697d44932ce326ae0c075d11b..fbef05ad39e689066ae776262dd7079c324b7796 100755 (executable)
@@ -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"
index 24a727ff8614e2b8bae2143fe615bf8f5143a3fb..e1d36f3ecb95bca6ba4fd35a5d45d41aa668c9d7 100755 (executable)
@@ -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