Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
# 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]
jobs:
########
# Docs #
########
docs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
cache: pip
- name: Install Python dependencies
run: pip install -r docs/requirements.txt
- name: Build docs
run: mkdocs build
###########
# Banshee #
###########
Banshee:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
- 1.63.0 # minimum supported version
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt
- name: Install LLVM
run: sudo apt install llvm-12-dev
- working-directory: sw/banshee
run: cargo build
- working-directory: sw/banshee
run: cargo test --all
- working-directory: sw/banshee
run: make test TERM=xterm-256color LOG_FAILED=`mktemp` LOG_TOTAL=`mktemp`
#################
# SW on Banshee #
#################
sw-banshee:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- gcc
- llvm
cmake_args:
- ''
- -DOMPSTATIC_NUMTHREADS=8
name: SW on Banshee
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/setup-python@v2
with:
python-version: '3.9'
cache: pip
- name: Install python packages
run: pip install -r sw/applications/requirements.txt
- name: Install LLVM
run: sudo apt install llvm-12-dev
- working-directory: sw/banshee
run: cargo install --path .
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.8
with:
cmake-version: 3.19.x
- name: Install RISC-V GCC Toolchain
if: ${{ matrix.toolchain == 'gcc' }}
run: |
curl -Ls -o riscv-gcc.tar.gz https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-${RISCV_GCC_VERSION}-x86_64-linux-ubuntu14.tar.gz
sudo mkdir -p /tools/riscv && sudo chmod 777 /tools/riscv
tar -C /tools/riscv -xf riscv-gcc.tar.gz --strip-components=1
cd /tools/riscv/bin && for file in riscv64-*; do ln -s $file $(echo "$file" | sed 's/^riscv64/riscv32/g'); done
echo "PATH=$PATH:/tools/riscv/bin" >> $GITHUB_ENV
env:
RISCV_GCC_VERSION: 8.3.0-2020.04.0
- name: Install RISC-V LLVM Toolchain
if: ${{ matrix.toolchain == 'llvm' }}
run: |
curl -Ls -o riscv-llvm.tar.gz https://github.com/pulp-platform/llvm-project/releases/download/0.12.0/riscv32-pulp-llvm-ubuntu1804-0.12.0.tar.gz
sudo mkdir -p /tools/riscv-llvm && sudo chmod 777 /tools/riscv-llvm
tar -C /tools/riscv-llvm -xf riscv-llvm.tar.gz --strip-components=1
echo "PATH=$PATH:/tools/riscv-llvm/bin" >> $GITHUB_ENV
- name: Build runtime
working-directory: sw/snRuntime
run: mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-${{ matrix.toolchain
}} -DBUILD_TESTS=ON ${{ matrix.cmake_args }} .. && make
- name: Test snRuntime
working-directory: sw/snRuntime/build
run: ctest -L snRuntime
- name: Build snBLAS
working-directory: sw/snBLAS
run: mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-${{ matrix.toolchain
}} -DBUILD_TESTS=ON ${{ matrix.cmake_args }} .. && make
- name: Test snBLAS
working-directory: sw/snBLAS/build
run: ctest -L snBLAS
- name: Build applications
working-directory: sw/applications
run: mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-${{ matrix.toolchain
}} -DBUILD_TESTS=ON ${{ matrix.cmake_args }} .. && make
- name: Test applications
working-directory: sw/applications/build
run: ctest -L snApplications
#############################
# SW on Banshee (Container) #
#############################
snRuntime:
container:
image: ghcr.io/pulp-platform/snitch
runs-on: ubuntu-18.04
strategy:
matrix:
toolchain:
- gcc
- llvm
cmake_args:
- ''
- -DOMPSTATIC_NUMTHREADS=8
name: SW on Banshee (Container)
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0
- name: Get Banshee changed
id: banshee-changes
run: echo "::set-output name=banshee_changed::$(! git diff --name-only --diff-filter=ACMRT
${{ github.event.pull_request.base.sha }} | grep -q ^sw/banshee; echo $?)"
- name: Build banshee
if: ${{ steps.banshee-changes.outputs.banshee_changed == 1 }}
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
export PATH=$HOME/.cargo/bin:${PATH}
cargo install --path sw/banshee
- name: Build runtime
working-directory: sw/snRuntime
run: mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-${{ matrix.toolchain
}} -DBUILD_TESTS=ON .. && make
- name: Test snRuntime
working-directory: sw/snRuntime/build
run: ctest -L snRuntime
- name: Build snBLAS
working-directory: sw/snBLAS
run: mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-${{ matrix.toolchain
}} -DBUILD_TESTS=ON .. && make
- name: Test snBLAS
working-directory: sw/snBLAS/build
run: ctest -L snBLAS
- name: Build applications
working-directory: sw/applications
run: mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-${{ matrix.toolchain
}} -DBUILD_TESTS=ON ${{ matrix.cmake_args }} .. && make
- name: Test applications
working-directory: sw/applications/build
run: ctest -L snApplications
################################
# SW on Default Snitch Cluster #
################################
sw-snitch-cluster-default:
container:
image: ghcr.io/pulp-platform/snitch
name: SW on Default Snitch Cluster Config
runs-on: ubuntu-18.04
strategy:
matrix:
toolchain:
- gcc
- llvm
cmake_args:
- ''
- -DOMPSTATIC_NUMTHREADS=8
steps:
- uses: actions/checkout@v2
- name: Build Hardware
run: |
cd hw/system/snitch_cluster && make bin/snitch_cluster.vlt
- name: Build Software
run: |
cd hw/system/snitch_cluster/sw && mkdir build && cd build && cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-${{ matrix.toolchain }} -DBUILD_TESTS=ON .. && make
- name: Run Unit Tests
run: |
cd hw/system/snitch_cluster/sw/build && make test
e1ffdbb97This file is pinned to the selected release. Download the original to open it in your design tool.