2022-02-27 09:27:49 -05:00
|
|
|
name: py4FPGA
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2022-02-28 20:52:59 -05:00
|
|
|
|
|
|
|
Test-pip:
|
2022-02-27 09:27:49 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
# with:
|
|
|
|
# submodules: recursive
|
|
|
|
|
2022-03-01 14:37:47 -05:00
|
|
|
- name: Prepare environment
|
2022-02-27 09:27:49 -05:00
|
|
|
run: |
|
2022-03-01 14:37:47 -05:00
|
|
|
sudo apt update -y
|
|
|
|
sudo apt install -y git wget xz-utils
|
2022-02-27 09:27:49 -05:00
|
|
|
|
2022-03-01 14:37:47 -05:00
|
|
|
git clone --recurse-submodules https://github.com/chipsalliance/f4pga-examples
|
|
|
|
cd f4pga-examples
|
2022-02-27 09:27:49 -05:00
|
|
|
|
2022-03-01 14:37:47 -05:00
|
|
|
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O conda_installer.sh
|
|
|
|
|
|
|
|
export INSTALL_DIR=/opt/f4pga
|
|
|
|
|
|
|
|
bash conda_installer.sh -u -b -p $INSTALL_DIR/xc7/conda
|
|
|
|
source "$INSTALL_DIR/xc7/conda/etc/profile.d/conda.sh"
|
|
|
|
conda env create -f xc7/environment.yml
|
|
|
|
|
|
|
|
mkdir -p $INSTALL_DIR/xc7/install
|
|
|
|
wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/535/20220128-000432/symbiflow-arch-defs-install-5fa5e715.tar.xz | tar -xJC $INSTALL_DIR/xc7/install
|
|
|
|
wget -qO- https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/535/20220128-000432/symbiflow-arch-defs-xc7a50t_test-5fa5e715.tar.xz | tar -xJC $INSTALL_DIR/xc7/install
|
2022-02-28 22:07:15 -05:00
|
|
|
|
|
|
|
- name: Test py4FPGA build
|
|
|
|
run: |
|
2022-03-01 14:37:47 -05:00
|
|
|
export INSTALL_DIR=/opt/f4pga
|
|
|
|
export PATH="$INSTALL_DIR/xc7/install/bin:$PATH";
|
|
|
|
source "$INSTALL_DIR/xc7/conda/etc/profile.d/conda.sh"
|
|
|
|
|
|
|
|
conda activate xc7
|
|
|
|
|
2022-02-28 20:52:59 -05:00
|
|
|
cd f4pga
|
|
|
|
pip install --use-feature=in-tree-build .
|
|
|
|
cd ..
|
2022-03-01 14:37:47 -05:00
|
|
|
|
2022-02-28 20:52:59 -05:00
|
|
|
cd f4pga-examples
|
|
|
|
f4pga build --flow ../.github/sftest.json -t bitstream
|
|
|
|
|
|
|
|
- name: Test py4FPGA (PYTHONPATH)
|
|
|
|
run: |
|
|
|
|
PYTHONPATH=$(pwd) python3 f4pga/sfbuild.py
|
|
|
|
PYTHONPATH=$(pwd) python3 f4pga/sfbuild.py -h
|