aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-03-17 14:05:49 +0000
committerGitHub <noreply@github.com>2021-03-17 14:05:49 +0000
commit5feea4497f416eafdf54f34c2b9c67ddcef3f26f (patch)
treee92427a879159b38441e6b3fc4f0e45ebc75e579 /.github
parent701587241fb8d4b490c4998ab3f2590bc09d7f55 (diff)
parent01a95faf211d5947415ed6a9ea2b1fbedf1074cd (diff)
downloadnextpnr-5feea4497f416eafdf54f34c2b9c67ddcef3f26f.tar.gz
nextpnr-5feea4497f416eafdf54f34c2b9c67ddcef3f26f.tar.bz2
nextpnr-5feea4497f416eafdf54f34c2b9c67ddcef3f26f.zip
Merge pull request #619 from acomodi/add-cmake-infra-fpga-interchange
Add CMake infrastructure for fpga interchange
Diffstat (limited to '.github')
-rwxr-xr-x.github/ci/build_interchange.sh48
-rw-r--r--.github/workflows/interchange_ci.yml29
2 files changed, 77 insertions, 0 deletions
diff --git a/.github/ci/build_interchange.sh b/.github/ci/build_interchange.sh
new file mode 100755
index 00000000..12de22df
--- /dev/null
+++ b/.github/ci/build_interchange.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# Install capnproto libraries
+curl -O https://capnproto.org/capnproto-c++-0.8.0.tar.gz
+tar zxf capnproto-c++-0.8.0.tar.gz
+pushd capnproto-c++-0.8.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"
+PYTHON_INTERCHANGE_TAG="v0.0.1"
+
+# Install python-fpga-interchange libraries
+git clone -b $PYTHON_INTERCHANGE_TAG 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
diff --git a/.github/workflows/interchange_ci.yml b/.github/workflows/interchange_ci.yml
new file mode 100644
index 00000000..1ca42bb7
--- /dev/null
+++ b/.github/workflows/interchange_ci.yml
@@ -0,0 +1,29 @@
+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: Run tests
+ run: |
+ cd build
+ make all-fpga_interchange-archcheck-tests -j`nproc`
+ make all-fpga_interchange-tests -j`nproc`