mirror of
https://github.com/im-tomu/fomu-workshop.git
synced 2024-09-20 03:10:12 +00:00
Merge pull request #478 from umarcor/ci/allinone
ci: run hdl tests on all-in-one container
This commit is contained in:
commit
c8eb045409
50
.github/hdl-tests.sh
vendored
Executable file
50
.github/hdl-tests.sh
vendored
Executable file
@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
cd $(dirname "$0")/../hdl
|
||||
|
||||
echo '::group::Verilog Blink example'
|
||||
(
|
||||
set -x
|
||||
cd verilog/blink
|
||||
make FOMU_REV=pvt blink.bit
|
||||
[ -f blink.bit ]
|
||||
)
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::Verilog Blink (expanded) example for Hacker board'
|
||||
(
|
||||
set -x
|
||||
cd verilog/blink-expanded
|
||||
make FOMU_REV=hacker blink.bin
|
||||
[ -f blink.bin ]
|
||||
)
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::Verilog Blink (expanded) example for PVT board'
|
||||
(
|
||||
set -x
|
||||
cd verilog/blink-expanded
|
||||
make FOMU_REV=pvt blink.bin
|
||||
[ -f blink.bin ]
|
||||
)
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::VHDL Blink example'
|
||||
(
|
||||
set -x
|
||||
cd vhdl/blink
|
||||
make FOMU_REV=pvt blink.bit
|
||||
[ -f blink.bit ]
|
||||
)
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::Mixed HDL Blink example'
|
||||
(
|
||||
set -x
|
||||
cd mixed/blink
|
||||
make FOMU_REV=pvt blink.bit
|
||||
[ -f blink.bit ]
|
||||
)
|
||||
echo '::endgroup::'
|
47
.github/tests.sh
vendored
47
.github/tests.sh
vendored
@ -8,6 +8,8 @@ echo "TOOLCHAIN_PATH: $TOOLCHAIN_PATH"
|
||||
export PATH=$TOOLCHAIN_PATH/bin:$PATH
|
||||
export GHDL_PREFIX=$TOOLCHAIN_PATH/lib/ghdl
|
||||
|
||||
$(dirname "$0")/hdl-tests.sh
|
||||
|
||||
echo '::group::RISC-V C Example'
|
||||
(
|
||||
set -x
|
||||
@ -26,51 +28,6 @@ echo '::group::RISC-V Zig Example'
|
||||
)
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::Verilog Blink example'
|
||||
(
|
||||
set -x
|
||||
cd hdl/verilog/blink
|
||||
make FOMU_REV=pvt
|
||||
file blink.dfu
|
||||
)
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::Verilog Blink (expanded) example for Hacker board'
|
||||
(
|
||||
set -x
|
||||
cd hdl/verilog/blink-expanded
|
||||
make FOMU_REV=hacker
|
||||
file blink.dfu
|
||||
)
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::Verilog Blink (expanded) example for PVT board'
|
||||
(
|
||||
set -x
|
||||
cd hdl/verilog/blink-expanded
|
||||
make FOMU_REV=pvt
|
||||
file blink.dfu
|
||||
)
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::VHDL Blink example'
|
||||
(
|
||||
set -x
|
||||
cd hdl/vhdl/blink
|
||||
make FOMU_REV=pvt
|
||||
file blink.dfu
|
||||
)
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::Mixed HDL Blink example'
|
||||
(
|
||||
set -x
|
||||
cd hdl/mixed/blink
|
||||
make FOMU_REV=pvt
|
||||
file blink.dfu
|
||||
)
|
||||
echo '::endgroup::'
|
||||
|
||||
echo '::group::LiteX example for Hacker'
|
||||
(
|
||||
set -x
|
||||
|
24
.github/workflows/test.yml
vendored
24
.github/workflows/test.yml
vendored
@ -9,13 +9,18 @@ on:
|
||||
|
||||
jobs:
|
||||
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 3
|
||||
matrix:
|
||||
os: [ ubuntu, windows, macos ]
|
||||
include:
|
||||
- { icon: 🐧, os: ubuntu }
|
||||
- { icon: 🟦, os: windows }
|
||||
- { icon: 🍎, os: macos }
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
name: '${{ matrix.icon}} ${{ matrix.os }}'
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
@ -59,3 +64,20 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
- run: ./.github/tests.sh
|
||||
|
||||
|
||||
all-in-one:
|
||||
name: '🛳️ All-in-one'
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GHDL_PLUGIN_MODULE: ghdl
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: docker://ghcr.io/hdl/debian-buster/impl
|
||||
with:
|
||||
args: ./.github/hdl-tests.sh
|
||||
|
@ -15,6 +15,11 @@ YOSYS ?= yosys
|
||||
NEXTPNR ?= nextpnr-ice40
|
||||
ICEPACK ?= icepack
|
||||
|
||||
# If ghdl-yosys-plugin is built as a module (not the case with fomu-toolchain)
|
||||
ifdef GHDL_PLUGIN_MODULE
|
||||
YOSYSFLAGS += -m $(GHDL_PLUGIN_MODULE)
|
||||
endif
|
||||
|
||||
# Default target: run all required targets to build the DFU image.
|
||||
all: blink.dfu
|
||||
@true
|
||||
|
@ -9,6 +9,11 @@ YOSYS ?= yosys
|
||||
NEXTPNR ?= nextpnr-ice40
|
||||
ICEPACK ?= icepack
|
||||
|
||||
# If ghdl-yosys-plugin is built as a module (not the case with fomu-toolchain)
|
||||
ifdef GHDL_PLUGIN_MODULE
|
||||
YOSYSFLAGS += -m $(GHDL_PLUGIN_MODULE)
|
||||
endif
|
||||
|
||||
# Default target: run all required targets to build the DFU image.
|
||||
all: blink.dfu
|
||||
@true
|
||||
|
Loading…
Reference in New Issue
Block a user