Skip to content

Sparse fix

Sparse fix #97

name: Continuous Integration
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout model repo
uses: actions/checkout@v4
- name: Fetch optimiser repo
run: |
BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
URL=https://github.com/AlexMontgomerie/fpgaconvnet-optimiser.git
if [ -z $(git ls-remote --heads $URL $BRANCH) ]; then
echo "Warning! branch $BRANCH does not exist. use dev instead"
BRANCH="dev"
else
echo "checkout branch $BRANCH sucessfully"
fi
git clone --branch $BRANCH $URL fpgaconvnet-optimiser
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
sudo apt-get install protobuf-compiler libprotoc-dev graphviz
python -m pip install --upgrade pip
# for some unknown reason, these packages need special care
python -m pip install wheel
python -m pip install nvidia-pyindex
python -m pip install onnx-graphsurgeon
python -m pip install .
python -m pip install ./fpgaconvnet-optimiser
- name: Run Model Unit Tests
run: |
python -m unittest discover ./tests
- name: Run Optimisation Tests
run: |
cd fpgaconvnet-optimiser
bash tests/run_models.sh
cd ..