f4pga/.github/workflows/pyF4PGA.yml
Unai Martinez-Corral 22003c2f49 ci: make examples env
Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
2022-04-26 12:16:37 +02:00

52 lines
1.7 KiB
YAML

name: py4FPGA
on:
push:
pull_request:
jobs:
Run-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
# with:
# submodules: recursive
- name: Prepare environment
run: |
sudo apt update -y
sudo apt install -y git wget xz-utils
git clone --recurse-submodules https://github.com/chipsalliance/f4pga-examples
cd f4pga-examples
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
- name: Test py4FPGA build
run: |
cd f4pga-examples
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
pip install -r ../f4pga/requirements.txt
PYTHONPATH=$(pwd)/../f4pga python3 ../f4pga/sfbuild.py build --flow ../.github/sftest.json -t bitstream