REVERT: Point to Snitch container on occamy
branch
#416
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2023 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: | |
########################## | |
# Build Docker Container # | |
########################## | |
build-docker: | |
name: Deploy Docker image | |
runs-on: ubuntu-22.04 | |
if: > | |
github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != github.repository | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- name: GHCR Log-in | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
cache-from: type=gha | |
cache-to: type=gha,mode=max` | |
file: util/container/Dockerfile | |
push: true | |
tags: ghcr.io/pulp-platform/occamy:${{ github.ref_name }} | |
build-args: |- | |
SNITCH_LLVM_VERSION=latest | |
######## | |
# Docs # | |
######## | |
docs: | |
name: Build documentation | |
runs-on: ubuntu-22.04 | |
needs: build-docker | |
if: > | |
github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != github.repository | |
container: | |
image: ghcr.io/pulp-platform/occamy:${{ github.ref_name }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build docs | |
run: | | |
bender checkout | |
mkdocs build | |
###################### | |
# Clang-Format Check # | |
###################### | |
clangfmt: | |
name: Lint C/C++ Sources | |
runs-on: ubuntu-22.04 | |
needs: build-docker | |
if: > | |
github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != github.repository | |
container: | |
image: ghcr.io/pulp-platform/occamy:${{ github.ref_name }} | |
steps: | |
- name: Check out source repository | |
uses: actions/checkout@v2 | |
# Re-use .clang-format from Snitch cluster | |
- name: Get snitch_cluster dependency | |
run: | | |
bender checkout | |
- name: Lint C sources | |
uses: DoozyX/[email protected] | |
with: | |
clangFormatVersion: 10 | |
####################### | |
# Build SW for Occamy # | |
####################### | |
occamy-sw: | |
name: Build SW for Occamy | |
runs-on: ubuntu-22.04 | |
needs: build-docker | |
if: > | |
github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != github.repository | |
container: | |
image: ghcr.io/pulp-platform/occamy:${{ github.ref_name }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Build Software | |
run: | | |
bender checkout | |
make -C target/sim sw | |
############################### | |
# Generate Occamy RTL sources # | |
############################### | |
occamy-rtl: | |
name: Generate Occamy RTL sources | |
runs-on: ubuntu-22.04 | |
needs: build-docker | |
if: > | |
github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != github.repository | |
container: | |
image: ghcr.io/pulp-platform/occamy:${{ github.ref_name }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Generate single-cluster Occamy RTL sources | |
run: | | |
make -C target/sim CFG_OVERRIDE=cfg/single-cluster.hjson rtl |