mirror of https://github.com/YosysHQ/yosys.git
Merge branch 'master' into btor-ng
This commit is contained in:
commit
66f2d10822
183
.travis.yml
183
.travis.yml
|
@ -1,36 +1,153 @@
|
||||||
sudo: false
|
sudo: false
|
||||||
script: make && make test
|
|
||||||
language: cpp
|
language: cpp
|
||||||
addons:
|
|
||||||
apt:
|
cache:
|
||||||
sources:
|
ccache: true
|
||||||
- ubuntu-toolchain-r-test
|
directories:
|
||||||
packages:
|
- ~/.local-bin
|
||||||
- gperf
|
|
||||||
- build-essential
|
|
||||||
- clang
|
env:
|
||||||
- bison
|
global:
|
||||||
- flex
|
- MAKEFLAGS="-j 2"
|
||||||
- libreadline-dev
|
|
||||||
- gawk
|
matrix:
|
||||||
- tcl-dev
|
include:
|
||||||
- libffi-dev
|
# Latest gcc-4.8, earliest version supported by Travis
|
||||||
- git
|
- os: linux
|
||||||
- mercurial
|
addons:
|
||||||
- graphviz
|
apt:
|
||||||
- xdot
|
packages:
|
||||||
- pkg-config
|
- g++-4.8
|
||||||
- python
|
- gperf
|
||||||
- g++-4.8
|
- build-essential
|
||||||
|
- bison
|
||||||
|
- flex
|
||||||
|
- libreadline-dev
|
||||||
|
- gawk
|
||||||
|
- tcl-dev
|
||||||
|
- libffi-dev
|
||||||
|
- git
|
||||||
|
- mercurial
|
||||||
|
- graphviz
|
||||||
|
- xdot
|
||||||
|
- pkg-config
|
||||||
|
- python
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-4.8 && CXX=g++-4.8"
|
||||||
|
|
||||||
|
# Latest gcc-6 on Travis Linux
|
||||||
|
- os: linux
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- g++-6
|
||||||
|
- gperf
|
||||||
|
- build-essential
|
||||||
|
- bison
|
||||||
|
- flex
|
||||||
|
- libreadline-dev
|
||||||
|
- gawk
|
||||||
|
- tcl-dev
|
||||||
|
- libffi-dev
|
||||||
|
- git
|
||||||
|
- mercurial
|
||||||
|
- graphviz
|
||||||
|
- xdot
|
||||||
|
- pkg-config
|
||||||
|
- python
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-6 && CXX=g++-6"
|
||||||
|
|
||||||
|
# Latest gcc supported on Travis Linux
|
||||||
|
- os: linux
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- g++-7
|
||||||
|
- gperf
|
||||||
|
- build-essential
|
||||||
|
- bison
|
||||||
|
- flex
|
||||||
|
- libreadline-dev
|
||||||
|
- gawk
|
||||||
|
- tcl-dev
|
||||||
|
- libffi-dev
|
||||||
|
- git
|
||||||
|
- mercurial
|
||||||
|
- graphviz
|
||||||
|
- xdot
|
||||||
|
- pkg-config
|
||||||
|
- python
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-7 && CXX=g++-7"
|
||||||
|
|
||||||
|
# Clang which ships on Trusty Linux
|
||||||
|
- os: linux
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- llvm-toolchain-precise-3.8
|
||||||
|
packages:
|
||||||
|
- clang-3.8
|
||||||
|
- gperf
|
||||||
|
- build-essential
|
||||||
|
- bison
|
||||||
|
- flex
|
||||||
|
- libreadline-dev
|
||||||
|
- gawk
|
||||||
|
- tcl-dev
|
||||||
|
- libffi-dev
|
||||||
|
- git
|
||||||
|
- mercurial
|
||||||
|
- graphviz
|
||||||
|
- xdot
|
||||||
|
- pkg-config
|
||||||
|
- python
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CONFIG=clang && CC=clang-3.8 && CXX=clang++-3.8"
|
||||||
|
|
||||||
|
# Latest clang supported by Travis Linux
|
||||||
|
- os: linux
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- llvm-toolchain-trusty-5.0
|
||||||
|
packages:
|
||||||
|
- clang-5.0
|
||||||
|
- gperf
|
||||||
|
- build-essential
|
||||||
|
- bison
|
||||||
|
- flex
|
||||||
|
- libreadline-dev
|
||||||
|
- gawk
|
||||||
|
- tcl-dev
|
||||||
|
- libffi-dev
|
||||||
|
- git
|
||||||
|
- mercurial
|
||||||
|
- graphviz
|
||||||
|
- xdot
|
||||||
|
- pkg-config
|
||||||
|
- python
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CONFIG=clang && CC=clang-5.0 && CXX=clang++-5.0"
|
||||||
|
|
||||||
|
# Latest clang on Mac OS X
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode8
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CONFIG=gcc && CC=gcc-7 && CXX=g++-7"
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
|
- ./.travis/setup.sh
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap Homebrew/bundle && brew bundle; fi
|
|
||||||
- git clone git://github.com/steveicarus/iverilog.git
|
script:
|
||||||
- (cd iverilog && autoconf && ./configure --prefix=$HOME/iverilog && make && make install)
|
- ./.travis/build-and-test.sh
|
||||||
- export PATH=$PATH:$HOME/iverilog/bin
|
|
||||||
compiler:
|
after_success:
|
||||||
# - clang
|
- ./.travis/deploy-after-success.sh
|
||||||
- gcc
|
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
# - osx
|
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
source .travis/common.sh
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r'
|
||||||
|
echo
|
||||||
|
|
||||||
|
if [ "$CONFIG" = "gcc" ]; then
|
||||||
|
echo "Configuring for gcc."
|
||||||
|
make config-gcc
|
||||||
|
elif [ "$CONFIG" = "clang" ]; then
|
||||||
|
echo "Configuring for clang."
|
||||||
|
make config-clang
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo -en 'travis_fold:end:script.configure\\r'
|
||||||
|
echo
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo 'Building...' && echo -en 'travis_fold:start:script.build\\r'
|
||||||
|
echo
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo -en 'travis_fold:end:script.build\\r'
|
||||||
|
echo
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo 'Testing...' && echo -en 'travis_fold:start:script.test\\r'
|
||||||
|
echo
|
||||||
|
|
||||||
|
make test
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo -en 'travis_fold:end:script.test\\r'
|
||||||
|
echo
|
||||||
|
|
||||||
|
##########################################################################
|
|
@ -0,0 +1,15 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
# Setup the CC / CXX from the matrix config
|
||||||
|
eval "${MATRIX_EVAL}"
|
||||||
|
|
||||||
|
# Look for location binaries first
|
||||||
|
export PATH="$HOME/.local-bin/bin:$PATH"
|
||||||
|
|
||||||
|
# OS X specific common setup
|
||||||
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
|
export PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Parallel builds!
|
||||||
|
MAKEFLAGS="-j 2"
|
|
@ -0,0 +1,6 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# FIXME: Upload the build results somewhere...
|
|
@ -0,0 +1,89 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
source .travis/common.sh
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
# Fixing Travis's git clone
|
||||||
|
echo
|
||||||
|
echo 'Fixing git setup...' && echo -en 'travis_fold:start:before_install.git\\r'
|
||||||
|
echo
|
||||||
|
git fetch --unshallow && git fetch --tags
|
||||||
|
|
||||||
|
# For pull requests, we get more info about the git source.
|
||||||
|
if [ z"$TRAVIS_PULL_REQUEST_SLUG" != z ]; then
|
||||||
|
echo "- Fetching from pull request source"
|
||||||
|
git remote add source https://github.com/$TRAVIS_PULL_REQUEST_SLUG.git
|
||||||
|
git fetch source && git fetch --tags
|
||||||
|
|
||||||
|
echo "- Fetching the actual pull request"
|
||||||
|
git fetch origin pull/$TRAVIS_PULL_REQUEST/head:pull-$TRAVIS_PULL_REQUEST-head
|
||||||
|
git fetch origin pull/$TRAVIS_PULL_REQUEST/merge:pull-$TRAVIS_PULL_REQUEST-merge
|
||||||
|
|
||||||
|
git log -n 5 --graph pull-$TRAVIS_PULL_REQUEST-merge
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For building branches we need to fix the "detached head" state.
|
||||||
|
if [ z"$TRAVIS_BRANCH" != z ]; then
|
||||||
|
TRAVIS_COMMIT_ACTUAL=$(git log --pretty=format:'%H' -n 1)
|
||||||
|
echo "- Fixing detached head (current $TRAVIS_COMMIT_ACTUAL -> $TRAVIS_COMMIT)"
|
||||||
|
git fetch origin $TRAVIS_COMMIT
|
||||||
|
git branch -v
|
||||||
|
git branch -D $TRAVIS_BRANCH || true
|
||||||
|
git checkout $TRAVIS_COMMIT -b $TRAVIS_BRANCH
|
||||||
|
git branch -v
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Output status information.
|
||||||
|
git status
|
||||||
|
git describe --tags
|
||||||
|
git log -n 5 --graph
|
||||||
|
echo
|
||||||
|
echo -en 'travis_fold:end:before_install.git\\r'
|
||||||
|
echo
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
# Mac OS X specific setup.
|
||||||
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
|
(
|
||||||
|
echo
|
||||||
|
echo 'Setting up brew...' && echo -en 'travis_fold:start:before_install.brew\\r'
|
||||||
|
echo
|
||||||
|
brew update
|
||||||
|
brew tap Homebrew/bundle
|
||||||
|
brew bundle
|
||||||
|
brew install ccache
|
||||||
|
brew install gcc
|
||||||
|
echo
|
||||||
|
echo -en 'travis_fold:end:before_install.brew\\r'
|
||||||
|
echo
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
|
||||||
|
# Install iverilog
|
||||||
|
(
|
||||||
|
if [ ! -e ~/.local-bin/bin/iverilog ]; then
|
||||||
|
echo
|
||||||
|
echo 'Building iverilog...' && echo -en 'travis_fold:start:before_install.iverilog\\r'
|
||||||
|
echo
|
||||||
|
mkdir -p ~/.local-src
|
||||||
|
mkdir -p ~/.local-bin
|
||||||
|
cd ~/.local-src
|
||||||
|
git clone git://github.com/steveicarus/iverilog.git
|
||||||
|
cd iverilog
|
||||||
|
autoconf
|
||||||
|
./configure --prefix=$HOME/.local-bin
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
echo
|
||||||
|
echo -en 'travis_fold:end:before_install.iverilog\\r'
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
|
##########################################################################
|
Loading…
Reference in New Issue