aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 78fcea0f79bb516b89c47f38b7c140954c40cf8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
language: scala
sudo: false

cache:
  directories:
    $HOME/.ivy2
    $HOME/.sbt
    $INSTALL_DIR

git:
  depth: 10

env:
  global:
    INSTALL_DIR=$TRAVIS_BUILD_DIR/install
    VERILATOR_ROOT=$INSTALL_DIR
    PATH=$PATH:$VERILATOR_ROOT/bin:$TRAVIS_BUILD_DIR/utils/bin
    SBT_ARGS="-Dsbt.log.noformat=true"

before_script:
  - OLDEST_SHARED=`git log --format=%H $TRAVIS_COMMIT_RANGE | tail -n1`
  - OLDEST_COMMIT=`git log --format=%H | tail -n1`
  - if [ $OLDEST_SHARED == $OLDEST_COMMIT ]; then git fetch --unshallow; fi

stages:
  - prepare
  - test

# We do not use the built-in tests as generated by using multiple Scala
# versions because the cache is not shared between stages with any
# environmental differences.
# Instead, we specify the version of Scala manually for each test (or leave it
# as the default as defined in FIRRTL's build.sbt).
jobs:
  include:
    # Because these write to the same install directory, they must run in the
    # same script
    - stage: prepare
      script:
        - bash .install_verilator.sh
        - verilator --version
        - bash .install_yosys.sh
        - yosys -V
    - stage: test
      script:
        - verilator --version
        - sbt ++2.12.4 $SBT_ARGS test
    - stage: test
      script:
        - verilator --version
        - sbt ++2.11.12 $SBT_ARGS test
    # For Chisel tests we use the 2.11.12 version
    - stage: test
      script:
        - verilator --version
        - sbt ++2.11.12 $SBT_ARGS clean assembly publishLocal
        - bash .run_chisel_tests.sh
    - stage: test
      script:
        - yosys -V
        - "travis_wait 30 sleep 1800 &"
        - ./.run_formal_checks.sh RocketCore
    - stage: test
      script:
        - yosys -V
        - "travis_wait 30 sleep 1800 &"
        - ./.run_formal_checks.sh FPU
    - stage: test
      script:
        - yosys -V
        - "travis_wait 30 sleep 1800 &"
        - ./.run_formal_checks.sh ICache