github-actions: add basic CI to test FPGA interchange
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
This commit is contained in:
parent
f63a9a48a4
commit
c68dfb09c4
47
.github/ci/build_interchange.sh
vendored
Executable file
47
.github/ci/build_interchange.sh
vendored
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install capnproto libraries
|
||||
curl -O https://capnproto.org/capnproto-c++-0.7.0.tar.gz
|
||||
tar zxf capnproto-c++-0.7.0.tar.gz
|
||||
pushd capnproto-c++-0.7.0
|
||||
./configure
|
||||
make -j`nproc` check
|
||||
sudo make install
|
||||
popd
|
||||
|
||||
# Install latest Yosys
|
||||
git clone https://github.com/YosysHQ/yosys.git
|
||||
pushd yosys
|
||||
make -j`nproc`
|
||||
sudo make install
|
||||
popd
|
||||
|
||||
# Install capnproto java
|
||||
git clone https://github.com/capnproto/capnproto-java.git
|
||||
pushd capnproto-java
|
||||
make
|
||||
sudo make install
|
||||
popd
|
||||
|
||||
RAPIDWRIGHT_PATH="`pwd`/RapidWright"
|
||||
INTERCHANGE_SCHEMA_PATH="`pwd`/3rdparty/fpga-interchange-schema/interchange"
|
||||
PYTHON_INTERCHANGE_PATH="`pwd`/python-fpga-interchange"
|
||||
|
||||
# Install python-fpga-interchange libraries
|
||||
git clone https://github.com/SymbiFlow/python-fpga-interchange.git $PYTHON_INTERCHANGE_PATH
|
||||
pushd $PYTHON_INTERCHANGE_PATH
|
||||
git submodule update --init --recursive
|
||||
python3 -m pip install -r requirements.txt
|
||||
popd
|
||||
|
||||
# Install RapidWright
|
||||
git clone https://github.com/Xilinx/RapidWright.git $RAPIDWRIGHT_PATH
|
||||
pushd $RAPIDWRIGHT_PATH
|
||||
make update_jars
|
||||
popd
|
||||
|
||||
|
||||
mkdir build
|
||||
pushd build
|
||||
cmake .. -DARCH=fpga_interchange -DRAPIDWRIGHT_PATH=$RAPIDWRIGHT_PATH -DINTERCHANGE_SCHEMA_PATH=$INTERCHANGE_SCHEMA_PATH -DPYTHON_INTERCHANGE_PATH=$PYTHON_INTERCHANGE_PATH
|
||||
popd
|
27
.github/workflows/interchange_ci.yml
vendored
Normal file
27
.github/workflows/interchange_ci.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: FPGA interchange CI tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
|
||||
Run-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install git make cmake libboost-all-dev python3-dev libeigen3-dev tcl-dev clang bison flex swig
|
||||
|
||||
- name: Execute build script
|
||||
run: stdbuf -i0 -o0 -e0 ./.github/ci/build_interchange.sh
|
||||
|
||||
- name: Execute test script
|
||||
run: |
|
||||
cd build && make all-fpga_interchange-tests -j`nproc`
|
Loading…
Reference in New Issue
Block a user