language: scala sudo: false cache: directories: $HOME/.cache/coursier $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 name: "Install: [Verilator, Yosys]" script: - bash .install_verilator.sh - verilator --version - bash .install_yosys.sh - yosys -V - stage: prepare name: "Compile FIRRTL to share with subsequent stages" script: - sbt $SBT_ARGS assembly workspaces: create: name: firrtl_build paths: - target/ - utils/bin/firrtl.jar - project/project/ - project/target/ - stage: test name: "Unidoc builds (no warnings)" workspaces: use: firrtl_build script: - sbt $SBT_ARGS +unidoc - stage: test name: "Tests: FIRRTL (2.12)" workspaces: use: firrtl_build script: - verilator --version - sbt $SBT_ARGS test - stage: test name: "Tests: FIRRTL (2.11)" script: - verilator --version - sbt ++2.11.12 $SBT_ARGS test - stage: test name: "Tests: chisel3 (2.12)" workspaces: use: firrtl_build script: - verilator --version - bash .run_chisel_tests.sh - stage: test name: "Formal equivalence: RocketCore" workspaces: use: firrtl_build script: - yosys -V - "travis_wait 30 sleep 1800 &" - ./.run_formal_checks.sh RocketCore - stage: test name: "Formal equivalence: FPU" workspaces: use: firrtl_build script: - yosys -V - "travis_wait 30 sleep 1800 &" - ./.run_formal_checks.sh FPU - stage: test name: "Formal equivalence: ICache" workspaces: use: firrtl_build script: - yosys -V - "travis_wait 30 sleep 1800 &" - ./.run_formal_checks.sh ICache - stage: test name: "Formal equivalence: small expression-tree stress tests" workspaces: use: firrtl_build script: - yosys -V - "travis_wait 30 sleep 1800 &" - ./.run_formal_checks.sh Ops - ./.run_formal_checks.sh AddNot - stage: test name: "Sanity check benchmarking scripts" workspaces: use: firrtl_build script: - benchmark/scripts/benchmark_cold_compile.py -N 2 --designs regress/ICache.fir --versions HEAD - benchmark/scripts/find_heap_bound.py -- -cp firrtl*jar firrtl.stage.FirrtlMain -i regress/ICache.fir -o out -X verilog