1
0

Move travis to the regression Makefile

We want to add support for caching riscv-tools builds on Travis and the easiest
way to do so looks like to jus go ahead and use
This commit is contained in:
Palmer Dabbelt 2016-02-22 17:29:07 -08:00
parent 0ac5c07683
commit edd0b3b824
3 changed files with 61 additions and 65 deletions

View File

@ -24,17 +24,14 @@ addons:
- texinfo - texinfo
env: env:
global:
- RISCV="/home/travis/riscv_install"
- PATH=$PATH:$RISCV/bin
matrix: matrix:
- VCONFIG=DefaultVLSIConfig FCONFIG=DefaultFPGAConfig ECONFIG=DefaultCPPConfig - CONFIG=DefaultCPPConfig
- VCONFIG=RoccExampleConfig FCONFIG=RoccExampleConfig ECONFIG=RoccExampleConfig - CONFIG=RoccExampleConfig
- VCONFIG=DmaControllerConfig FCONFIG=DmaControllerFPGAConfig ECONFIG=DmaControllerConfig - CONFIG=DmaControllerConfig
- VCONFIG=MemtestConfig FCONFIG=MemtestConfig ECONFIG=MemtestConfig - CONFIG=MemtestConfig
- VCONFIG=MemtestL2Config FCONFIG=MemtestL2Config ECONFIG=MemtestL2Config - CONFIG=MemtestL2Config
- VCONFIG=BroadcastRegressionTestConfig FCONFIG=BroadcastRegressionTestConfig ECONFIG=BroadcastRegressionTestConfig - CONFIG=BroadcastRegressionTestConfig
- VCONFIG=CacheRegressionTestConfig FCONFIG=CacheRegressionTestConfig ECONFIG=CacheRegressionTestConfig - CONFIG=CacheRegressionTestConfig
# blacklist private branches # blacklist private branches
branches: branches:
@ -44,41 +41,15 @@ branches:
- hurricane - hurricane
before_install: before_install:
# make install destination
- mkdir -p $RISCV
# don't do travis on riscv-tools
- rm riscv-tools/.travis.yml - rm riscv-tools/.travis.yml
# pull in needed repos from riscv-tools (travis isn't recursive)
- cd riscv-tools
- git submodule update --init riscv-fesvr
- git submodule update --init riscv-gnu-toolchain
- git submodule update --init riscv-tests
- cd riscv-tests
- git submodule update --init
- cd ../..
# use recently installed gcc
- export CXX=g++-4.8 CC=gcc-4.8 - export CXX=g++-4.8 CC=gcc-4.8
script: script:
# test verilog - make vsim-verilog -C regression CONFIG=$CONFIG TORTURE_CONFIG=default
- cd vsim - make fsim-verilog -C regression CONFIG=$CONFIG TORTURE_CONFIG=default
- make CONFIG=$VCONFIG verilog - make emulator-ndebug -C regression CONFIG=$CONFIG TORTURE_CONFIG=default
- cd ../fsim - make emulator-asm-tests -C regression CONFIG=$CONFIG TORTURE_CONFIG=default
- make CONFIG=$FCONFIG verilog - make emulator-bmark-tests -C regression CONFIG=$CONFIG TORTURE_CONFIG=default -j1
# build riscv-fesvr
- cd ../riscv-tools/riscv-fesvr before_cache:
- mkdir build - ls -tr regression/install | tail -n+2 | sed s@^@regression/install/@ | xargs rm -rf
- cd build
- ../configure --prefix=$RISCV
- make install
# build emulator
- cd ../../../emulator
- make -j 8 CONFIG=$ECONFIG
# build riscv-gcc
- cd ../riscv-tools/riscv-gnu-toolchain
- ./configure --prefix=$RISCV
- make -j 8 > build.gcc.out
# run riscv-tests
- cd ../../emulator
- make -j 8 CONFIG=$ECONFIG run-asm-tests
- make CONFIG=$ECONFIG run-bmark-tests

View File

@ -19,8 +19,12 @@ endif
# The top-level directory that contains rocket-chip # The top-level directory that contains rocket-chip
TOP ?= .. TOP ?= ..
# The hash of the tools that we're using
TOOLS_HASH ?= $(shell git -C $(TOP) ls-tree HEAD -- riscv-tools | xargs echo | cut -d' ' -f3)
$(info Using riscv-tools of $(TOOLS_HASH))
# The directory that the tools get built into. # The directory that the tools get built into.
RISCV ?= install RISCV ?= install/$(TOOLS_HASH)
# Torture saves the failing tests into a directory, which defaults to just somehing inside the regressions directory. # Torture saves the failing tests into a directory, which defaults to just somehing inside the regressions directory.
TORTURE_SAVE_DIR ?= torture-failures TORTURE_SAVE_DIR ?= torture-failures
@ -37,8 +41,8 @@ clean:
# this order, since there's dependencies for everything it doesn't actually # this order, since there's dependencies for everything it doesn't actually
# matter. They're here to make running the various targets from the # matter. They're here to make running the various targets from the
# commandline a bit cleaner. # commandline a bit cleaner.
submodules: stamps/submodules.stamp submodules: stamps/other-submodules.stamp
tools: stamps/tools.stamp tools: $(RISCV)/install.stamp
emulator-debug: stamps/$(CONFIG)/emulator-debug.stamp emulator-debug: stamps/$(CONFIG)/emulator-debug.stamp
emulator-ndebug: stamps/$(CONFIG)/emulator-ndebug.stamp emulator-ndebug: stamps/$(CONFIG)/emulator-ndebug.stamp
@ -46,12 +50,14 @@ emulator-asm-tests: stamps/$(CONFIG)/emulator-asm-tests.stamp
emulator-bmark-tests: stamps/$(CONFIG)/emulator-bmark-tests.stamp emulator-bmark-tests: stamps/$(CONFIG)/emulator-bmark-tests.stamp
emulator-torture: stamps/$(CONFIG)/emulator-torture-$(TORTURE_CONFIG).stamp emulator-torture: stamps/$(CONFIG)/emulator-torture-$(TORTURE_CONFIG).stamp
vsim-verilog: stamps/$(CONFIG)/vsim-verilog.stamp
vsim-debug: stamps/$(CONFIG)/vsim-debug.stamp vsim-debug: stamps/$(CONFIG)/vsim-debug.stamp
vsim-ndebug: stamps/$(CONFIG)/vsim-ndebug.stamp vsim-ndebug: stamps/$(CONFIG)/vsim-ndebug.stamp
vsim-asm-tests: stamps/$(CONFIG)/vsim-asm-tests.stamp vsim-asm-tests: stamps/$(CONFIG)/vsim-asm-tests.stamp
vsim-bmark-tests: stamps/$(CONFIG)/vsim-bmark-tests.stamp vsim-bmark-tests: stamps/$(CONFIG)/vsim-bmark-tests.stamp
vsim-torture: stamps/$(CONFIG)/vsim-torture-$(TORTURE_CONFIG).stamp vsim-torture: stamps/$(CONFIG)/vsim-torture-$(TORTURE_CONFIG).stamp
fsim-verilog: stamps/$(CONFIG)/fsim-verilog.stamp
fsim-debug: stamps/$(CONFIG)/fsim-debug.stamp fsim-debug: stamps/$(CONFIG)/fsim-debug.stamp
fsim-ndebug: stamps/$(CONFIG)/fsim-ndebug.stamp fsim-ndebug: stamps/$(CONFIG)/fsim-ndebug.stamp
fsim-asm-tests: stamps/$(CONFIG)/fsim-asm-tests.stamp fsim-asm-tests: stamps/$(CONFIG)/fsim-asm-tests.stamp
@ -59,47 +65,66 @@ fsim-bmark-tests: stamps/$(CONFIG)/fsim-bmark-tests.stamp
fsim-torture: stamps/$(CONFIG)/fsim-torture-$(TORTURE_CONFIG).stamp fsim-torture: stamps/$(CONFIG)/fsim-torture-$(TORTURE_CONFIG).stamp
# Checks out all the rocket-chip submodules # Checks out all the rocket-chip submodules
stamps/submodules.stamp: stamps/other-submodules.stamp:
mkdir -p $(dir $@) mkdir -p $(dir $@)
git -C $(abspath $(TOP)) submodule update --init --recursive git -C $(abspath $(TOP)) submodule update --init --recursive chisel
touch $@ git -C $(abspath $(TOP)) submodule update --init --recursive context-dependent-environments
git -C $(abspath $(TOP)) submodule update --init --recursive dramsim2
git -C $(abspath $(TOP)) submodule update --init --recursive groundtest
git -C $(abspath $(TOP)) submodule update --init --recursive hardfloat
git -C $(abspath $(TOP)) submodule update --init --recursive junctions
git -C $(abspath $(TOP)) submodule update --init --recursive rocket
git -C $(abspath $(TOP)) submodule update --init --recursive torture
git -C $(abspath $(TOP)) submodule update --init --recursive uncore
date > $@
# Builds the RISC-V toolchain $(RISCV)/install.stamp:
stamps/tools.stamp: stamps/submodules.stamp
mkdir -p $(dir $@) mkdir -p $(dir $@)
git -C $(abspath $(TOP)) submodule update --init riscv-tools
git -C $(abspath $(TOP))/riscv-tools submodule update --init --recursive riscv-gnu-toolchain
git -C $(abspath $(TOP))/riscv-tools submodule update --init --recursive riscv-isa-sim
git -C $(abspath $(TOP))/riscv-tools submodule update --init --recursive riscv-fesvr
git -C $(abspath $(TOP))/riscv-tools submodule update --init --recursive riscv-opcodes
git -C $(abspath $(TOP))/riscv-tools submodule update --init --recursive riscv-pk
git -C $(abspath $(TOP))/riscv-tools submodule update --init --recursive riscv-tests
+cd $(abspath $(TOP))/riscv-tools; RISCV=$(abspath $(RISCV)) ./build.sh +cd $(abspath $(TOP))/riscv-tools; RISCV=$(abspath $(RISCV)) ./build.sh
touch $@ date > $@
# Builds the various simulators # Builds the various simulators
stamps/$(CONFIG)/%-ndebug.stamp: stamps/submodules.stamp stamps/tools.stamp stamps/$(CONFIG)/%-verilog.stamp: stamps/other-submodules.stamp $(RISCV)/install.stamp
mkdir -p $(dir $@)
+flock -x $(dir $@)/chisel-lock $(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-verilog.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) verilog
date > $@
stamps/$(CONFIG)/%-ndebug.stamp: stamps/other-submodules.stamp $(RISCV)/install.stamp
mkdir -p $(dir $@) mkdir -p $(dir $@)
+flock -x $(dir $@)/chisel-lock $(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-ndebug.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) +flock -x $(dir $@)/chisel-lock $(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-ndebug.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV))
touch $@ date > $@
stamps/$(CONFIG)/%-debug.stamp: stamps/submodules.stamp stamps/tools.stamp stamps/$(CONFIG)/%-debug.stamp: stamps/other-submodules.stamp $(RISCV)/install.stamp
mkdir -p $(dir $@) mkdir -p $(dir $@)
+flock -x $(dir $@)/chisel-lock $(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-debug.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) debug +flock -x $(dir $@)/chisel-lock $(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-debug.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) debug
touch $@ date > $@
# Runs tests on one of the simulators # Runs tests on one of the simulators
stamps/$(CONFIG)/%-asm-tests.stamp: stamps/$(CONFIG)/%-ndebug.stamp stamps/tools.stamp stamps/submodules.stamp stamps/$(CONFIG)/%-asm-tests.stamp: stamps/$(CONFIG)/%-ndebug.stamp
mkdir -p $(dir $@) mkdir -p $(dir $@)
$(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-asm-tests.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) run-asm-tests $(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-asm-tests.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) run-asm-tests
touch $@ date > $@
stamps/$(CONFIG)/%-bmark-tests.stamp: stamps/$(CONFIG)/%-ndebug.stamp stamps/tools.stamp stamps/submodules.stamp stamps/$(CONFIG)/%-bmark-tests.stamp: stamps/$(CONFIG)/%-ndebug.stamp
mkdir -p $(dir $@) mkdir -p $(dir $@)
$(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-bmark-tests.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) run-bmark-tests $(MAKE) -C $(abspath $(TOP))/$(patsubst stamps/$(CONFIG)/%-bmark-tests.stamp,%,$@) CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) run-bmark-tests
touch $@ date > $@
# The torture tests run subtly differently on the different targets, so they # The torture tests run subtly differently on the different targets, so they
# don't have pattern rules like everything else does. # don't have pattern rules like everything else does.
stamps/$(CONFIG)/vsim-torture-$(TORTURE_CONFIG).stamp: stamps/$(CONFIG)/vsim-debug.stamp stamps/$(CONFIG)/vsim-ndebug.stamp stamps/$(CONFIG)/vsim-torture-$(TORTURE_CONFIG).stamp: stamps/$(CONFIG)/vsim-debug.stamp stamps/$(CONFIG)/vsim-ndebug.stamp
mkdir -p $(dir $@) mkdir -p $(dir $@)
$(MAKE) -C $(abspath $(TOP))/torture rnight RTL_CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) PATH="$(abspath $(RISCV)/bin:$(PATH))" OPTIONS="-C $(abspath $(TOP)/torture/config/$(TORTURE_CONFIG).config) -p $(abspath $(TORTURE_SAVE_DIR)) -m 30 -t 10" $(MAKE) -C $(abspath $(TOP))/torture rnight RTL_CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) PATH="$(abspath $(RISCV)/bin:$(PATH))" OPTIONS="-C $(abspath $(TOP)/torture/config/$(TORTURE_CONFIG).config) -p $(abspath $(TORTURE_SAVE_DIR)) -m 30 -t 10"
touch $@ date > $@
stamps/$(CONFIG)/emulator-torture-$(TORTURE_CONFIG).stamp: stamps/$(CONFIG)/emulator-debug.stamp stamps/$(CONFIG)/emulator-ndebug.stamp stamps/$(CONFIG)/emulator-torture-$(TORTURE_CONFIG).stamp: stamps/$(CONFIG)/emulator-debug.stamp stamps/$(CONFIG)/emulator-debug.stamp
mkdir -p $(dir $@) mkdir -p $(dir $@)
$(MAKE) -C $(abspath $(TOP))/torture cnight RTL_CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) PATH="$(abspath $(RISCV)/bin:$(PATH))" OPTIONS="-C $(abspath $(TOP)/torture/config/$(TORTURE_CONFIG).config) -p $(abspath $(TORTURE_SAVE_DIR)) -m 30 -t 10" $(MAKE) -C $(abspath $(TOP))/torture cnight RTL_CONFIG=$(CONFIG) RISCV=$(abspath $(RISCV)) PATH="$(abspath $(RISCV)/bin:$(PATH))" OPTIONS="-C $(abspath $(TOP)/torture/config/$(TORTURE_CONFIG).config) -p $(abspath $(TORTURE_SAVE_DIR)) -m 30 -t 10"
touch $@ date > $@

@ -1 +1 @@
Subproject commit 733342509b271bffb3b6df51b85784abc6627ad8 Subproject commit b54b3d0d80cd620ddcce1680201c6f366051d150