mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-02-15 04:16:41 +00:00
64
.github/ci/build_interchange.sh
vendored
64
.github/ci/build_interchange.sh
vendored
@@ -1,64 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install capnproto libraries
|
||||
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
|
||||
|
||||
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 {
|
||||
DESTDIR=`pwd`/.yosys
|
||||
pushd yosys
|
||||
make -j`nproc`
|
||||
sudo make install DESTDIR=$DESTDIR
|
||||
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
|
||||
|
||||
if [ ${DEVICE} == "LIFCL-17" ] || [ ${DEVICE} == "LIFCL-40" ]; then
|
||||
# Install prjoxide
|
||||
curl --proto '=https' -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
git clone --recursive https://github.com/gatecat/prjoxide.git
|
||||
pushd prjoxide/libprjoxide
|
||||
# TODO: use a tag instead of a commit, like python-fpga-interchange
|
||||
git reset --hard ${PRJOXIDE_REVISION}
|
||||
PATH=$PATH:$HOME/.cargo/bin cargo install --path prjoxide --all-features
|
||||
popd
|
||||
else
|
||||
# Install RapidWright
|
||||
git clone https://github.com/Xilinx/RapidWright.git ${RAPIDWRIGHT_PATH}
|
||||
pushd ${RAPIDWRIGHT_PATH}
|
||||
./gradlew updateJars --no-watch-fs
|
||||
make compile
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
||||
function build_nextpnr {
|
||||
build_capnp
|
||||
mkdir build
|
||||
pushd build
|
||||
cmake .. -DARCH=fpga_interchange -DRAPIDWRIGHT_PATH=${RAPIDWRIGHT_PATH} -DPYTHON_INTERCHANGE_PATH=${PYTHON_INTERCHANGE_PATH} -DWERROR=on
|
||||
make nextpnr-fpga_interchange -j`nproc`
|
||||
popd
|
||||
}
|
||||
132
.github/workflows/interchange_ci.yml.disable
vendored
132
.github/workflows/interchange_ci.yml.disable
vendored
@@ -1,132 +0,0 @@
|
||||
name: FPGA interchange CI tests
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
Build-yosys:
|
||||
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 locales libtinfo-dev
|
||||
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1
|
||||
|
||||
- name: Get yosys
|
||||
run: |
|
||||
git clone https://github.com/YosysHQ/yosys.git
|
||||
cd yosys
|
||||
echo "YOSYS_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache yosys installation
|
||||
uses: actions/cache@v2
|
||||
id: cache-yosys
|
||||
with:
|
||||
path: .yosys
|
||||
key: cache-yosys-${{ env.YOSYS_SHA }}
|
||||
|
||||
- name: Build yosys
|
||||
run: |
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
source ./.github/ci/build_interchange.sh
|
||||
build_yosys
|
||||
if: steps.cache-yosys.outputs.cache-hit != 'true'
|
||||
|
||||
Build-nextpnr:
|
||||
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: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1
|
||||
|
||||
- name: Execute build nextpnr
|
||||
run: |
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
source ./.github/ci/build_interchange.sh
|
||||
build_nextpnr
|
||||
|
||||
Run-Tests:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [Build-yosys, Build-nextpnr]
|
||||
strategy:
|
||||
# Don't terminate jobs when one fails. This is important when
|
||||
# debugging CI failures.
|
||||
fail-fast: false
|
||||
matrix:
|
||||
device: [xc7a35t, xc7a100t, xc7a200t, xc7z010, LIFCL-17, LIFCL-40]
|
||||
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: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1
|
||||
|
||||
- name: Get yosys
|
||||
run: |
|
||||
git clone https://github.com/YosysHQ/yosys.git
|
||||
cd yosys
|
||||
echo "YOSYS_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache yosys installation
|
||||
uses: actions/cache@v2
|
||||
id: cache-yosys
|
||||
with:
|
||||
path: .yosys
|
||||
key: cache-yosys-${{ env.YOSYS_SHA }}
|
||||
|
||||
- name: Build yosys
|
||||
run: |
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
source ./.github/ci/build_interchange.sh
|
||||
build_yosys
|
||||
if: steps.cache-yosys.outputs.cache-hit != 'true'
|
||||
|
||||
- name: Execute build interchange script
|
||||
env:
|
||||
RAPIDWRIGHT_PATH: ${{ github.workspace }}/RapidWright
|
||||
PYTHON_INTERCHANGE_PATH: ${{ github.workspace }}/python-fpga-interchange
|
||||
PYTHON_INTERCHANGE_TAG: v0.0.20
|
||||
PRJOXIDE_REVISION: 318331f8b30c2e2a31cc41d51f104b671e180a8a
|
||||
DEVICE: ${{ matrix.device }}
|
||||
run: |
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
source ./.github/ci/build_interchange.sh
|
||||
build_nextpnr && get_dependencies
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
DEVICE: ${{ matrix.device }}
|
||||
run: |
|
||||
export PATH="$GITHUB_WORKSPACE/.yosys/usr/local/bin:$PATH"
|
||||
which yosys
|
||||
cd build
|
||||
make all-$DEVICE-tests -j`nproc`
|
||||
Reference in New Issue
Block a user