-
Notifications
You must be signed in to change notification settings - Fork 57
/
.travis.yml
55 lines (49 loc) · 3.77 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
# TODO: Extend this to add job(s) for simulations, can be run in parallel with risc-v formal.
dist: focal
sudo: false
language: generic
cache:
directories:
- /home/travis/build/$TRAVIS_PULL_REQUEST_SLUG/formal/env
- /home/travis/build/$TRAVIS_REPO_SLUG/formal/env
before_install:
install:
# If env is not provided by the cache and marked passed, remove any cached env results and build it.
- ( cd formal && if [[ ! -e env/PASSED ]]; then rm -rf env/* && ./make_env.sh; fi )
# Record the commit ID of the latest yosys.
- git ls-remote --heads https://github.com/cliffordwolf/yosys.git refs/heads/master > yosys_latest_commit_id.txt && sed -i 's/\s.*//' yosys_latest_commit_id.txt && echo "Yosys latest commit ID:" && cat yosys_latest_commit_id.txt
# Record the commit ID of the latest SymbiYosys.
- git ls-remote --heads https://github.com/cliffordwolf/SymbiYosys.git refs/heads/master > SymbiYosys_latest_commit_id.txt && sed -i 's/\s.*//' SymbiYosys_latest_commit_id.txt && echo "SymbiYosys latest commit ID:" && cat SymbiYosys_latest_commit_id.txt
# Install the Sandpiper-SaaS client
- pip3 install sandpiper-saas --user
before_script:
- cd formal
- if ("$TRAVIS_PULL_REQUEST"); then export BUILD_PATH=$TRAVIS_PULL_REQUEST_SLUG; else export BUILD_PATH=$TRAVIS_REPO_SLUG; fi
# TODO : Travis stopped providing free computes.
# TODO : Changes have been made that would break this, but we need to rework this for a different CI system anyway.
# Below refers to .../formal/warp-v_formal.tlv which used to be a top-level file, but now .../warp-v.tlv is used directly.
# TODO : riscv-formal for 6 stage implementation
jobs :
include :
- stage : "Check all 3 configs with risc-v formal" # Run riscv-formal for WARP-V.
name : "1 Stage - riscv-formal"
script:
- sed -i "/-stage/c\ m4_define([\'M4_STANDARD_CONFIG\'], [\'1-stage\'])" /home/travis/build/$BUILD_PATH/formal/warp-v_formal.tlv
- sed -i "/insn /c\insn 20" /home/travis/build/$BUILD_PATH/formal/checks.cfg
- PATH=/home/travis/build/$BUILD_PATH/formal/env/bin:$PATH bash -c 'make tos_agree verif';
- script:
- sed -i "/-stage/c\ m4_define([\'M4_STANDARD_CONFIG\'], [\'4-stage\'])" /home/travis/build/$BUILD_PATH/formal/warp-v_formal.tlv
- sed -i "/insn /c\insn 29" /home/travis/build/$BUILD_PATH/formal/checks.cfg
- PATH=/home/travis/build/$BUILD_PATH/formal/env/bin:$PATH bash -c 'make tos_agree verif';
name : "4 Stage - riscv-formal"
# the structure for the YAML format is non-standard in some way, but Travis interprets it correctly
# with both the scripts being run parallel under same stage (in Travis terminology)
after_success:
after_failure:
# Upload files for debug.
- echo "Uploading up to 4 failure traces for debug" && for FILE in `ls /home/travis/build/$BUILD_PATH/formal/checks/*/FAIL | head -n 4`; do curl --upload-file `echo $FILE | sed s/FAIL$//`engine_0/trace.vcd https://transfer.sh/`echo $FILE | sed 's/^.*\/\([^\/]*\)\/FAIL$/\1/'`_trace.vcd && echo; done
after_script:
# Report a message if we didn't use the latest commit of yosys.
- if cmp -s yosys_latest_commit_id.txt env/yosys_commit_id.txt; then echo '******** Using the following cached yosys (https://github.com/cliffordwolf/yosys.git) commit ID which is not the latest. Consider clearing Travis cache. **********' && cat env/yosys_commit_id.txt && echo '**********'; fi
# Report a message if we didn't use the latest commit of SymbiYosys.
- if cmp -s SymbiYosys_latest_commit_id.txt env/SymbiYosys_commit_id.txt; then echo '******** Using the following cached SymbiYosys (https://github.com/cliffordwolf/SymbiYosys) commit ID which is not the latest. Consider clearing Travis cache. **********' && cat env/SymbiYosys_commit_id.txt && echo '**********'; fi