diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml new file mode 100644 index 000000000..d7321e903 --- /dev/null +++ b/.github/workflows/check_pr.yml @@ -0,0 +1,64 @@ +name: Verilator PR CI + +on: push + +jobs: + vlt: + runs-on: ubuntu-20.04 + name: build and test + env: + CI_OS_NAME: linux + CCACHE_COMPRESS: 1 + CCACHE_DIR: ${{ github.workspace }}/.ccache + CCACHE_MAXSIZE: 4Gi + CC: ccache gcc + CXX: ccache g++ + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Cache + uses: actions/cache@v2 + env: + cache-name: ccache + with: + path: ${{ github.workspace }}/.ccache + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.ref }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install packages for build + env: + CI_BUILD_STAGE_NAME: build + run: bash ci/ci-install.bash + - name: CCACHE maintenance + run: mkdir -p $CCACHE_DIR && bash ci/ci-ccache-maint.bash + - name: Build + env: + CI_BUILD_STAGE_NAME: build + run: bash ci/ci-script.bash + - name: Install packages for tests + env: + CI_BUILD_STAGE_NAME: test + run: bash ci/ci-install.bash + - name: Test dist-vlt-0 + env: + CI_BUILD_STAGE_NAME: test + TESTS: dist-vlt-0 + run: bash ci/ci-script.bash + - name: Test dist-vlt-1 + env: + CI_BUILD_STAGE_NAME: test + TESTS: dist-vlt-1 + run: bash ci/ci-script.bash + - name: Test vltmt-0 + env: + CI_BUILD_STAGE_NAME: test + TESTS: vltmt-0 + run: bash ci/ci-script.bash + - name: Test vltmt-1 + env: + CI_BUILD_STAGE_NAME: test + TESTS: vltmt-1 + run: bash ci/ci-script.bash diff --git a/.gitignore b/.gitignore index d426d7134..7a6a696dd 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ *.tex *.pdf /Makefile +/.ccache README TAGS autom4te.cache diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a10734230..000000000 --- a/.travis.yml +++ /dev/null @@ -1,149 +0,0 @@ -# DESCRIPTION: Travis-CI config -# -# Copyright 2003-2020 by Wilson Snyder. This program is free software; you -# can 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. -# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 - -version: ~> 1.0 - -language: cpp - -cache: - directories: - - $HOME/.ccache - -env: - global: - - VERILATOR_ROOT=$TRAVIS_BUILD_DIR - -# The list and order of build stages -stages: - - build # Build Verilator - - test # Run tests - -# Dump info about the environment for debugging -before_install: - # To dump the script that Travis itself is executing, add 'cat $0' here - - cd "$TRAVIS_BUILD_DIR" # Skipping the git clone in later stages requires this - - export CCACHE_MAXSIZE=$(ci/travis-ccache-size.bash) # Set here after the 'cd' - - env | sort - - ls -lA . - - ls -lA bin - - g++ -E -dM -c -x c++ /dev/null | sort - - clang++ -E -dM -c -x c++ /dev/null | sort - -# Install all dependencies -# We run twice to attempt on failure to recover from temp network problems -install: - - ./ci/travis-install.bash || ./ci/travis-install.bash - -before_script: - # ccache maintenance - - ./ci/travis-ccache-maint.bash - # Don't produce core dumps (esp. on FreeBSD) - - ulimit -c 0 - # On Focal, set the SystemC installation location - - | - if [ "$TRAVIS_DIST" = "focal" ] && [ "$M32" != "1" ]; then - export SYSTEMC_INCLUDE=/usr/include - export SYSTEMC_LIBDIR=/usr/lib/x86_64-linux-gnu - fi - # Override compiler for M32 - - | - if [ "$M32" = "1" ]; then - export CC="$CC -m32" - export CXX="$CXX -m32" - unset M32 # verilated.mk actually references $(M32) so unset - fi - -before_cache: - - ccache -s -z - -# All jobs run the same script -script: ./ci/travis-script.bash - -# Enumerate all the jobs -jobs: - include: - ############################################################################ - # Jobs in the 'build' stage - ############################################################################ - # GCC builds - - {stage: build, if: type = cron, os: linux, dist: trusty, compiler: gcc, workspaces: {create: {name: trusty-gcc, paths: .}}} - - {stage: build, if: type = cron, os: linux, dist: xenial, compiler: gcc, workspaces: {create: {name: xenial-gcc, paths: .}}} - - {stage: build, if: type = cron, os: linux, dist: bionic, compiler: gcc, workspaces: {create: {name: bionic-gcc, paths: .}}} - - {stage: build, os: linux, dist: focal, compiler: gcc, workspaces: {create: {name: focal-gcc, paths: .}}} - # Clang builds - - {stage: build, if: type = cron, os: linux, dist: xenial, compiler: clang, workspaces: {create: {name: xenial-clang, paths: .}}} - - {stage: build, os: linux, dist: focal, compiler: clang, workspaces: {create: {name: focal-clang, paths: .}}} - # Coverage build - - {stage: build, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {create: {name: coverage, paths: .}}, env: COVERAGE=1} - # 32-bit build - - {stage: build, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {create: {name: focal-gcc-m32, paths: .}}, env: M32=1} - # OS X build - - {stage: build, if: type = cron, os: osx, osx_image: xcode11.6, compiler: clang, workspaces: {create: {name: osx-xcode11.6, paths: .}}} - # FreeBSD build - #- {stage: build, if: type = cron, os: freebsd, compiler: clang, workspaces: {create: {name: freebsd, paths: .}}} - ############################################################################ - # Jobs in the 'test' stage - ############################################################################ - # GCC tests - - {stage: test, if: type = cron, os: linux, dist: trusty, compiler: gcc, workspaces: {use: trusty-gcc}, git: {clone: false}, env: TESTS=dist-vlt-0} - - {stage: test, if: type = cron, os: linux, dist: trusty, compiler: gcc, workspaces: {use: trusty-gcc}, git: {clone: false}, env: TESTS=dist-vlt-1} - - {stage: test, if: type = cron, os: linux, dist: trusty, compiler: gcc, workspaces: {use: trusty-gcc}, git: {clone: false}, env: TESTS=vltmt-0} - - {stage: test, if: type = cron, os: linux, dist: trusty, compiler: gcc, workspaces: {use: trusty-gcc}, git: {clone: false}, env: TESTS=vltmt-1} - - {stage: test, if: type = cron, os: linux, dist: xenial, compiler: gcc, workspaces: {use: xenial-gcc}, git: {clone: false}, env: TESTS=dist-vlt-0} - - {stage: test, if: type = cron, os: linux, dist: xenial, compiler: gcc, workspaces: {use: xenial-gcc}, git: {clone: false}, env: TESTS=dist-vlt-1} - - {stage: test, if: type = cron, os: linux, dist: xenial, compiler: gcc, workspaces: {use: xenial-gcc}, git: {clone: false}, env: TESTS=vltmt-0} - - {stage: test, if: type = cron, os: linux, dist: xenial, compiler: gcc, workspaces: {use: xenial-gcc}, git: {clone: false}, env: TESTS=vltmt-1} - - {stage: test, if: type = cron, os: linux, dist: bionic, compiler: gcc, workspaces: {use: bionic-gcc}, git: {clone: false}, env: TESTS=dist-vlt-0} - - {stage: test, if: type = cron, os: linux, dist: bionic, compiler: gcc, workspaces: {use: bionic-gcc}, git: {clone: false}, env: TESTS=dist-vlt-1} - - {stage: test, if: type = cron, os: linux, dist: bionic, compiler: gcc, workspaces: {use: bionic-gcc}, git: {clone: false}, env: TESTS=vltmt-0} - - {stage: test, if: type = cron, os: linux, dist: bionic, compiler: gcc, workspaces: {use: bionic-gcc}, git: {clone: false}, env: TESTS=vltmt-1} - - {stage: test, if: type != cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc}, git: {clone: false}, env: TESTS=dist-vlt-0} - - {stage: test, if: type != cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc}, git: {clone: false}, env: TESTS=dist-vlt-1} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc}, git: {clone: false}, env: TESTS=vltmt-0} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc}, git: {clone: false}, env: TESTS=vltmt-1} - # Clang tests - - {stage: test, if: type = cron, os: linux, dist: xenial, compiler: clang, workspaces: {use: xenial-clang}, git: {clone: false}, env: TESTS=dist-vlt-0} - - {stage: test, if: type = cron, os: linux, dist: xenial, compiler: clang, workspaces: {use: xenial-clang}, git: {clone: false}, env: TESTS=dist-vlt-1} - - {stage: test, if: type = cron, os: linux, dist: xenial, compiler: clang, workspaces: {use: xenial-clang}, git: {clone: false}, env: TESTS=vltmt-0} - - {stage: test, if: type = cron, os: linux, dist: xenial, compiler: clang, workspaces: {use: xenial-clang}, git: {clone: false}, env: TESTS=vltmt-1} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: clang, workspaces: {use: focal-clang}, git: {clone: false}, env: TESTS=dist-vlt-0} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: clang, workspaces: {use: focal-clang}, git: {clone: false}, env: TESTS=dist-vlt-1} - - {stage: test, if: type != cron, os: linux, dist: focal, compiler: clang, workspaces: {use: focal-clang}, git: {clone: false}, env: TESTS=vltmt-0} - - {stage: test, if: type != cron, os: linux, dist: focal, compiler: clang, workspaces: {use: focal-clang}, git: {clone: false}, env: TESTS=vltmt-1} - # Coverage tests - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-dist} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-vlt-0} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-vlt-1} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-vlt-2} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-vlt-3} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-vltmt-0} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-vltmt-1} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-vltmt-2} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: coverage}, git: {clone: false}, env: TESTS=coverage-vltmt-3} - # 32-bit tests - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc-m32}, git: {clone: false}, env: [M32=1, TESTS=dist-vlt-0]} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc-m32}, git: {clone: false}, env: [M32=1, TESTS=dist-vlt-1]} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc-m32}, git: {clone: false}, env: [M32=1, TESTS=vltmt-0]} - - {stage: test, if: type = cron, os: linux, dist: focal, compiler: gcc, workspaces: {use: focal-gcc-m32}, git: {clone: false}, env: [M32=1, TESTS=vltmt-1]} - # OS X tests - - {stage: test, if: type = cron, os: osx, osx_image: xcode11.6, compiler: clang, workspaces: {use: osx-xcode11.6}, git: {clone: false}, env: TESTS=dist-vlt-0} - - {stage: test, if: type = cron, os: osx, osx_image: xcode11.6, compiler: clang, workspaces: {use: osx-xcode11.6}, git: {clone: false}, env: TESTS=dist-vlt-1} - - {stage: test, if: type = cron, os: osx, osx_image: xcode11.6, compiler: clang, workspaces: {use: osx-xcode11.6}, git: {clone: false}, env: TESTS=vltmt-0} - - {stage: test, if: type = cron, os: osx, osx_image: xcode11.6, compiler: clang, workspaces: {use: osx-xcode11.6}, git: {clone: false}, env: TESTS=vltmt-1} - # FreeBSD tests - #- {stage: test, if: type = cron, os: freebsd, compiler: clang, workspaces: {use: freebsd}, git: {clone: false}, env: TESTS=dist-vlt-0} - #- {stage: test, if: type = cron, os: freebsd, compiler: clang, workspaces: {use: freebsd}, git: {clone: false}, env: TESTS=dist-vlt-1} - #- {stage: test, if: type = cron, os: freebsd, compiler: clang, workspaces: {use: freebsd}, git: {clone: false}, env: TESTS=vltmt-0} - #- {stage: test, if: type = cron, os: freebsd, compiler: clang, workspaces: {use: freebsd}, git: {clone: false}, env: TESTS=vltmt-1} - -notifications: - email: - if: repo = verilator/verilator - recipients: - - wsnyder@wsnyder.org - - todd.strader@gmail.com diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index cea857c16..e6c77f89f 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -1,3 +1,4 @@ +\.ccache/ \.clang-format \.clang-tidy \.git/ diff --git a/ci/travis-ccache-maint.bash b/ci/ci-ccache-maint.bash similarity index 84% rename from ci/travis-ccache-maint.bash rename to ci/ci-ccache-maint.bash index a8f2ddfc0..f12fadb35 100755 --- a/ci/travis-ccache-maint.bash +++ b/ci/ci-ccache-maint.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# DESCRIPTION: Verilator: Travis CI ccache maintenance +# DESCRIPTION: Verilator: CI ccache maintenance # # Copyright 2020 by Geza Lore. This program is free software; you # can redistribute it and/or modify it under the terms of either the GNU @@ -20,7 +20,7 @@ ccache --version # Flush ccache if requested in commit message COMMIT="${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}" -if git log --format=%B -n 1 "$COMMIT" | grep -q -i '\[travis\s\+ccache\s\+clear\]'; then +if git log --format=%B -n 1 "$COMMIT" | grep -q -i '\[CI\s\+ccache\s\+clear\]'; then echo "Flushing ccache due to commit message" ccache -C fi diff --git a/ci/travis-ccache-size.bash b/ci/ci-ccache-size.bash similarity index 78% rename from ci/travis-ccache-size.bash rename to ci/ci-ccache-size.bash index 60a5b412d..c7cbf35e3 100755 --- a/ci/travis-ccache-size.bash +++ b/ci/ci-ccache-size.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# DESCRIPTION: Verilator: Travis CI ccache sizer +# DESCRIPTION: Verilator: CI ccache sizer # # Copyright 2020 by Geza Lore. This program is free software; you # can redistribute it and/or modify it under the terms of either the GNU @@ -20,18 +20,18 @@ fatal() { echo "ERROR: $(basename "$0"): $1" >&2; exit 1; } -if [ "$TRAVIS_BUILD_STAGE_NAME" = "build" ]; then +if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then if [ "$COVERAGE" == 1 ]; then - echo "1024M" + echo "4096M" else - echo "768M" + echo "4096M" fi -elif [ "$TRAVIS_BUILD_STAGE_NAME" = "test" ]; then +elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then if [[ $TESTS == coverage-* ]]; then - echo "1536M" + echo "4096M" else - echo "256M" + echo "4096M" fi else - fatal "Unknown build stage: '$TRAVIS_BUILD_STAGE_NAME'" + fatal "Unknown build stage: '$CI_BUILD_STAGE_NAME'" fi diff --git a/ci/travis-install.bash b/ci/ci-install.bash similarity index 67% rename from ci/travis-install.bash rename to ci/ci-install.bash index 9178e66b5..757ccb053 100755 --- a/ci/travis-install.bash +++ b/ci/ci-install.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# DESCRIPTION: Verilator: Travis CI dependency install script +# DESCRIPTION: Verilator: CI dependency install script # # Copyright 2020 by Geza Lore. This program is free software; you # can redistribute it and/or modify it under the terms of either the GNU @@ -14,10 +14,6 @@ # required by the particular build stage. ################################################################################ -# Note that Travis runs "apt-get update" when "apt-get install" is used in the -# .travis.yml file directly, but since we invoke it via this script, we need to -# run it manually where requried, otherwise some packages cannot be found. - set -e set -x @@ -25,14 +21,14 @@ fatal() { echo "ERROR: $(basename "$0"): $1" >&2; exit 1; } -if [ "$TRAVIS_OS_NAME" = "linux" ]; then +if [ "$CI_OS_NAME" = "linux" ]; then MAKE=make -elif [ "$TRAVIS_OS_NAME" = "osx" ]; then +elif [ "$CI_OS_NAME" = "osx" ]; then MAKE=make -elif [ "$TRAVIS_OS_NAME" = "freebsd" ]; then +elif [ "$CI_OS_NAME" = "freebsd" ]; then MAKE=gmake else - fatal "Unknown os: '$TRAVIS_OS_NAME'" + fatal "Unknown os: '$CI_OS_NAME'" fi install-vcddiff() { @@ -43,61 +39,63 @@ install-vcddiff() { sudo cp "${TMP_DIR}/vcddiff" /usr/local/bin } -if [ "$TRAVIS_BUILD_STAGE_NAME" = "build" ]; then +if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then ############################################################################## # Dependencies of jobs in the 'build' stage, i.e.: packages required to # build Verilator - if [ "$TRAVIS_OS_NAME" = "linux" ]; then + if [ "$CI_OS_NAME" = "linux" ]; then sudo apt-get update sudo apt-get install libfl-dev sudo apt-get install libgoogle-perftools-dev + sudo apt-get install ccache + sudo apt-get install libsystemc libsystemc-dev if [ "$COVERAGE" = 1 ]; then yes yes | sudo cpan -fi Unix::Processors Parallel::Forker fi if [ "$M32" = 1 ]; then sudo apt-get install gcc-multilib g++-multilib fi - elif [ "$TRAVIS_OS_NAME" = "osx" ]; then + elif [ "$CI_OS_NAME" = "osx" ]; then brew update brew install ccache perl gperftools - elif [ "$TRAVIS_OS_NAME" = "freebsd" ]; then + elif [ "$CI_OS_NAME" = "freebsd" ]; then sudo pkg install -y autoconf bison ccache gmake perl5 else - fatal "Unknown os: '$TRAVIS_OS_NAME'" + fatal "Unknown os: '$CI_OS_NAME'" fi -elif [ "$TRAVIS_BUILD_STAGE_NAME" = "test" ]; then +elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then ############################################################################## # Dependencies of jobs in the 'test' stage, i.e.: packages required to # run the tests - if [ "$TRAVIS_OS_NAME" = "linux" ]; then + if [ "$CI_OS_NAME" = "linux" ]; then sudo apt-get update sudo apt-get install gdb gtkwave lcov - if [ "$TRAVIS_DIST" = "focal" ]; then + if [ "$CI_DIST" = "focal" ]; then sudo apt-get install libsystemc-dev fi if [ "$M32" = 1 ]; then sudo apt-get install lib32z1-dev gcc-multilib g++-multilib fi - elif [ "$TRAVIS_OS_NAME" = "osx" ]; then + elif [ "$CI_OS_NAME" = "osx" ]; then brew update # brew cask install gtkwave # fst2vcd hangs at launch, so don't bother brew install ccache perl - elif [ "$TRAVIS_OS_NAME" = "freebsd" ]; then + elif [ "$CI_OS_NAME" = "freebsd" ]; then # fst2vcd fails with "Could not open '', exiting." sudo pkg install -y ccache gmake perl5 python3 else - fatal "Unknown os: '$TRAVIS_OS_NAME'" + fatal "Unknown os: '$CI_OS_NAME'" fi # Common installs - if [ "$TRAVIS_DIST" != "trusty" ]; then - TRAVIS_CPAN_REPO=https://cpan.org + if [ "$CI_DIST" != "trusty" ]; then + CI_CPAN_REPO=https://cpan.org fi - yes yes | sudo cpan -M $TRAVIS_CPAN_REPO -fi Unix::Processors Parallel::Forker + yes yes | sudo cpan -M $CI_CPAN_REPO -fi Unix::Processors Parallel::Forker install-vcddiff else ############################################################################## # Unknown build stage - fatal "Unknown build stage: '$TRAVIS_BUILD_STAGE_NAME'" + fatal "Unknown build stage: '$CI_BUILD_STAGE_NAME'" fi diff --git a/ci/travis-script.bash b/ci/ci-script.bash similarity index 84% rename from ci/travis-script.bash rename to ci/ci-script.bash index b1405c9f0..5c12aeef6 100755 --- a/ci/travis-script.bash +++ b/ci/ci-script.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# DESCRIPTION: Verilator: Travis CI main job script +# DESCRIPTION: Verilator: CI main job script # # Copyright 2020 by Geza Lore. This program is free software; you # can redistribute it and/or modify it under the terms of either the GNU @@ -10,9 +10,8 @@ ################################################################################ # This is the main script executed in the 'script' phase by all jobs. We use a -# single script to keep the .travis.yml spec simple. We pass job parameters via -# environment variables using 'env' keys. Having different 'env' keys in jobs -# ensures they use different Travis build caches. +# single script to keep the CI setting simple. We pass job parameters via +# environment variables using 'env' keys. ################################################################################ set -e @@ -22,20 +21,20 @@ fatal() { echo "ERROR: $(basename "$0"): $1" >&2; exit 1; } -if [ "$TRAVIS_OS_NAME" = "linux" ]; then +if [ "$CI_OS_NAME" = "linux" ]; then export MAKE=make NPROC=$(nproc) -elif [ "$TRAVIS_OS_NAME" = "osx" ]; then +elif [ "$CI_OS_NAME" = "osx" ]; then export MAKE=make NPROC=$(sysctl -n hw.logicalcpu) -elif [ "$TRAVIS_OS_NAME" = "freebsd" ]; then +elif [ "$CI_OS_NAME" = "freebsd" ]; then export MAKE=gmake NPROC=$(sysctl -n hw.ncpu) else - fatal "Unknown os: '$TRAVIS_OS_NAME'" + fatal "Unknown os: '$CI_OS_NAME'" fi -if [ "$TRAVIS_BUILD_STAGE_NAME" = "build" ]; then +if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then ############################################################################## # Build verilator @@ -43,7 +42,7 @@ if [ "$TRAVIS_BUILD_STAGE_NAME" = "build" ]; then autoconf ./configure --enable-longtests --enable-ccwarn "$MAKE" -j "$NPROC" -k - if [ "$TRAVIS_OS_NAME" = "osx" ]; then + if [ "$CI_OS_NAME" = "osx" ]; then file bin/verilator_bin file bin/verilator_bin_dbg md5 bin/verilator_bin @@ -54,11 +53,11 @@ if [ "$TRAVIS_BUILD_STAGE_NAME" = "build" ]; then else nodist/code_coverage --stages 1-2 fi -elif [ "$TRAVIS_BUILD_STAGE_NAME" = "test" ]; then +elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then ############################################################################## # Run tests - if [ "$TRAVIS_OS_NAME" = "osx" ]; then + if [ "$CI_OS_NAME" = "osx" ]; then export VERILATOR_TEST_NO_GDB=1 # Pain to get GDB to work on OS X export VERILATOR_TEST_NO_GPROF=1 # Apple Clang has no -pg # export PATH="/Applications/gtkwave.app/Contents/Resources/bin:$PATH" # fst2vcd @@ -73,7 +72,7 @@ elif [ "$TRAVIS_BUILD_STAGE_NAME" = "test" ]; then # one for Travis. Remove the file and re-link... rm bin/verilator_bin_dbg "$MAKE" -j "$NPROC" -k - elif [ "$TRAVIS_OS_NAME" = "freebsd" ]; then + elif [ "$CI_OS_NAME" = "freebsd" ]; then export VERILATOR_TEST_NO_GDB=1 # Disable for now, ideally should run export VERILATOR_TEST_NO_GPROF=1 # gprof is a bit different on FreeBSD, disable fi @@ -130,5 +129,5 @@ elif [ "$TRAVIS_BUILD_STAGE_NAME" = "test" ]; then else ############################################################################## # Unknown build stage - fatal "Unknown build stage: '$TRAVIS_BUILD_STAGE_NAME'" + fatal "Unknown build stage: '$CI_BUILD_STAGE_NAME'" fi