]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
travis: upload OSX build to some S3 bucket
authorVincent Bernat <vincent@bernat.im>
Sun, 19 Nov 2017 19:42:26 +0000 (20:42 +0100)
committerVincent Bernat <vincent@bernat.im>
Mon, 20 Nov 2017 08:30:34 +0000 (09:30 +0100)
Still a WIP.

.travis.yml
tests/ci/run.sh

index 4676d08c452711b7bc191e0e2df7bca541e0356b..e85abc5028b169f559b53d4be31f78dcaf99fb45 100644 (file)
@@ -25,3 +25,17 @@ matrix:
     - os: osx
       compiler: clang
       env: LLDPD_CONFIG_ARGS="--with-snmp --with-xml"
+    - os: osx
+      compiler: clang
+      if: tag =~ ^[0-9]
+      env:
+        - 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:
+      condition: "$LLDPD_UPLOAD = 1"
index 2d1d192d58b9a6e4425c1bfcd2f602e6a8c60c5d..987fcff75b039eec0a0517390552230f717d4b28 100755 (executable)
@@ -4,16 +4,20 @@ set -e
 
 [ $CC != gcc ] || CC=gcc-5
 LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --enable-pie"
-LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --localstatedir=/var --sysconfdir=/etc --prefix=/usr"
 case "$(uname -s)" in
     Linux)
+        LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --localstatedir=/var --sysconfdir=/etc --prefix=/usr"
         LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS --enable-sanitizers"
         LLDPD_CONFIG_ARGS="$LLDPD_CONFIG_ARGS LDFLAGS=-fuse-ld=gold"
         ;;
+    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"
+        ;;
 esac
 
 ./autogen.sh
-./configure $LLDPD_CONFIG_ARGS CFLAGS="-O1 -g" || {
+./configure $LLDPD_CONFIG_ARGS || {
     cat config.log
     exit 1
 }
@@ -24,6 +28,9 @@ case "$(uname -s)" in
     Darwin)
         # Create a package
         make -C osx pkg
+        otool -l osx/lldpd*/usr/local/sbin/lldpd
+        mkdir upload
+        mv *.pkg upload
         ;;
     Linux)
         # Integration tests