Skip to content

treewide: Improve docker container build, CI caching and python dependencies #2406

treewide: Improve docker container build, CI caching and python dependencies

treewide: Improve docker container build, CI caching and python dependencies #2406

Workflow file for this run

# Copyright 2020 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
# Run functional regression checks
name: ci
on:
push:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
########
# Docs #
########
docs:
name: Build documentation
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
container:
image: ghcr.io/pulp-platform/snitch_cluster:pyproject
steps:
- uses: actions/checkout@v2
- name: Build docs
run: make docs
#####################
# Python unit tests #
#####################
pytest:
name: Python unit tests
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
container:
image: ghcr.io/pulp-platform/snitch_cluster:pyproject
steps:
- uses: actions/checkout@v2
- name: Run pytest
run: pytest
##############################################
# Simulate SW on Snitch Cluster w/ Verilator #
##############################################
sw-snitch-cluster-vlt:
name: Simulate SW on Snitch Cluster w/ Verilator
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
container:
image: ghcr.io/pulp-platform/snitch_cluster:pyproject
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install local Python packages
run: pip install .
- name: Build Software
working-directory: target/snitch_cluster
run: |
bender vendor init
make CFG_OVERRIDE=cfg/github-ci.hjson sw
- name: Build Hardware
working-directory: target/snitch_cluster
run: |
make CFG_OVERRIDE=cfg/github-ci.hjson VLT_JOBS=1 bin/snitch_cluster.vlt
- name: Run Tests
working-directory: target/snitch_cluster
run: |
./util/run.py sw/run.yaml --simulator verilator -j
./util/run.py sw/fdiv.yaml --simulator verilator -j
- name: Annotate traces
working-directory: target/snitch_cluster
run: |
make SIM_DIR=./runs/simple annotate -j
#########################################
# Build SW on Snitch Cluster w/ Banshee #
#########################################
sw-snitch-cluster-banshee:
name: Simulate SW on Snitch Cluster w/ Banshee
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
container:
image: ghcr.io/pulp-platform/snitch_cluster:pyproject
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install local Python packages
run: pip install .
- name: Build Software
run: |
bender vendor init
make -C target/snitch_cluster SELECT_RUNTIME=banshee sw
- name: Run Tests
env:
SNITCH_LOG: info
working-directory: target/snitch_cluster
run: |
./util/run.py sw/run.yaml --simulator banshee -j