fomu-workshop/.github/tests.sh

115 lines
1.7 KiB
Bash
Raw Normal View History

#!/bin/bash
set -e
2020-10-10 19:29:37 +00:00
TOOLCHAIN_PATH="${TOOLCHAIN_PATH:-$PWD/$(find fomu-toolchain-* -type d -maxdepth 0 2>/dev/null)}"
2020-01-03 16:40:56 +00:00
echo "TOOLCHAIN_PATH: $TOOLCHAIN_PATH"
export PATH=$TOOLCHAIN_PATH/bin:$PATH
export GHDL_PREFIX=$TOOLCHAIN_PATH/lib/ghdl
echo '::group::RISC-V C Example'
(
2020-01-03 16:40:56 +00:00
set -x
cd riscv-blink
make
file riscv-blink.dfu
)
echo '::endgroup::'
echo '::group::RISC-V Zig Example'
2020-05-10 10:55:16 +00:00
(
set -x
cd riscv-zig-blink
zig build
file riscv-zig-blink.bin
)
echo '::endgroup::'
2020-05-10 10:55:16 +00:00
echo '::group::Verilog Blink example'
(
2020-01-03 16:40:56 +00:00
set -x
2020-01-23 10:27:50 +00:00
cd verilog/blink
2020-01-23 10:34:32 +00:00
make FOMU_REV=pvt
file blink.dfu
)
echo '::endgroup::'
echo '::group::Verilog Blink (expanded) example for Hacker board'
(
2020-01-03 16:40:56 +00:00
set -x
2020-01-03 16:55:19 +00:00
cd verilog/blink-expanded
2020-01-03 19:06:48 +00:00
make FOMU_REV=hacker
file blink.dfu
)
echo '::endgroup::'
echo '::group::Verilog Blink (expanded) example for PVT board'
(
2020-01-03 16:40:56 +00:00
set -x
2020-01-03 16:55:19 +00:00
cd verilog/blink-expanded
2020-01-03 19:06:48 +00:00
make FOMU_REV=pvt
file blink.dfu
)
echo '::endgroup::'
2020-10-11 23:44:14 +00:00
echo '::group::VHDL Blink example'
(
set -x
cd vhdl/blink
make FOMU_REV=pvt
file blink.dfu
)
echo '::endgroup::'
echo '::group::Mixed HDL Blink example'
(
set -x
cd mixed-hdl/blink
make FOMU_REV=pvt
file blink.dfu
)
echo '::endgroup::'
echo '::group::LiteX example for Hacker'
(
2020-01-03 16:40:56 +00:00
set -x
cd litex
./workshop.py --board=hacker
file build/gateware/top.dfu
)
echo '::endgroup::'
echo '::group::LiteX example for PVT'
(
2020-01-03 16:40:56 +00:00
set -x
cd litex
./workshop.py --board=pvt
file build/gateware/top.dfu
)
echo '::endgroup::'
2020-10-15 16:30:58 +00:00
echo '::group::Migen Blink example for PVT board'
(
set -x
cd migen
FOMU_REV=pvt ./blink.py
file build/top.bin
rm -rf build
)
echo '::endgroup::'
echo '::group::Migen Blink (expanded) example for PVT board'
(
set -x
cd migen
FOMU_REV=pvt ./blink-expanded.py
file build/top.bin
rm -rf build
)
echo '::endgroup::'