From 1ff64f72a9cb9d94bb88bc912973bdcbc062ec0b Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Thu, 23 Apr 2020 16:00:13 +0200 Subject: [PATCH 1/6] ci: move ci -> .ci-local also rename appveyor.yml -> .appveyor.yml --- appveyor.yml => .appveyor.yml | 0 {ci => .ci-local}/appveyor-make.bat | 0 {ci => .ci-local}/appveyor-prepare.bat | 0 {ci => .ci-local}/travis-build.sh | 0 {ci => .ci-local}/travis-prepare.sh | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename appveyor.yml => .appveyor.yml (100%) rename {ci => .ci-local}/appveyor-make.bat (100%) rename {ci => .ci-local}/appveyor-prepare.bat (100%) rename {ci => .ci-local}/travis-build.sh (100%) rename {ci => .ci-local}/travis-prepare.sh (100%) diff --git a/appveyor.yml b/.appveyor.yml similarity index 100% rename from appveyor.yml rename to .appveyor.yml diff --git a/ci/appveyor-make.bat b/.ci-local/appveyor-make.bat similarity index 100% rename from ci/appveyor-make.bat rename to .ci-local/appveyor-make.bat diff --git a/ci/appveyor-prepare.bat b/.ci-local/appveyor-prepare.bat similarity index 100% rename from ci/appveyor-prepare.bat rename to .ci-local/appveyor-prepare.bat diff --git a/ci/travis-build.sh b/.ci-local/travis-build.sh similarity index 100% rename from ci/travis-build.sh rename to .ci-local/travis-build.sh diff --git a/ci/travis-prepare.sh b/.ci-local/travis-prepare.sh similarity index 100% rename from ci/travis-prepare.sh rename to .ci-local/travis-prepare.sh From a9c8d8d5d307fa17e3d2fa65ccdfb7c832ce8596 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Fri, 24 Apr 2020 15:11:00 +0200 Subject: [PATCH 2/6] Add ci-scripts v2.3.2 (submodule in .ci) --- .ci | 1 + .gitmodules | 4 ++++ 2 files changed, 5 insertions(+) create mode 160000 .ci create mode 100644 .gitmodules diff --git a/.ci b/.ci new file mode 160000 index 000000000..d0f93f192 --- /dev/null +++ b/.ci @@ -0,0 +1 @@ +Subproject commit d0f93f1920b5ccde78766d9f84cca292047933ec diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..271d6c8f0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule ".ci"] + path = .ci + url = https://github.com/epics-base/ci-scripts + branch = master From 445cbb822116028aea727ef99dbe94925d51e62a Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Fri, 24 Apr 2020 19:26:47 +0200 Subject: [PATCH 3/6] travis-ci: update .travis.yml for ci-scripts - use more EXTRAs on MacOS for make args --- .travis.yml | 133 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 82 insertions(+), 51 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0ae572504..5edb00dcd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,62 +1,93 @@ -language: c +# .travis.yml for use with EPICS Base ci-scripts +# (see: https://github.com/epics-base/ci-scripts) -matrix: - include: - - sudo: false - dist: bionic - compiler: gcc - env: CMPLR=gcc - - sudo: false - dist: xenial - compiler: gcc - env: CMPLR=gcc - - sudo: false - dist: bionic - compiler: gcc - env: CMPLR=gcc CMD_CXXFLAGS=-std=c++11 - - sudo: false - dist: trusty - compiler: gcc - env: CMPLR=gcc STATIC=YES CMD_CXXFLAGS=-std=c++11 - - sudo: false - dist: bionic - compiler: gcc - env: CMPLR=clang - - sudo: false - dist: xenial - compiler: gcc - env: CMPLR=clang - - sudo: false - dist: trusty - compiler: gcc - env: CMPLR=clang STATIC=YES - - sudo: false - dist: trusty - compiler: gcc - env: WINE=32 TEST=NO STATIC=YES - - sudo: false - dist: trusty - compiler: gcc - env: WINE=32 TEST=NO STATIC=NO - - sudo: false - dist: trusty - compiler: gcc - env: RTEMS=4.10 TEST=NO - - sudo: false - dist: trusty - compiler: gcc - env: RTEMS=4.9 TEST=NO - - os: osx - env: CMD_CFLAGS="-mmacosx-version-min=10.7" CMD_CXXFLAGS="-mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++" CMD_LDXFLAGS="-mmacosx-version-min=10.7 -std=c++11 -stdlib=libc++" +language: cpp +compiler: gcc +dist: xenial + +cache: + directories: + - $HOME/.cache + +env: + global: + - SETUP_PATH=.ci-local:.ci + - BASE=SELF addons: apt: packages: + # for all EPICS builds - libreadline6-dev - libncurses5-dev - perl + # for clang compiler - clang + # for mingw builds (32bit and 64bit) - g++-mingw-w64-i686 + - g++-mingw-w64-x86-64 + # for RTEMS cross builds + - qemu-system-x86 + homebrew: + packages: + # for all EPICS builds + - bash + update: true -install: sh ci/travis-prepare.sh Date: Wed, 22 Apr 2020 16:54:23 +0200 Subject: [PATCH 4/6] appveyor: update .appveyor.yml for ci-scripts --- .appveyor.yml | 92 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 27 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index bc04839e5..6a289f6ea 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,11 +1,18 @@ -# AppVeyor configuration for EPICS Base - -# Ralph Lange -# Copyright (c) 2016-2017 ITER Organization +# .appveyor.yml for use with EPICS Base ci-scripts +# (see: https://github.com/epics-base/ci-scripts) # Version format version: base-{branch}-{build} +#---------------------------------# +# build cache # +#---------------------------------# +# The AppVeyor cache allowance is way too small (1GB per account across all projects, branches and jobs) +# to be used for the dependency builds. + +cache: + - C:\Users\appveyor\.tools + #---------------------------------# # repository cloning # #---------------------------------# @@ -16,7 +23,7 @@ init: - git config --global core.autocrlf true # Set clone depth (do not fetch complete history) -clone_depth: 2 +clone_depth: 5 # Skipping commits affecting only specific files skip_commits: @@ -37,47 +44,78 @@ configuration: - dynamic-debug - static-debug -# Environment variables: compiler toolchain +# Environment variables: compiler toolchain, base version, setup file, ... environment: - matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - TOOLCHAIN: 10.0 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - TOOLCHAIN: 11.0 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - TOOLCHAIN: 12.0 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - TOOLCHAIN: 14.0 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - TOOLCHAIN: 2017 - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - TOOLCHAIN: mingw + # common / default variables for all jobs + SETUP_PATH: .ci-local:.ci + BASE: SELF -# Platform: architecture + matrix: + - CMP: vs2019 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + - CMP: vs2017 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + - CMP: vs2015 + - CMP: vs2013 + - CMP: vs2012 + - CMP: vs2010 + - CMP: mingw + +# Platform: processor architecture platform: - x86 - x64 -# Matrix configuration: allow specific failing jobs +# Matrix configuration: exclude sets of jobs matrix: exclude: - # VS Express installs don't have the 64 bit compiler + # VS2012 and older installs don't have the 64 bit compiler - platform: x64 - TOOLCHAIN: 10.0 - + CMP: vs2012 + - platform: x64 + CMP: vs2010 + - platform: x64 + CMP: vs2008 + # Exclude more jobs to reduce build time + # Skip 32-bit for "middle-aged" compilers + - platform: x86 + CMP: vs2017 + - platform: x86 + CMP: vs2015 #---------------------------------# # building & testing # #---------------------------------# install: - - cmd: ci/appveyor-prepare.bat + - cmd: git submodule update --init --recursive + - cmd: python .ci/appveyor/do.py prepare build_script: - - cmd: ci/appveyor-make.bat + - cmd: python .ci/appveyor/do.py build test_script: - - cmd: ci/appveyor-make.bat runtests + - cmd: python .ci/appveyor/do.py test + +on_finish: + - ps: Get-ChildItem *.tap -Recurse -Force | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } + - cmd: python .ci/appveyor/do.py build test-results -s + +#---------------------------------# +# debugging # +#---------------------------------# + +## if you want to connect by remote desktop to a failed build, uncomment these lines +## note that you will need to connect within the usual build timeout limit (60 minutes) +## so you may want to adjust the build matrix above to just build the one of interest + +# print the connection info +#init: +# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + +# block a failed build (until the watchdog barks) +#on_failure: +# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) #---------------------------------# # notifications # From 076175386f9ef220884607a52422364f11a94418 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Fri, 24 Apr 2020 15:24:43 +0200 Subject: [PATCH 5/6] ci: remove old integration in .ci-local --- .ci-local/appveyor-make.bat | 119 --------------------------------- .ci-local/appveyor-prepare.bat | 38 ----------- .ci-local/travis-build.sh | 88 ------------------------ .ci-local/travis-prepare.sh | 24 ------- 4 files changed, 269 deletions(-) delete mode 100644 .ci-local/appveyor-make.bat delete mode 100644 .ci-local/appveyor-prepare.bat delete mode 100644 .ci-local/travis-build.sh delete mode 100644 .ci-local/travis-prepare.sh diff --git a/.ci-local/appveyor-make.bat b/.ci-local/appveyor-make.bat deleted file mode 100644 index 8d976d93d..000000000 --- a/.ci-local/appveyor-make.bat +++ /dev/null @@ -1,119 +0,0 @@ -:: Universal build script for AppVeyor (https://ci.appveyor.com/) -:: Environment: -:: TOOLCHAIN - toolchain version [10.0/11.0/12.0/14.0/2017/mingw] -:: CONFIGURATION - determines EPICS build [dynamic/static] -:: PLATFORM - architecture [x86/x64] -:: -:: All command line args are passed to make - -Setlocal EnableDelayedExpansion - -set "ST=" -if /i "%CONFIGURATION%"=="static" set ST=-static - -set OS=64BIT -if "%PLATFORM%"=="x86" set OS=32BIT - -echo [INFO] Platform: %OS% - -:: Use parallel make, except for 3.14 -set "MAKEARGS=-j2 -Otarget" -if "%APPVEYOR_REPO_BRANCH%"=="3.14" set MAKEARGS= - -if "%TOOLCHAIN%"=="mingw" ( - set "MAKE=mingw32-make" - if "%OS%"=="64BIT" ( - set "EPICS_HOST_ARCH=windows-x64-mingw" - set "INCLUDE=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\include;%INCLUDE%" - set "PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%" - echo [INFO] MinGW Toolchain 64bit - ) else ( - set "EPICS_HOST_ARCH=win32-x86-mingw" - set "INCLUDE=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\include;%INCLUDE%" - set "PATH=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;%PATH%" - echo [INFO] MinGW Toolchain 32bit - ) - echo [INFO] Compiler Version - gcc -v - goto Finish -) - -set "VSINSTALL=C:\Program Files (x86)\Microsoft Visual Studio %TOOLCHAIN%" -if not exist "%VSINSTALL%\" set "VSINSTALL=C:\Program Files (x86)\Microsoft Visual Studio\%TOOLCHAIN%\Community" -if not exist "%VSINSTALL%\" goto MSMissing - -set "MAKE=C:\tools\make" - -echo [INFO] APPVEYOR_BUILD_WORKER_IMAGE=%APPVEYOR_BUILD_WORKER_IMAGE% - -if "%OS%"=="64BIT" ( - set EPICS_HOST_ARCH=windows-x64%ST% - :: VS 2017 - if exist "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat" ( - call "%VSINSTALL%\VC\Auxiliary\Build\vcvars64.bat" - where cl - if !ERRORLEVEL! NEQ 0 goto MSMissing - goto MSFound - ) - if exist "%VSINSTALL%\VC\vcvarsall.bat" ( - call "%VSINSTALL%\VC\vcvarsall.bat" amd64 - where cl - if !ERRORLEVEL! NEQ 0 ( - call "%VSINSTALL%\VC\vcvarsall.bat" x86_amd64 - where cl - if !ERRORLEVEL! NEQ 0 goto MSMissing - ) - goto MSFound - ) - if exist "%VSINSTALL%\VC\bin\amd64\vcvars64.bat" ( - call "%VSINSTALL%\VC\bin\amd64\vcvars64.bat" - where cl - if !ERRORLEVEL! NEQ 0 goto MSMissing - goto MSFound - ) -) else ( - set EPICS_HOST_ARCH=win32-x86%ST% - :: VS 2017 - if exist "%VSINSTALL%\VC\Auxiliary\Build\vcvars32.bat" ( - call "%VSINSTALL%\VC\Auxiliary\Build\vcvars32.bat" - where cl - if !ERRORLEVEL! NEQ 0 goto MSMissing - goto MSFound - ) - if exist "%VSINSTALL%\VC\vcvarsall.bat" ( - call "%VSINSTALL%\VC\vcvarsall.bat" x86 - where cl - if !ERRORLEVEL! NEQ 0 goto MSMissing - goto MSFound - ) - if exist "%VSINSTALL%\VC\bin\vcvars32.bat" ( - call "%VSINSTALL%\VC\bin\vcvars32.bat" - where cl - if !ERRORLEVEL! NEQ 0 goto MSMissing - goto MSFound - ) - if exist "%VSINSTALL%\Common7\Tools\vsvars32.bat" ( - call "%VSINSTALL%\Common7\Tools\vsvars32.bat" - where cl - if !ERRORLEVEL! NEQ 0 goto MSMissing - goto MSFound - ) -) - -:MSMissing -echo [INFO] Installation for MSVC Toolchain %TOOLCHAIN% / %OS% seems to be missing -exit 1 - -:MSFound -echo [INFO] Microsoft Visual Studio Toolchain %TOOLCHAIN% -echo [INFO] Compiler Version -cl - -:Finish -echo [INFO] EPICS_HOST_ARCH: %EPICS_HOST_ARCH% -echo [INFO] Make version -%MAKE% --version -echo [INFO] Perl version -perl --version - -%MAKE% %MAKEARGS% %* diff --git a/.ci-local/appveyor-prepare.bat b/.ci-local/appveyor-prepare.bat deleted file mode 100644 index a685dbfb3..000000000 --- a/.ci-local/appveyor-prepare.bat +++ /dev/null @@ -1,38 +0,0 @@ -:: Build script for AppVeyor (https://ci.appveyor.com/) -:: Environment: -:: TOOLCHAIN - Toolchain Version [9.0/10.0/11.0/12.0/14.0/mingw] -:: CONFIGURATION - determines EPICS build [dynamic/static, -debug] -:: PLATFORM - "x86" -> use 32bit architecture -:: -:: Prepares an Appveyor build by excuting the following steps -:: - Set up configure\CONFIG_SITE for static vs. dynamic build -:: - Install Mingw (TOOLCHAIN setting) in the in the appropriate flavor -:: - Download and install Make-4.1 from EPICS download page - -Setlocal EnableDelayedExpansion - -set OS=64BIT -if "%PLATFORM%"=="x86" set OS=32BIT - -echo [INFO] Platform: %OS% - -if "%TOOLCHAIN%"=="mingw" ( - echo.%CONFIGURATION% | findstr /C:"static">nul && ( - echo SHARED_LIBRARIES=NO>> configure\CONFIG_SITE - echo STATIC_BUILD=YES>> configure\CONFIG_SITE - echo [INFO] EPICS set up for static build - ) || ( - echo [INFO] EPICS set up for dynamic build - ) - echo.%CONFIGURATION% | findstr /C:"debug">nul && ( - echo HOST_OPT=NO>> configure\CONFIG_SITE - echo [INFO] EPICS set up for debug build - ) || ( - echo [INFO] EPICS set up for optimized build - ) -) - -echo [INFO] Installing Make 4.2.1 from ANL web site -curl -fsS --retry 3 -o C:\tools\make-4.2.1.zip https://epics.anl.gov/download/tools/make-4.2.1-win64.zip -cd \tools -"C:\Program Files\7-Zip\7z" e make-4.2.1.zip diff --git a/.ci-local/travis-build.sh b/.ci-local/travis-build.sh deleted file mode 100644 index e69616aa3..000000000 --- a/.ci-local/travis-build.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh -set -e -x - -die() { - echo "$1" >&2 - exit 1 -} - -ticker() { - while true - do - sleep 60 - date -R - [ -r "$1" ] && tail -n10 "$1" - done -} - -CACHEKEY=1 - -EPICS_HOST_ARCH=`perl src/tools/EpicsHostArch.pl` - -[ -e configure/os/CONFIG_SITE.Common.linux-x86 ] || die "Wrong location: $PWD" - -case "$CMPLR" in -clang) - echo "Host compiler is clang" - cat << EOF >> configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH -GNU = NO -CMPLR_CLASS = clang -CC = clang -CCC = clang++ -EOF - ;; -*) echo "Host compiler is default";; -esac - -if [ "$STATIC" = "YES" ] -then - echo "Build static libraries/executables" - cat << EOF >> configure/CONFIG_SITE -SHARED_LIBRARIES=NO -STATIC_BUILD=YES -EOF -fi - -# requires wine and g++-mingw-w64-i686 -if [ "$WINE" = "32" ] -then - echo "Cross mingw32" - sed -i -e '/CMPLR_PREFIX/d' configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw - cat << EOF >> configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw -CMPLR_PREFIX=i686-w64-mingw32- -EOF - cat << EOF >> configure/CONFIG_SITE -CROSS_COMPILER_TARGET_ARCHS+=win32-x86-mingw -EOF -fi - -# set RTEMS to eg. "4.9" or "4.10" -# requires qemu, bison, flex, texinfo, install-info -if [ -n "$RTEMS" ] -then - echo "Cross RTEMS${RTEMS} for pc386" - install -d /home/travis/.cache - curl -L "https://github.com/mdavidsaver/rsb/releases/download/travis-20160306-2/rtems${RTEMS}-i386-trusty-20190306-2.tar.gz" \ - | tar -C /home/travis/.cache -xj - - sed -i -e '/^RTEMS_VERSION/d' -e '/^RTEMS_BASE/d' configure/os/CONFIG_SITE.Common.RTEMS - cat << EOF >> configure/os/CONFIG_SITE.Common.RTEMS -RTEMS_VERSION=$RTEMS -RTEMS_BASE=/home/travis/.cache/rtems${RTEMS}-i386 -EOF - cat << EOF >> configure/CONFIG_SITE -CROSS_COMPILER_TARGET_ARCHS+=RTEMS-pc386 -EOF - - # find local qemu-system-i386 - echo -n "Using QEMU: " - type qemu-system-i386 || echo "Missing qemu" -fi - -make -j2 RTEMS_QEMU_FIXUPS=YES CMD_CFLAGS="${CMD_CFLAGS}" CMD_CXXFLAGS="${CMD_CXXFLAGS}" CMD_LDFLAGS="${CMD_LDFLAGS}" - -if [ "$TEST" != "NO" ] -then - make tapfiles - make -s test-results -fi diff --git a/.ci-local/travis-prepare.sh b/.ci-local/travis-prepare.sh deleted file mode 100644 index 393bd80b6..000000000 --- a/.ci-local/travis-prepare.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -set -e -x - -die() { - echo "$1" >&2 - exit 1 -} - -if [ -f /etc/hosts ] -then - # The travis-ci "bionic" image throws us a curveball in /etc/hosts - # by including two entries for localhost. The first for 127.0.1.1 - # which causes epicsSockResolveTest to fail. - # cat /etc/hosts - # ... - # 127.0.1.1 localhost localhost ip4-loopback - # 127.0.0.1 localhost nettuno travis vagrant travis-job-.... - - sudo sed -i -e '/^127\.0\.1\.1/ s|localhost\s*||g' /etc/hosts - - echo "==== /etc/hosts" - cat /etc/hosts - echo "====" -fi From 0aa6e9603bf1dcd689986577af056365d2745980 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Fri, 24 Apr 2020 19:18:01 +0200 Subject: [PATCH 6/6] Update .ci submodule to v2.3.3 - fix appveyor issue when building base - fix RTEMS cross build for Base 3.15 - run tests using parallel make --- .ci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci b/.ci index d0f93f192..e91a58837 160000 --- a/.ci +++ b/.ci @@ -1 +1 @@ -Subproject commit d0f93f1920b5ccde78766d9f84cca292047933ec +Subproject commit e91a5883704e9fa57792953436eb7020baf37063