From 57e0e30d1015d560b5d768fcc1464fc6d1a3542b Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 20 Jan 2020 11:10:16 -0500 Subject: [PATCH] travis-ci bits: try to avoid failure-flagging on transient connectivity issues Attempt to test whether Lua fetch succeeded (and pdcurses for windows and msdos as well) If those prerequisite fetches and untars didn't work, just exit without marking the travis-ci build as a failure so that the development team isn't notified about something transient that they don't need to fix in the code. --- .travis.yml | 91 ++++++++++++++++++++++---------- sys/msdos/msdos-cross-compile.sh | 6 +++ sys/winnt/travis-gcc.sh | 2 +- win/win32/vs2017/travisci.sh | 14 +++-- 4 files changed, 81 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index dba3f2649..dd9c6903b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,37 @@ language: c matrix: include: - - os: linux - env: DESCR=linux-xenial-gcc HINTS=linux + - name: linux-xenial-gcc + os: linux + env: HINTS=linux LUA_VERSION=5.3.5 compiler: gcc - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make fetch-lua && make install" - - os: linux - env: DESCR=linux-bionic-gcc HINTS=linux + script: + - cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ + - make fetch-lua + - test -d "lib/lua-$LUA_VERSION/src" || exit 0 + - make install + - name: linux-bionic-gcc + os: linux + env: HINTS=linux LUA_VERSION=5.3.5 dist: bionic compiler: gcc - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make fetch-lua && make install" - - os: linux - env: DESCR=linux-xenial-clang HINTS=linux + script: + - cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ + - make fetch-lua + - test -d "lib/lua-$LUA_VERSION/src" || exit 0 + - make install + - name: linux-xenial-clang + os: linux + env: HINTS=linux LUA_VERSION=5.3.5 compiler: clang - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make fetch-lua && make install" - - os: linux - env: DESCR=linux-xenial-gcc-x11 HINTS=linux-x11 + script: + - cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ + - make fetch-lua + - test -d "lib/lua-$LUA_VERSION/src" || exit 0 + - make install + - name: linux-xenial-gcc-x11 + os: linux + env: HINTS=linux-x11 LUA_VERSION=5.3.5 compiler: gcc addons: apt: @@ -23,9 +39,14 @@ matrix: - libx11-dev - libxaw7-dev - xfonts-utils - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make fetch-lua && make install" - - os: linux - env: DESCR=linux-xenial-gcc-qt5 HINTS=linux-qt5 + script: + - cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ + - make fetch-lua + - test -d "lib/lua-$LUA_VERSION/src" || exit 0 + - make install + - name: linux-xenial-gcc-qt5 + os: linux + env: HINTS=linux-qt5 LUA_VERSION=5.3.5 compiler: gcc addons: apt: @@ -36,9 +57,14 @@ matrix: - qtbase5-dev - qtmultimedia5-dev - qtbase5-dev-tools - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make fetch-lua && make QT_SELECT=5 MOC=moc install" - - os: linux - env: DESCR=linux-bionic-gcc-x11 HINTS=linux-x11 + script: + - cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ + - make fetch-lua + - test -d "lib/lua-$LUA_VERSION/src" || exit 0 + - make QT_SELECT=5 MOC=moc install + - name: linux-bionic-gcc-x11 + os: linux + env: HINTS=linux-x11 LUA_VERSION=5.3.5 dist: bionic compiler: gcc addons: @@ -47,9 +73,14 @@ matrix: - libx11-dev - libxaw7-dev - xfonts-utils - script: "cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ && make fetch-lua && make install" - - os: linux - env: DESCR=linux-xenial-gcc-minimal HINTS=linux-minimal + script: + - cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ + - make fetch-lua + - test -d "lib/lua-$LUA_VERSION/src" || exit 0 + - make install + - name: linux-xenial-gcc-minimal + os: linux + env: HINTS=linux-minimal LUA_VERSION=5.3.5 compiler: gcc script: | cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ @@ -72,31 +103,37 @@ matrix: sed -i '/^#define SHELL/d' include/unixconf.h sed -i '/^#define SUSPEND/d' include/unixconf.h sed -i 's/^#define TEXTCOLOR//' include/unixconf.h - make fetch-lua && make install + make fetch-lua + test -d "lib/lua-$LUA_VERSION/src" || exit 0 + make install cat dat/options - - os: windows - env: DESCR=windows-visualstudio + - name: windows-visualstudio + os: windows language: shell script: - ./win/win32/vs2017/travisci.sh - - os: windows + - name: windows-mingw + os: windows # install: choco install mingw - env: DESCR=windows-mingw script: - sh sys/winnt/travis-gcc.sh + - test -d "lib/lua-$LUA_VERSION/src" || exit 0 + - test -d "lib/pdcurses" || exit 0 - export ADD_CURSES=Y - export PDCURSES_TOP=../lib/pdcurses - export LUA_VERSION=5.3.5 - cd src - cp ../sys/winnt/Makefile.gcc ./Makefile - mingw32-make install - - os: linux - env: DESCR=msdos-cross-on-linux HINTS=linux LUA_VERSION=5.3.5 + - name: msdos crosscompile on linux + os: linux + env: HINTS=linux LUA_VERSION=5.3.5 compiler: gcc script: # - export - cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../ - make fetch-lua + - test -d "lib/lua-$LUA_VERSION/src" || exit 0 - cd lib/lua-$LUA_VERSION/src && make a && cd ../../.. - sh sys/msdos/msdos-cross-compile.sh exclude: diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index 4dd7ee617..3de2b701b 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -74,6 +74,12 @@ fi cd ../ +# Don't fail the build if lua fetch failed because we cannot do anything about it +# but don't bother proceeding forward either +if [ ! -d "lib/lua-$LUA_VERSION/src" ]; then + exit 0 +fi + #echo after dos extender cd src diff --git a/sys/winnt/travis-gcc.sh b/sys/winnt/travis-gcc.sh index 562b1a142..6f731cea8 100644 --- a/sys/winnt/travis-gcc.sh +++ b/sys/winnt/travis-gcc.sh @@ -2,7 +2,7 @@ set -x mkdir -p lib cd lib git clone --depth 1 https://github.com/wmcbrine/PDCurses.git pdcurses -git clone --depth 1 https://github.com/universal-ctags/ctags.git ctags +#git clone --depth 1 https://github.com/universal-ctags/ctags.git ctags curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz tar zxf lua-5.3.5.tar.gz cd ../ diff --git a/win/win32/vs2017/travisci.sh b/win/win32/vs2017/travisci.sh index b3e7de13e..7c16f6c9c 100644 --- a/win/win32/vs2017/travisci.sh +++ b/win/win32/vs2017/travisci.sh @@ -24,15 +24,21 @@ export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/lib/x86:$LIB export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB +export LUA_VERSION=5.3.5 mkdir -p lib cd lib git clone --depth 1 https://github.com/wmcbrine/PDCurses.git pdcurses -git clone --depth 1 https://github.com/universal-ctags/ctags.git ctags +#git clone --depth 1 https://github.com/universal-ctags/ctags.git ctags curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz tar zxf lua-5.3.5.tar.gz -cd ctags -nmake -f mk_mvc.mak -cd ../../ +#cd ctags +#nmake -f mk_mvc.mak +#cd ../../ +cd ../ +test -d "lib/lua-$LUA_VERSION/src" || echo "Lua-$LUA_VERSION fetch failed" +test -d "lib/pdcurses" || echo "pdcurses fetch failed" +test -d "lib/pdcurses" || exit 0 +test -d "lib/lua-$LUA_VERSION/src" || exit 0 export ADD_CURSES=Y export PDCURSES_TOP=../lib/pdcurses export