-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
145 lines (130 loc) · 5.43 KB
/
.travis.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
language: generic
sudo: true
dist: xenial
cache:
directories:
- $HOME/riscv64-gcc
- $HOME/riscv/share/riscv-tests/isa
- $HOME/haskell-files
- $HOME/verilator-binary
- $HOME/.ghcup
- $HOME/.cabal
- $HOME/verilog-file
env:
global:
- PATH=$HOME/.cabal/bin:$HOME/.ghcup/bin:$HOM:$HOME/verilator-binary/bin:$HOME/riscv64-gcc/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/bin:$PATH
- COQ=8.9
jobs:
include:
- stage: generate_riscv_tests_with_verilator_binary_and_haskell_files
script:
- wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14.tar.gz
- tar xzf riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14.tar.gz
- rm -rf $HOME/riscv64-gcc/*
- mv riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14/ $HOME/riscv64-gcc/
- git clone https://github.com/riscv/riscv-tests
- cd riscv-tests
- git submodule update --init --recursive
- autoconf
- ./configure --prefix=$HOME/riscv
- make -j
- make install
- cd ..
- echo "32 bit tests"
- ./fileList.sh $HOME/riscv/share/riscv-tests/isa 32
- echo "64 bit tests"
- ./fileList.sh $HOME/riscv/share/riscv-tests/isa 64
- script:
- git clone http://git.veripool.org/git/verilator
- cd verilator
- autoconf
- ./configure --prefix=$HOME/verilator-binary
- make -j 4
- make install
- verilator --version
- cd ..
- script:
- sudo add-apt-repository ppa:jgross-h/many-coq-versions --yes
- sudo apt-get update
- sudo apt-get install coq-8.9.0 --yes
- coqc --version
- travis_wait 50 make -j 4
- rm -rf $HOME/haskell-files/*
- mkdir -p $HOME/haskell-files
- cp *.hs $HOME/haskell-files/
- script:
- export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
- curl https://get-ghcup.haskell.org -sSf | sh
- ghc --version
- cabal --version
- stage: generate_verilog_and_haskell-binary
script:
- ls -R $HOME/.ghcup
- ls -R $HOME/.cabal
- ghc --version
- cabal update
- cabal install hashmap
- cabal install vector
- cabal install bv
- cabal install random
- cabal install split
- ls $HOME/haskell-files
- cp $HOME/haskell-files/* ./Haskell
- ./Kami/fixHaskell.sh ./Kami
- cat Haskell/Target.raw > Haskell/Target.hs
- echo "rtlMod = model32" >> Haskell/Target.hs
- cat ./Haskell/HaskellTarget.raw > ./Haskell/HaskellTarget.hs
- echo "kami_model = (kami_model32, 32)" >> Haskell/HaskellTarget.hs
- ghc -O1 --make -iHaskell -iKami Kami/PrettyPrintVerilog.hs
- cp Main.raw Main.hs
- ghc -O1 --make -iHaskell -iKami Main.hs
- mv ./Main $HOME/verilog-file/Main32
- while sleep 560; do echo "=====[ $SECONDS seconds still running ]====="; done &
- ./Kami/PrettyPrintVerilog > $HOME/verilog-file/System32.sv
- kill %1
- cat Haskell/Target.raw > Haskell/Target.hs
- echo "rtlMod = model64" >> Haskell/Target.hs
- cat ./Haskell/HaskellTarget.raw > ./Haskell/HaskellTarget.hs
- echo "kami_model = (kami_model64, 64)" >> Haskell/HaskellTarget.hs
- ghc -O1 --make -iHaskell -iKami Kami/PrettyPrintVerilog.hs
- cp Main.raw Main.hs
- ghc -O1 --make -iHaskell -iKami Main.hs
- mv ./Main $HOME/verilog-file/Main64
- while sleep 560; do echo "=====[ $SECONDS seconds still running ]====="; done &
- ./Kami/PrettyPrintVerilog > $HOME/verilog-file/System64.sv
- kill %1
- stage: generate_obj_dir_and_run_tests
script:
- sudo apt-get install parallel --yes
- ls $HOME/verilog-file
- cp $HOME/verilog-file/Main32 ./Main
- while sleep 560; do echo "=====[ $SECONDS seconds still running ]====="; done &
- ./fileList.sh $HOME/riscv/share/riscv-tests/isa 32 | parallel -P 0 -j0 "(file {} | (grep -iq elf && ./runElf.sh --haskell --path {})) || (file {} | grep -viq elf)"
- kill %1
- script:
- sudo apt-get install parallel --yes
- ls $HOME/verilog-file
- cp $HOME/verilog-file/Main64 ./Main
- while sleep 560; do echo "=====[ $SECONDS seconds still running ]====="; done &
- ./fileList.sh $HOME/riscv/share/riscv-tests/isa 64| parallel -P 0 -j0 "(file {} | (grep -iq elf && ./runElf.sh --haskell --path {})) || (file {} | grep -viq elf)"
- kill %1
- script:
- sudo apt-get install clang parallel --yes
- clang --version
- ls $HOME/verilog-file
- cp $HOME/verilog-file/System32.sv ./System.sv
- verilator --top-module system -Wno-CMPCONST -O0 -Wno-WIDTH --cc System.sv --trace --trace-underscore -Wno-fatal --exe System.cpp
- make -j -C obj_dir -f Vsystem.mk Vsystem CXX=clang LINK=clang
- while sleep 560; do echo "=====[ $SECONDS seconds still running ]====="; done &
- ./fileList.sh $HOME/riscv/share/riscv-tests/isa 32 | parallel -P 0 -j0 "(file {} | (grep -iq elf && ./runElf.sh --path {})) || (file {} | grep -viq elf)"
- kill %1
- script:
- sudo apt-get install clang parallel --yes
- clang --version
- ls $HOME/verilog-file
- cp $HOME/verilog-file/System64.sv ./System.sv
- verilator --top-module system -Wno-CMPCONST -O0 -Wno-WIDTH --cc System.sv --trace --trace-underscore -Wno-fatal --exe System.cpp
- make -j -C obj_dir -f Vsystem.mk Vsystem CXX=clang LINK=clang
- while sleep 560; do echo "=====[ $SECONDS seconds still running ]====="; done &
- ./fileList.sh $HOME/riscv/share/riscv-tests/isa 64 | parallel -P 0 -j0 "(file {} | (grep -iq elf && ./runElf.sh --path {})) || (file {} | grep -viq elf)"
- kill %1