ci: make examples env

Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
This commit is contained in:
Unai Martinez-Corral 2022-03-01 20:37:47 +01:00
parent c13d6fc6eb
commit 22003c2f49
2 changed files with 28 additions and 7 deletions

2
.github/sftest.json vendored
View File

@ -5,7 +5,7 @@
},
"dependencies": {
"sources": [
"counter.v"
"xc7/counter_test/counter.v"
],
"synth_log": "synth.log",
"pack_log": "pack.log"

View File

@ -17,15 +17,36 @@ jobs:
# with:
# submodules: recursive
- name: Test py4FPGA
- name: Prepare environment
run: |
pip3 install -r f4pga/requirements.txt
sudo apt update -y
sudo apt install -y git wget xz-utils
PYTHONPATH=$(pwd)/f4pga python3 f4pga/sfbuild.py
git clone --recurse-submodules https://github.com/chipsalliance/f4pga-examples
cd f4pga-examples
PYTHONPATH=$(pwd)/f4pga python3 f4pga/sfbuild.py -h
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: |
make env
PYTHONPATH=$(pwd)/f4pga python3 f4pga/sfbuild.py build --flow .github/sftest.json -t bitstream
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