diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..02e7dfc2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Run all testbenches +on: + push: + branches: + - master + pull_request: + +jobs: + run_testbenches: + runs-on: ubuntu-latest + container: + image: ghcr.io/lnls-dig/gw-tb-toolchain:latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Run GHDL testbenches + run: cd hdl/testbench && ./ghdl-ci.sh + - name: Run NVC testbenches + run: cd hdl/testbench && ./nvc-ci.sh diff --git a/hdl/testbench/ghdl-ci.sh b/hdl/testbench/ghdl-ci.sh new file mode 100755 index 00000000..1ca947ab --- /dev/null +++ b/hdl/testbench/ghdl-ci.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +if ls ./*/ghdl/ 1> /dev/null 2>&1; then + for tb in ./*/ghdl/; do + echo "Testbench ${tb}" + cd "$tb" + hdlmake + make clean + make + cd ../../ + done +fi diff --git a/hdl/testbench/nvc-ci.sh b/hdl/testbench/nvc-ci.sh new file mode 100755 index 00000000..60f0782b --- /dev/null +++ b/hdl/testbench/nvc-ci.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +if ls ./*/nvc/ 1> /dev/null 2>&1; then + for tb in ./*/nvc/; do + echo "Testbench ${tb}" + cd "$tb" + hdlmake + make clean + make + cd ../../ + done +fi