Re: [PATCH, RFC] Add Travis and Appveyor CI support
On Thu, May 17, 2018 at 10:57:08AM -0400, Bill Fenner wrote: > On Thu, May 17, 2018 at 9:56 AM, Niels Baggesen via Net-snmp-coders < > net-snmp-coders@lists.sourceforge.net> wrote: > > > Den 17-05-2018 kl. 15:54 skrev Robert Story: > > > >> On Wed, 16 May 2018 07:23:32 -0700 Bart wrote: > >> BVA> This patch makes it possible to enable Travis and Appveyor > >> BVA> continuous integration support. On Travis Net-SNMP is built > >> BVA> with all MIBs, with --disable-set-support, with > >> BVA> --enable-mini-agent, with --enable-minimalist and with > >> BVA> --enable-read-only. All these configurations are built on > >> BVA> Linux and on OS/X. On Appveyor Net-SNMP is built with MSVC and > >> BVA> dynamic libraries, with MSVC and statically linked libraryes, > >> BVA> with MinGW64, with Cygwin32 and with Cygwin64. As one can see > >> BVA> in the scripts in the "ci" directory the to-do items are as > >> BVA> follows: > >> > >> Given that this doesn't affect code and CI support is a good thing: > >> +1 > >> > > > > Another +1 > > > I'm a big fan of automated testing, and I've looked at the scripts and > output. +1 from me too! AOL +1 /MF > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Net-snmp-coders mailing list > Net-snmp-coders@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [PATCH, RFC] Add Travis and Appveyor CI support
On Thu, May 17, 2018 at 9:56 AM, Niels Baggesen via Net-snmp-coders < net-snmp-coders@lists.sourceforge.net> wrote: > Den 17-05-2018 kl. 15:54 skrev Robert Story: > >> On Wed, 16 May 2018 07:23:32 -0700 Bart wrote: >> BVA> This patch makes it possible to enable Travis and Appveyor >> BVA> continuous integration support. On Travis Net-SNMP is built >> BVA> with all MIBs, with --disable-set-support, with >> BVA> --enable-mini-agent, with --enable-minimalist and with >> BVA> --enable-read-only. All these configurations are built on >> BVA> Linux and on OS/X. On Appveyor Net-SNMP is built with MSVC and >> BVA> dynamic libraries, with MSVC and statically linked libraryes, >> BVA> with MinGW64, with Cygwin32 and with Cygwin64. As one can see >> BVA> in the scripts in the "ci" directory the to-do items are as >> BVA> follows: >> >> Given that this doesn't affect code and CI support is a good thing: >> +1 >> > > Another +1 I'm a big fan of automated testing, and I've looked at the scripts and output. +1 from me too! Bill -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [PATCH, RFC] Add Travis and Appveyor CI support
Den 17-05-2018 kl. 15:54 skrev Robert Story: On Wed, 16 May 2018 07:23:32 -0700 Bart wrote: BVA> This patch makes it possible to enable Travis and Appveyor BVA> continuous integration support. On Travis Net-SNMP is built BVA> with all MIBs, with --disable-set-support, with BVA> --enable-mini-agent, with --enable-minimalist and with BVA> --enable-read-only. All these configurations are built on BVA> Linux and on OS/X. On Appveyor Net-SNMP is built with MSVC and BVA> dynamic libraries, with MSVC and statically linked libraryes, BVA> with MinGW64, with Cygwin32 and with Cygwin64. As one can see BVA> in the scripts in the "ci" directory the to-do items are as BVA> follows: Given that this doesn't affect code and CI support is a good thing: +1 Another +1 /Niels -- Niels Baggesen - @home - Ã…rhus - Denmark - n...@users.sourceforge.net The purpose of computing is insight, not numbers --- R W Hamming -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [PATCH, RFC] Add Travis and Appveyor CI support
On Wed, 16 May 2018 07:23:32 -0700 Bart wrote: BVA> This patch makes it possible to enable Travis and Appveyor BVA> continuous integration support. On Travis Net-SNMP is built BVA> with all MIBs, with --disable-set-support, with BVA> --enable-mini-agent, with --enable-minimalist and with BVA> --enable-read-only. All these configurations are built on BVA> Linux and on OS/X. On Appveyor Net-SNMP is built with MSVC and BVA> dynamic libraries, with MSVC and statically linked libraryes, BVA> with MinGW64, with Cygwin32 and with Cygwin64. As one can see BVA> in the scripts in the "ci" directory the to-do items are as BVA> follows: Given that this doesn't affect code and CI support is a good thing: +1 Robert -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
[PATCH, RFC] Add Travis and Appveyor CI support
This patch makes it possible to enable Travis and Appveyor continuous integration support. On Travis Net-SNMP is built with all MIBs, with --disable-set-support, with --enable-mini-agent, with --enable-minimalist and with --enable-read-only. All these configurations are built on Linux and on OS/X. On Appveyor Net-SNMP is built with MSVC and dynamic libraries, with MSVC and statically linked libraryes, with MinGW64, with Cygwin32 and with Cygwin64. As one can see in the scripts in the "ci" directory the to-do items are as follows: - Fix the MinGW64 build. That build fails with a linker error. - Make the regression tests pass for the Cygwin builds. - Make the regression tests pass for --disable-set-support,s --enable-mini-agent, --enable-minimalist and --enable-read-only. - Make the non-default MIBs compatible with --disable-set-support, --enable-mini-agent, --enable-minimalist and --enable-read-only. For the current build output, see also: - https://travis-ci.org/bvanassche/net-snmp/ - https://ci.appveyor.com/project/BVanAssche87257/net-snmp --- .appveyor.yml | 20 ++ .travis.yml| 39 ci/build.bat | 43 ci/build.sh| 21 ++ ci/net-snmp-configure | 252 + ci/net-snmp-run-perl-tests | 9 + ci/net-snmp-run-python-tests | 16 ++ ci/net-snmp-run-tests | 37 +++ ci/openssl.bat | 3 + .../fulltests/default/T200snmpv2cwalkall_simple| 2 + 10 files changed, 442 insertions(+) create mode 100644 .appveyor.yml create mode 100644 .travis.yml create mode 100644 ci/build.bat create mode 100755 ci/build.sh create mode 100755 ci/net-snmp-configure create mode 100755 ci/net-snmp-run-perl-tests create mode 100755 ci/net-snmp-run-python-tests create mode 100755 ci/net-snmp-run-tests create mode 100644 ci/openssl.bat diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index ..1a8fd5f64844 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,20 @@ +image: + - Visual Studio 2017 + +environment: + CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/ + matrix: +- BUILD: MSVCDYNAMIC64 +- BUILD: MSVCSTATIC64 +- BUILD: MinGW64 +- BUILD: Cygwin32 +- BUILD: Cygwin64 + +matrix: + allow_failures: + - BUILD: MINGW64 + +clone_depth: 5 + +build_script: + - 'call "ci\build.bat"' diff --git a/.travis.yml b/.travis.yml new file mode 100644 index ..dc5c7d9a213f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,39 @@ +language: c + +os: + - linux + - osx + +env: + - env: MODE=regular + - env: MODE=disable-set + - env: MODE=mini + - env: MODE=minimalist + - env: MODE=read-only + +addons: + apt: +packages: + - dpkg + - gcc + - libatm-dev + - libperl-dev + - libsensors4-dev + - libssh-dev + - libssl-dev + - make + - perl-modules + - pkg-config + - python-dev + - python-setuptools + +sudo: required + +before_script: + # Add an IPv6 config - see the corresponding Travis issue + # https://github.com/travis-ci/travis-ci/issues/8361 + - 'if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo sh -c ''echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6; printf "\n::1 localhost ipv6-localhost ipv6-loopback\n" >>/etc/hosts; cat /etc/hosts''; fi' + # Upgrade openssl such that Net-SNMP can be built with Blumenthal AES support. + - 'if [ "${TRAVIS_OS_NAME}" == "osx" ]; then brew upgrade openssl >/dev/null 2>&1; fi' + +script: ci/build.sh diff --git a/ci/build.bat b/ci/build.bat new file mode 100644 index ..6faf1c6560db --- /dev/null +++ b/ci/build.bat @@ -0,0 +1,43 @@ +echo "Build type %BUILD%" +@echo on +goto %BUILD% +echo "Error: unknown build type %BUILD%" +goto eof + +:MSVCDYNAMIC64 +call "ci\openssl.bat" +call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 +cd win32 +perl Configure --config=release --with-sdk --with-ipv6 --with-winextdll --linktype=dynamic --with-ssl --with-sslincdir=C:\OpenSSL-Win64\include --with-ssllibdir=C:\OpenSSL-Win64\lib\vc +nmake +goto eof + +:MSVCSTATIC64 +call "ci\openssl.bat" +call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 +cd win32 +perl Configure --config=release --with-sdk --with-ipv6 --with-winextdll --linktype=static --with-ssl --with-sslincdir=C:\OpenSSL-Win64\include --with-ssllibdir=C:\OpenSSL-Win64\lib\vc + +nmake +goto eof + +:MinGW32 +REM to do - install MinGW32 first. +C:\mingw\msys\1.0\usr\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/build.sh' +goto eof + +:MinGW64 +C:\msys64\usr\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/build.sh' +goto eof + +:Cygwin32 +c:\cygwin\setup-x86.exe --quiet-mode --no-shortcuts --only-site
Re: [PATCH RFC] Add Travis and Appveyor CI support
On Wed, 25 Apr 2018 12:05:06 -0600 Bart wrote: BVA> On 04/25/18 11:54, Keith Mendoza wrote: BVA> > Out of curiosity, do you have a "fork" of Net-SNMP on github BVA> > to connect it to Travis and Appveyor? BVA> BVA> If you are looking for a Net-SNMP repository on github, please BVA> use https://github.com/net-snmp/net-snmp. I hope Wes will BVA> connect that repository to Travis and Appveyor. Note that there isn't any automatic synchronization between SF and github yet, and SF is still considered the master. Robert -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [PATCH RFC] Add Travis and Appveyor CI support
Hi Bart, Also check out my travis config - configuring with different sets of configure args - minimalist is important to me, so it's nice to have regression testing against, and we had a couple of interesting bugs reported agaist --disable-set-support and --enable-read-only, so I added them. Obviously your method with the script is better than mine with the horrorshow long line in the travis config. https://raw.githubusercontent.com/fenner/net-snmp/master-travis/.travis.yml I got it working with "sudo:false" but obviously v6 doesn't work, I'm happy to see us use the "sudo:true" infrastructure to get v6. Bill On Wed, Apr 25, 2018 at 11:06 AM, Bart Van Asschewrote: > Hello, > > One of the advantages of github over SourceForge is that integration with > continuous integration (CI) services like Travis and Appveyor is easy. > Adding such support however requires to add proper configuration files and > the necessary scripts in the source tree. Hence this patch. As one can see > for Linux all regression tests are run, for OS/X some regression tests are > run and for MSVC and Cygwin no regression tests are run. All four builds > pass with this patch. As usual, feedback is welcome. > > Bart. > > > --- > .appveyor.yml | 10 + > .travis.yml| 35 > ci/build.bat | 30 +++ > ci/build.sh| 17 ++ > ci/net-snmp-configure | 211 + > ci/net-snmp-run-perl-tests | 9 + > ci/net-snmp-run-python-tests | 16 ++ > ci/net-snmp-run-tests | 37 > .../fulltests/default/T200snmpv2cwalkall_simple| 2 + > testing/fulltests/support/simple_eval_tools.sh | 21 +- > 10 files changed, 381 insertions(+), 7 deletions(-) > create mode 100644 .appveyor.yml > create mode 100644 .travis.yml > create mode 100644 ci/build.bat > create mode 100755 ci/build.sh > create mode 100755 ci/net-snmp-configure > create mode 100755 ci/net-snmp-run-perl-tests > create mode 100755 ci/net-snmp-run-python-tests > create mode 100755 ci/net-snmp-run-tests > > diff --git a/.appveyor.yml b/.appveyor.yml > new file mode 100644 > index ..137c52052d34 > --- /dev/null > +++ b/.appveyor.yml > @@ -0,0 +1,10 @@ > +image: > + - Visual Studio 2017 > +environment: > + matrix: > +- BUILD: MSVC > +# - BUILD: MinGW > +- BUILD: Cygwin > +clone_depth: 5 > +build_script: > + - 'call "ci\build.bat"' > diff --git a/.travis.yml b/.travis.yml > new file mode 100644 > index ..7262aa19aab0 > --- /dev/null > +++ b/.travis.yml > @@ -0,0 +1,35 @@ > +language: c > + > +os: > + - linux > + - osx > + > +dist: trusty > + > +sudo: required > + > +addons: > + apt: > +packages: > + - dpkg > + - gcc > + - libatm-dev > + - libperl-dev > + - libsensors4-dev > + - libssh-dev > + - libssl-dev > + - make > + - perl-modules > + - pkg-config > + - python-dev > + - python-setuptools > + > +# Add an IPv6 config - see the corresponding Travis issue > +# https://github.com/travis-ci/travis-ci/issues/8361 > +before_script: > + - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then > + sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6; > printf "\n::1 localhost ipv6-localhost ipv6-loopback\n" >>/etc/hosts; cat > /etc/hosts'; > +fi > + - 'if [ "${TRAVIS_OS_NAME}" == "osx" ]; then brew upgrade openssl > >/dev/null 2>&1; fi' > + > +script: ci/build.sh > diff --git a/ci/build.bat b/ci/build.bat > new file mode 100644 > index ..cea6a89a4886 > --- /dev/null > +++ b/ci/build.bat > @@ -0,0 +1,30 @@ > +echo "Build type %BUILD%" > +@echo on > +goto %BUILD% > +echo "Error: unknown build type %BUILD%" > +goto eof > + > +:MSVC > +REM see also https://www.appveyor.com/docs/lang/cpp/ > +REM if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017" ( > +REM set "d=C:\Program Files (x86)\Microsoft Visual Studio\2017" > +REM ) else if exist "C:\Program Files\Microsoft Visual Studio\2017" ( > +REM set "d=C:\Program Files\Microsoft Visual Studio\2017" > +REM ) > +REM cmd /c ""%d%"\Community\VC\Auxiliary\Build\vcvarsall.bat x86" > +REM install: > +call "C:\Program Files (x86)\Microsoft Visual Studio > 14.0\VC\vcvarsall.bat" > +cd win32 > +perl Configure --config=release --with-sdk --with-ipv6 --with-winextdll > --linktype=dynamic > +nmake > +goto eof > + > +:MinGW > +C:\msys64\usr\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; > ci/build.sh' > +goto eof > + > +:Cygwin > +c:\cygwin\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; > ci/build.sh' > +goto eof > + > +:eof > diff --git a/ci/build.sh b/ci/build.sh > new file mode 100755 > index ..3e306d82bf17 > --- /dev/null > +++ b/ci/build.sh > @@ -0,0 +1,17 @@ > +#!/bin/bash >
Re: [PATCH RFC] Add Travis and Appveyor CI support
On 04/25/18 12:58, Robert Story wrote: On Wed, 25 Apr 2018 09:06:28 -0600 Bart wrote: BVA> One of the advantages of github over SourceForge is that BVA> integration with continuous integration (CI) services like BVA> Travis and Appveyor is easy. Adding such support however BVA> requires to add proper configuration files and the necessary BVA> scripts in the source tree. Hence this patch. As one can see BVA> for Linux all regression tests are run, for OS/X some BVA> regression tests are run and for MSVC and Cygwin no regression BVA> tests are run. All four builds pass with this patch. As usual, BVA> feedback is welcome. I think that CI would be a great addition. My only concern with the patch is the changes to simple_eval_tools.sh and whether the changes might break testing on other platforms and/or older releases of various platforms. But I supposed the best way to find out would be to commit the changes. We might need some discussion on 5.7, but I think it's fine for master (so it will make it in to 5.8). Why don't you go ahead an check it in on a new branch. Given some support from other core devs and not significant objections, I'll merge that branch before rc1 next week. Hello Robert, Please have a look at the master-ci branch on github. I have left out the simple_eval_tools.sh from that branch since I only needed these changes while testing the continuous integration scripts. Thanks, Bart. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [PATCH RFC] Add Travis and Appveyor CI support
On Wed, 25 Apr 2018 09:06:28 -0600 Bart wrote: BVA> One of the advantages of github over SourceForge is that BVA> integration with continuous integration (CI) services like BVA> Travis and Appveyor is easy. Adding such support however BVA> requires to add proper configuration files and the necessary BVA> scripts in the source tree. Hence this patch. As one can see BVA> for Linux all regression tests are run, for OS/X some BVA> regression tests are run and for MSVC and Cygwin no regression BVA> tests are run. All four builds pass with this patch. As usual, BVA> feedback is welcome. I think that CI would be a great addition. My only concern with the patch is the changes to simple_eval_tools.sh and whether the changes might break testing on other platforms and/or older releases of various platforms. But I supposed the best way to find out would be to commit the changes. We might need some discussion on 5.7, but I think it's fine for master (so it will make it in to 5.8). Why don't you go ahead an check it in on a new branch. Given some support from other core devs and not significant objections, I'll merge that branch before rc1 next week. Robert -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [PATCH RFC] Add Travis and Appveyor CI support
On Wed, Apr 25, 2018, at 11:05 AM, Bart Van Assche wrote: > On 04/25/18 11:54, Keith Mendoza wrote: > > Out of curiosity, do you have a "fork" of Net-SNMP on github to connect it > > to Travis and Appveyor? > > Hello Keith, > > If you are looking for a Net-SNMP repository on github, please use > https://github.com/net-snmp/net-snmp. I hope Wes will connect that > repository to Travis and Appveyor. Woo hoo. Now if we can plan out what other stuff we want moved from SF. > > Thanks, > > Bart. -- Thanks, Keith (pantherse) -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [PATCH RFC] Add Travis and Appveyor CI support
On 04/25/18 11:54, Keith Mendoza wrote: Out of curiosity, do you have a "fork" of Net-SNMP on github to connect it to Travis and Appveyor? Hello Keith, If you are looking for a Net-SNMP repository on github, please use https://github.com/net-snmp/net-snmp. I hope Wes will connect that repository to Travis and Appveyor. Thanks, Bart. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
Re: [PATCH RFC] Add Travis and Appveyor CI support
Bart, Out of curiosity, do you have a "fork" of Net-SNMP on github to connect it to Travis and Appveyor? On Wed, Apr 25, 2018, at 8:06 AM, Bart Van Assche wrote: > Hello, > > One of the advantages of github over SourceForge is that integration > with continuous integration (CI) services like Travis and Appveyor is > easy. Adding such support however requires to add proper configuration > files and the necessary scripts in the source tree. Hence this patch. As > one can see for Linux all regression tests are run, for OS/X some > regression tests are run and for MSVC and Cygwin no regression tests are > run. All four builds pass with this patch. As usual, feedback is welcome. > > Bart. > > > --- > .appveyor.yml | 10 + > .travis.yml| 35 > ci/build.bat | 30 +++ > ci/build.sh| 17 ++ > ci/net-snmp-configure | 211 + > ci/net-snmp-run-perl-tests | 9 + > ci/net-snmp-run-python-tests | 16 ++ > ci/net-snmp-run-tests | 37 > .../fulltests/default/T200snmpv2cwalkall_simple| 2 + > testing/fulltests/support/simple_eval_tools.sh | 21 +- > 10 files changed, 381 insertions(+), 7 deletions(-) > create mode 100644 .appveyor.yml > create mode 100644 .travis.yml > create mode 100644 ci/build.bat > create mode 100755 ci/build.sh > create mode 100755 ci/net-snmp-configure > create mode 100755 ci/net-snmp-run-perl-tests > create mode 100755 ci/net-snmp-run-python-tests > create mode 100755 ci/net-snmp-run-tests > > diff --git a/.appveyor.yml b/.appveyor.yml > new file mode 100644 > index ..137c52052d34 > --- /dev/null > +++ b/.appveyor.yml > @@ -0,0 +1,10 @@ > +image: > + - Visual Studio 2017 > +environment: > + matrix: > +- BUILD: MSVC > +# - BUILD: MinGW > +- BUILD: Cygwin > +clone_depth: 5 > +build_script: > + - 'call "ci\build.bat"' > diff --git a/.travis.yml b/.travis.yml > new file mode 100644 > index ..7262aa19aab0 > --- /dev/null > +++ b/.travis.yml > @@ -0,0 +1,35 @@ > +language: c > + > +os: > + - linux > + - osx > + > +dist: trusty > + > +sudo: required > + > +addons: > + apt: > +packages: > + - dpkg > + - gcc > + - libatm-dev > + - libperl-dev > + - libsensors4-dev > + - libssh-dev > + - libssl-dev > + - make > + - perl-modules > + - pkg-config > + - python-dev > + - python-setuptools > + > +# Add an IPv6 config - see the corresponding Travis issue > +# https://github.com/travis-ci/travis-ci/issues/8361 > +before_script: > + - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then > + sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6; > printf "\n::1 localhost ipv6-localhost ipv6-loopback\n" >>/etc/hosts; > cat /etc/hosts'; > +fi > + - 'if [ "${TRAVIS_OS_NAME}" == "osx" ]; then brew upgrade openssl > >/dev/null 2>&1; fi' > + > +script: ci/build.sh > diff --git a/ci/build.bat b/ci/build.bat > new file mode 100644 > index ..cea6a89a4886 > --- /dev/null > +++ b/ci/build.bat > @@ -0,0 +1,30 @@ > +echo "Build type %BUILD%" > +@echo on > +goto %BUILD% > +echo "Error: unknown build type %BUILD%" > +goto eof > + > +:MSVC > +REM see also https://www.appveyor.com/docs/lang/cpp/ > +REM if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017" ( > +REM set "d=C:\Program Files (x86)\Microsoft Visual Studio\2017" > +REM ) else if exist "C:\Program Files\Microsoft Visual Studio\2017" ( > +REM set "d=C:\Program Files\Microsoft Visual Studio\2017" > +REM ) > +REM cmd /c ""%d%"\Community\VC\Auxiliary\Build\vcvarsall.bat x86" > +REM install: > +call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC > \vcvarsall.bat" > +cd win32 > +perl Configure --config=release --with-sdk --with-ipv6 --with-winextdll > --linktype=dynamic > +nmake > +goto eof > + > +:MinGW > +C:\msys64\usr\bin\bash --login -c 'set -x; cd > "${APPVEYOR_BUILD_FOLDER}"; ci/build.sh' > +goto eof > + > +:Cygwin > +c:\cygwin\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; > ci/build.sh' > +goto eof > + > +:eof > diff --git a/ci/build.sh b/ci/build.sh > new file mode 100755 > index ..3e306d82bf17 > --- /dev/null > +++ b/ci/build.sh > @@ -0,0 +1,17 @@ > +#!/bin/bash > + > +scriptdir="$(dirname "$0")" > +export NOAUTODEPS=1 > +export SNMP_VERBOSE=1 > +if [ -z "$OSTYPE" ]; then > +case "$(uname)" in > +Linux) OSTYPE=linux;; > +Darwin) OSTYPE=darwin;; > +*) OSTYPE="UNKNOWN:$(uname)";; > +esac > +export OSTYPE > +fi > +"${scriptdir}"/net-snmp-configure master || exit $? > +make -s || exit $? > +[ "$OSTYPE" = cygwin ]&& exit 0 > +"${scriptdir}"/net-snmp-run-tests
[PATCH RFC] Add Travis and Appveyor CI support
Hello, One of the advantages of github over SourceForge is that integration with continuous integration (CI) services like Travis and Appveyor is easy. Adding such support however requires to add proper configuration files and the necessary scripts in the source tree. Hence this patch. As one can see for Linux all regression tests are run, for OS/X some regression tests are run and for MSVC and Cygwin no regression tests are run. All four builds pass with this patch. As usual, feedback is welcome. Bart. --- .appveyor.yml | 10 + .travis.yml| 35 ci/build.bat | 30 +++ ci/build.sh| 17 ++ ci/net-snmp-configure | 211 + ci/net-snmp-run-perl-tests | 9 + ci/net-snmp-run-python-tests | 16 ++ ci/net-snmp-run-tests | 37 .../fulltests/default/T200snmpv2cwalkall_simple| 2 + testing/fulltests/support/simple_eval_tools.sh | 21 +- 10 files changed, 381 insertions(+), 7 deletions(-) create mode 100644 .appveyor.yml create mode 100644 .travis.yml create mode 100644 ci/build.bat create mode 100755 ci/build.sh create mode 100755 ci/net-snmp-configure create mode 100755 ci/net-snmp-run-perl-tests create mode 100755 ci/net-snmp-run-python-tests create mode 100755 ci/net-snmp-run-tests diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index ..137c52052d34 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,10 @@ +image: + - Visual Studio 2017 +environment: + matrix: +- BUILD: MSVC +# - BUILD: MinGW +- BUILD: Cygwin +clone_depth: 5 +build_script: + - 'call "ci\build.bat"' diff --git a/.travis.yml b/.travis.yml new file mode 100644 index ..7262aa19aab0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,35 @@ +language: c + +os: + - linux + - osx + +dist: trusty + +sudo: required + +addons: + apt: +packages: + - dpkg + - gcc + - libatm-dev + - libperl-dev + - libsensors4-dev + - libssh-dev + - libssl-dev + - make + - perl-modules + - pkg-config + - python-dev + - python-setuptools + +# Add an IPv6 config - see the corresponding Travis issue +# https://github.com/travis-ci/travis-ci/issues/8361 +before_script: + - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then + sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6; printf "\n::1 localhost ipv6-localhost ipv6-loopback\n" >>/etc/hosts; cat /etc/hosts'; +fi + - 'if [ "${TRAVIS_OS_NAME}" == "osx" ]; then brew upgrade openssl >/dev/null 2>&1; fi' + +script: ci/build.sh diff --git a/ci/build.bat b/ci/build.bat new file mode 100644 index ..cea6a89a4886 --- /dev/null +++ b/ci/build.bat @@ -0,0 +1,30 @@ +echo "Build type %BUILD%" +@echo on +goto %BUILD% +echo "Error: unknown build type %BUILD%" +goto eof + +:MSVC +REM see also https://www.appveyor.com/docs/lang/cpp/ +REM if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017" ( +REM set "d=C:\Program Files (x86)\Microsoft Visual Studio\2017" +REM ) else if exist "C:\Program Files\Microsoft Visual Studio\2017" ( +REM set "d=C:\Program Files\Microsoft Visual Studio\2017" +REM ) +REM cmd /c ""%d%"\Community\VC\Auxiliary\Build\vcvarsall.bat x86" +REM install: +call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" +cd win32 +perl Configure --config=release --with-sdk --with-ipv6 --with-winextdll --linktype=dynamic +nmake +goto eof + +:MinGW +C:\msys64\usr\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/build.sh' +goto eof + +:Cygwin +c:\cygwin\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/build.sh' +goto eof + +:eof diff --git a/ci/build.sh b/ci/build.sh new file mode 100755 index ..3e306d82bf17 --- /dev/null +++ b/ci/build.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +scriptdir="$(dirname "$0")" +export NOAUTODEPS=1 +export SNMP_VERBOSE=1 +if [ -z "$OSTYPE" ]; then +case "$(uname)" in +Linux) OSTYPE=linux;; +Darwin) OSTYPE=darwin;; +*) OSTYPE="UNKNOWN:$(uname)";; +esac +export OSTYPE +fi +"${scriptdir}"/net-snmp-configure master || exit $? +make -s || exit $? +[ "$OSTYPE" = cygwin ]&& exit 0 +"${scriptdir}"/net-snmp-run-tests|| exit $? diff --git a/ci/net-snmp-configure b/ci/net-snmp-configure new file mode 100755 index ..03e12e7fe737 --- /dev/null +++ b/ci/net-snmp-configure @@ -0,0 +1,211 @@ +#!/usr/bin/env bash + +# Necessary software packages for building Net-SNMP: +# autoconf automake libtool m4 +# glibc glibc-devel libssh2 libssh2-devel openssl openssl-devel rpm-devel +# perl-ExtUtils-MakeMaker perl-ExtUtils-Embed perl-Test-Harness +# python python-devel python-setuptools +