aboutsummaryrefslogtreecommitdiffstats
path: root/.github/ci/build_interchange.sh
diff options
context:
space:
mode:
authorAlessandro Comodi <acomodi@antmicro.com>2021-03-16 15:37:42 +0100
committerAlessandro Comodi <acomodi@antmicro.com>2021-03-16 15:39:02 +0100
commitc68dfb09c4993a24d4f2a3f62871937c48c9151a (patch)
tree59e36ba0dbbe5bc138edb30b695dd4e9a72ec81c /.github/ci/build_interchange.sh
parentf63a9a48a489a3e54ee44daf77211eba957a6e4d (diff)
downloadnextpnr-c68dfb09c4993a24d4f2a3f62871937c48c9151a.tar.gz
nextpnr-c68dfb09c4993a24d4f2a3f62871937c48c9151a.tar.bz2
nextpnr-c68dfb09c4993a24d4f2a3f62871937c48c9151a.zip
github-actions: add basic CI to test FPGA interchange
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
Diffstat (limited to '.github/ci/build_interchange.sh')
-rwxr-xr-x.github/ci/build_interchange.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/ci/build_interchange.sh b/.github/ci/build_interchange.sh
new file mode 100755
index 00000000..8ced78df
--- /dev/null
+++ b/.github/ci/build_interchange.sh
@@ -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