aboutsummaryrefslogtreecommitdiffstats
path: root/.github/ci/build_interchange.sh
diff options
context:
space:
mode:
authorAlessandro Comodi <acomodi@antmicro.com>2021-03-25 11:52:39 +0100
committerAlessandro Comodi <acomodi@antmicro.com>2021-03-25 16:24:52 +0100
commitc4cb86efe9dece4a837bdd490f5d7f78d2b4480f (patch)
treea23f37b687bffa78976d39df4c212407e539732c /.github/ci/build_interchange.sh
parent9f28fa4e75e30eb8329e737081a97189b05f013e (diff)
downloadnextpnr-c4cb86efe9dece4a837bdd490f5d7f78d2b4480f.tar.gz
nextpnr-c4cb86efe9dece4a837bdd490f5d7f78d2b4480f.tar.bz2
nextpnr-c4cb86efe9dece4a837bdd490f5d7f78d2b4480f.zip
gh-actions: use ccache and build tools before running tests
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
Diffstat (limited to '.github/ci/build_interchange.sh')
-rwxr-xr-x.github/ci/build_interchange.sh82
1 files changed, 43 insertions, 39 deletions
diff --git a/.github/ci/build_interchange.sh b/.github/ci/build_interchange.sh
index 3cd77ea4..d20dba67 100755
--- a/.github/ci/build_interchange.sh
+++ b/.github/ci/build_interchange.sh
@@ -1,48 +1,52 @@
#!/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
+function build_capnp {
+ 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
+ git clone https://github.com/capnproto/capnproto-java.git
+ pushd capnproto-java
+ make -j`nproc`
+ sudo make install
+ popd
+}
-# Install capnproto java
-git clone https://github.com/capnproto/capnproto-java.git
-pushd capnproto-java
-make -j`nproc`
-sudo make install
-popd
+# Install latest Yosys
+function build_yosys {
+ git clone https://github.com/YosysHQ/yosys.git
+ pushd yosys
+ make -j`nproc`
+ 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.4"
-# 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
+function get_dependencies {
+ # 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
+ ## 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
-make nextpnr-fpga_interchange -j`nproc`
-popd
+function build_nextpnr {
+ build_capnp
+ mkdir build
+ pushd build
+ cmake .. -DARCH=fpga_interchange -DRAPIDWRIGHT_PATH=${RAPIDWRIGHT_PATH} -DINTERCHANGE_SCHEMA_PATH=${INTERCHANGE_SCHEMA_PATH} -DPYTHON_INTERCHANGE_PATH=${PYTHON_INTERCHANGE_PATH}
+ make nextpnr-fpga_interchange -j`nproc`
+ popd
+}