From 272e58b8cf56eb1bea49fabfc88d6dfe972660e5 Mon Sep 17 00:00:00 2001 From: Augusto Fraga Giachero Date: Fri, 20 Sep 2024 14:55:36 -0300 Subject: [PATCH] Configure GitHub Actions, enable CI for testbenches --- .github/workflows/test.yml | 20 ++++++++++++++++++++ hdl/testbench/ghdl-ci.sh | 14 ++++++++++++++ hdl/testbench/nvc-ci.sh | 14 ++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 .github/workflows/test.yml create mode 100755 hdl/testbench/ghdl-ci.sh create mode 100755 hdl/testbench/nvc-ci.sh 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