fomu-workshop/.github/tests.sh
2020-01-05 12:01:17 -08:00

87 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
set -e
TOOLCHAIN_PATH="$PWD/$(find fomu-toolchain-* -type d -maxdepth 0 2>/dev/null)"
echo "TOOLCHAIN_PATH: $TOOLCHAIN_PATH"
export PATH=$TOOLCHAIN_PATH/bin:$PATH
# Test the RISC-V C example
travis_fold start riscv-c
echo "RISC-V C Example"
travis_time_start
(
set -x
cd riscv-blink
make
file riscv-blink.dfu
)
travis_time_finish
travis_fold end riscv-c
# Test the Verilog Blink (basic) example
travis_fold start verilog-blink-basic
echo "Verilog Blink (basic) example"
travis_time_start
(
set -x
cd verilog/blink-basic
make
file blink.dfu
)
travis_time_finish
travis_fold end verilog-blink-basic
# Test the Verilog Blink (expanded) example for Hacker
travis_fold start verilog-blink-expanded-hacker
echo "Verilog Blink (expanded) example for Hacker board"
travis_time_start
(
set -x
cd verilog/blink-expanded
make FOMU_REV=hacker
file blink.dfu
)
travis_time_finish
travis_fold end verilog-blink-expanded-hacker
# Test the Verilog Blink (expanded) example for PVT
travis_fold start verilog-blink-expanded-pvt
echo "Verilog Blink (expanded) example for PVT board"
travis_time_start
(
set -x
cd verilog/blink-expanded
make FOMU_REV=pvt
file blink.dfu
)
travis_time_finish
travis_fold end verilog-blink-expanded-pvt
# Test the LiteX example for Hacker
travis_fold start litex-hacker
echo "LiteX example for Hacker"
travis_time_start
(
set -x
cd litex
./workshop.py --board=hacker
file build/gateware/top.dfu
)
travis_time_finish
travis_fold end litex-hacker
# Test the LiteX example for PVT
travis_fold start litex-pvt
echo "LiteX example for PVT"
travis_time_start
(
set -x
cd litex
./workshop.py --board=pvt
file build/gateware/top.dfu
)
travis_time_finish
travis_fold end litex-pvt