From 30c2e53f9ec32867e0de8ae74cdc57913a93124c Mon Sep 17 00:00:00 2001 From: Todd Strader Date: Thu, 14 Nov 2019 17:54:57 -0500 Subject: [PATCH] Travis fixes --- .travis.yml | 56 +++++++++++++++++++++++++--------------- examples/xml_py/Makefile | 13 ++++++++++ 2 files changed, 48 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index ed6fd82b9..d33f0c5ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,15 +4,17 @@ # redistribute it and/or modify it under the terms of either the GNU Lesser # General Public License Version 3 or the Perl Artistic License Version 2.0. -language: cpp +version: ~> 1.0 +os: linux +language: cpp cache: ccache env: global: - VERILATOR_CACHE=$HOME/verilator_cache - VERILATOR_ROOT=$PWD - - VERILATOR_NUM_JOBS=$((`nproc` + 1)) + - VERILATOR_NUM_JOBS=$(echo `nproc` + 1 | bc) - VERILATOR_CONFIG_FLAGS="--enable-maintainer-mode --enable-longtests" - OBJCACHE=ccache @@ -23,7 +25,7 @@ cache: before_install: # Perl modules needed for testing - yes yes | sudo cpan -fi Unix::Processors Parallel::Forker Bit::Vector - - sudo apt-get install gdb + - sudo apt-get install gdb gtkwave before_script: - bash -x ci/build_verilator.sh after_script: @@ -38,75 +40,79 @@ jobs: - if: type != cron stage: "Build Verilator" name: Build Verilator - os: linux compiler: gcc script: echo "Done building Verilator" # Non-cron build will just run on whatever linux flavor we get - if: type != cron stage: test name: Dist test - os: linux compiler: gcc script: ci/test.sh dist - if: type != cron stage: test name: Vlt test - os: linux compiler: gcc script: ci/test.sh vlt - if: type != cron stage: test name: Vltmt test - os: linux compiler: gcc script: ci/test.sh vltmt # Cron builds try different OS/compiler combinations - if: type = cron stage: "Build Verilator" name: Build xenial gcc Verilator - os: xenial + os: linux + dist: xenial compiler: gcc script: echo "Done building Verilator" - if: type = cron stage: test name: Xenail gcc dist test - os: xenial + os: linux + dist: xenial compiler: gcc script: ci/test.sh dist - if: type = cron stage: test name: Xenail gcc vlt test - os: xenial + os: linux + dist: xenial compiler: gcc script: ci/test.sh vlt - if: type = cron stage: test name: Xenail gcc vltmt test - os: xenial + os: linux + dist: xenial compiler: gcc script: ci/test.sh vltmt - if: type = cron stage: "Build Verilator" name: Build xenial clang Verilator - os: xenial + os: linux + dist: xenial compiler: clang script: echo "Done building Verilator" - if: type = cron stage: test name: Xenail clang dist test - os: xenial + os: linux + dist: xenial compiler: clang script: ci/test.sh dist - if: type = cron stage: test name: Xenail clang vlt test - os: xenial + os: linux + dist: xenial compiler: clang script: ci/test.sh vlt - if: type = cron stage: test name: Xenail clang vltmt test - os: xenial + os: linux + dist: xenial compiler: clang script: ci/test.sh vltmt # - if: type = cron @@ -125,37 +131,45 @@ jobs: # stage: test # name: OSX gcc vlt test # os: osx -# os: osx # compiler: gcc # script: ci/test.sh vlt # - if: type = cron # stage: test # name: OSX gcc vltmt test # os: osx -# os: osx # compiler: gcc # script: ci/test.sh vltmt - if: type = cron stage: "Build Verilator" name: Build trusty gcc Verilator - os: trusty + os: linux + dist: trusty compiler: gcc script: echo "Done building Verilator" - if: type = cron stage: test name: Trusty gcc dist test - os: trusty + os: linux + dist: trusty compiler: gcc script: ci/test.sh dist - if: type = cron stage: test name: Trusty gcc vlt test - os: trusty + os: linux + dist: trusty compiler: gcc script: ci/test.sh vlt - if: type = cron stage: test - os: trusty + os: linux + dist: trusty name: Trusty gcc vltmt test compiler: gcc script: ci/test.sh vltmt + +notifications: + email: + if: repo = verilator/verilator + recipients: + - todd.strader@gmail.com diff --git a/examples/xml_py/Makefile b/examples/xml_py/Makefile index c2a4eb780..44d681c05 100644 --- a/examples/xml_py/Makefile +++ b/examples/xml_py/Makefile @@ -25,7 +25,20 @@ endif DOT = dot PYTHON = python3 +PYTHON_VERSION := $(shell ${PYTHON} --version 2>&1) +PYTHON_VERSION_FULL := $(wordlist 2,4,$(subst ., ,${PYTHON_VERSION})) +PYTHON_VERSION_MAJOR := $(word 1,${PYTHON_VERSION_FULL}) +PYTHON_VERSION_MINOR := $(word 2,${PYTHON_VERSION_FULL}) +PYTHON_GE_3_5 := $(shell [ ${PYTHON_VERSION_MAJOR} -eq 3 -a ${PYTHON_VERSION_MINOR} -ge 5 ] && echo true) + +ifeq (${PYTHON_GE_3_5},true) default: test +else +default: python_message +endif + +python_message: + @echo "Found Python version ${PYTHON_VERSION}, but require >= 3.5" test: \ test-vl_file_copy \