2021-03-16 22:37:42 +08:00
|
|
|
name: FPGA interchange CI tests
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2021-03-25 18:52:39 +08:00
|
|
|
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
|
|
|
|
|
|
|
|
- name: ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1
|
|
|
|
|
2021-03-26 19:01:16 +08:00
|
|
|
- name: Get yosys
|
|
|
|
run: git clone https://github.com/YosysHQ/yosys.git
|
|
|
|
|
|
|
|
- name: Cache yosys installation
|
|
|
|
uses: actions/cache@v2
|
|
|
|
id: cache-yosys
|
|
|
|
with:
|
|
|
|
path: .yosys
|
|
|
|
key: cache-yosys-${{ hashFiles('**/yosys/.git/HEAD') }}
|
|
|
|
|
|
|
|
- name: Build yosys
|
2021-03-25 18:52:39 +08:00
|
|
|
run: |
|
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
|
|
source ./.github/ci/build_interchange.sh
|
|
|
|
build_yosys
|
2021-03-26 19:01:16 +08:00
|
|
|
if: steps.cache-yosys.outputs.cache-hit != 'true'
|
2021-03-25 18:52:39 +08:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2021-03-26 19:01:16 +08:00
|
|
|
- name: Execute build nextpnr
|
2021-03-25 18:52:39 +08:00
|
|
|
run: |
|
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
|
|
source ./.github/ci/build_interchange.sh
|
|
|
|
build_nextpnr
|
|
|
|
|
2021-03-24 18:11:29 +08:00
|
|
|
Run-Tests:
|
2021-03-16 22:37:42 +08:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-25 18:52:39 +08:00
|
|
|
needs: [Build-yosys, Build-nextpnr]
|
2021-03-24 18:11:29 +08:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-03-25 20:51:19 +08:00
|
|
|
device: [xc7a35t, xc7a100t, xc7a200t, xc7z010, LIFCL-17]
|
2021-03-16 22:37:42 +08:00
|
|
|
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
|
|
|
|
|
2021-03-25 18:52:39 +08:00
|
|
|
- name: ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1
|
|
|
|
|
2021-03-26 19:01:16 +08:00
|
|
|
- name: Get yosys
|
|
|
|
run: git clone https://github.com/YosysHQ/yosys.git
|
|
|
|
|
|
|
|
- name: Cache yosys installation
|
|
|
|
uses: actions/cache@v2
|
|
|
|
id: cache-yosys
|
|
|
|
with:
|
|
|
|
path: .yosys
|
|
|
|
key: cache-yosys-${{ hashFiles('**/yosys/.git/HEAD') }}
|
|
|
|
|
|
|
|
- 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'
|
|
|
|
|
2021-03-24 18:11:29 +08:00
|
|
|
- name: Execute build interchange script
|
2021-03-25 18:52:39 +08:00
|
|
|
env:
|
|
|
|
RAPIDWRIGHT_PATH: ${{ github.workspace }}/RapidWright
|
|
|
|
INTERCHANGE_SCHEMA_PATH: ${{ github.workspace }}/3rdparty/fpga-interchange-schema/interchange
|
|
|
|
PYTHON_INTERCHANGE_PATH: ${{ github.workspace }}/python-fpga-interchange
|
2021-03-24 21:17:12 +08:00
|
|
|
PYTHON_INTERCHANGE_TAG: v0.0.6
|
|
|
|
|
2021-03-25 18:52:39 +08:00
|
|
|
run: |
|
|
|
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
|
|
source ./.github/ci/build_interchange.sh
|
2021-03-26 19:01:16 +08:00
|
|
|
build_nextpnr && get_dependencies
|
2021-03-16 22:37:42 +08:00
|
|
|
|
2021-03-17 04:49:06 +08:00
|
|
|
- name: Run tests
|
2021-03-24 18:11:29 +08:00
|
|
|
env:
|
|
|
|
DEVICE: ${{ matrix.device }}
|
2021-03-16 22:37:42 +08:00
|
|
|
run: |
|
2021-03-26 19:01:16 +08:00
|
|
|
export PATH="$GITHUB_WORKSPACE/.yosys/usr/local/bin:$PATH"
|
|
|
|
which yosys
|
2021-03-17 04:49:06 +08:00
|
|
|
cd build
|
2021-03-24 18:11:29 +08:00
|
|
|
make all-$DEVICE-tests -j`nproc`
|