forked from pulp-platform/carfield
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
524 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "license-checker-matcher", | ||
"pattern": [ | ||
{ | ||
"regexp": "^ERROR: (.+):(\\d+)(.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"message": 3 | ||
} | ||
] | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright lowRISC contributors. | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
{ | ||
// We cover ETH Zurich and lowRISC licenses and Apache 2.0 (mostly for SW) | ||
// and Solderpad for the hardware. | ||
licence: | ||
''' | ||
Copyright (\d{4}(-\d{4})?\s)?(ETH Zurich and University of Bologna|lowRISC contributors). | ||
(Solderpad Hardware License, Version 0.51|Licensed under the Apache License, Version 2.0), see LICENSE for details. | ||
SPDX-License-Identifier: (SHL-0.51|Apache-2.0) | ||
''', | ||
match_regex: 'true', | ||
exclude_paths: [ | ||
# Exclude matchers | ||
.github/*-matcher.json | ||
# Exclude generated headers (no support for optional lines) | ||
sw/include/regs/*.h | ||
], | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
requests | ||
hjson | ||
mako | ||
pyyaml | ||
tabulate | ||
yapf |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright 2022 ETH Zurich and University of Bologna. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Auto-generated configuration registers are waived | ||
waive --rule=typedef-structs-unions --location="hw/regs/*" | ||
waive --rule=line-length --location="hw/regs/*" | ||
waive --rule=no-trailing-spaces --location="hw/regs/*" | ||
waive --rule=parameter-name-style --location="hw/regs/*" | ||
# Package contains long lines | ||
waive --rule=line-length --location="hw/cheshire_pkg.sv" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Copyright 2022 ETH Zurich and University of Bologna. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Author: Paul Scheffler <[email protected]> | ||
|
||
name: build | ||
|
||
on: [ push, pull_request, workflow_dispatch ] | ||
|
||
jobs: | ||
|
||
# TODO: somehow handle reproducible boot ROM builds | ||
# TODO: migrate to and/or replicate on docker | ||
build: | ||
strategy: | ||
matrix: | ||
target: [hw, sw, sim] | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- | ||
name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
cache: pip | ||
- | ||
name: Install Python requirements | ||
run: pip install -r .github/requirements.txt | ||
- | ||
name: Install RISC-V GCC toolchain | ||
run: | | ||
curl -Ls -o riscv-gcc.tar.gz https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.01.31/riscv64-elf-ubuntu-20.04-nightly-2023.01.31-nightly.tar.gz | ||
sudo mkdir -p /tools/riscv && sudo chmod 777 /tools/riscv | ||
tar -C /tools/riscv -xf riscv-gcc.tar.gz --strip-components=1 | ||
rm riscv-gcc.tar.gz | ||
echo "PATH=$PATH:/tools/riscv/bin" >> ${GITHUB_ENV} | ||
- | ||
name: Install Bender | ||
run: | | ||
sudo mkdir -p /tools/bender && sudo chmod 777 /tools/bender | ||
cd /tools/bender && curl --proto '=https' --tlsv1.2 -sSf https://pulp-platform.github.io/bender/init | bash -s -- ${BENDER_VERSION} | ||
echo "PATH=$PATH:/tools/bender" >> ${GITHUB_ENV} | ||
env: | ||
BENDER_VERSION: 0.27.0 | ||
- | ||
name: Build target | ||
run: | | ||
bender checkout | ||
make chs-${{ matrix.target }}-all | ||
- | ||
name: Check whether clean | ||
run: git status && test -z "$(git status --porcelain --ignore-submodules)" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2022 ETH Zurich and University of Bologna. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Author: Alessandro Ottaviano <[email protected]> | ||
|
||
name: gitlab-ci | ||
|
||
on: [ push, pull_request, workflow_dispatch ] | ||
|
||
jobs: | ||
gitlab-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check Gitlab CI | ||
uses: pulp-platform/pulp-actions/gitlab-ci@v1 | ||
with: | ||
domain: iis-git.ee.ethz.ch | ||
repo: github-mirror/carfield | ||
token: ${{ secrets.GITLAB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright 2022 ETH Zurich and University of Bologna. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Author: Paul Scheffler <[email protected]> | ||
|
||
name: lint | ||
|
||
on: [ push, pull_request, workflow_dispatch ] | ||
|
||
jobs: | ||
|
||
lint-license: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
- | ||
name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- | ||
name: Install Python requirements | ||
run: | | ||
cd .github | ||
pip install -r requirements.txt | ||
- | ||
name: Intall license linter | ||
run: | | ||
cd .github | ||
git clone https://github.com/lowRISC/misc-linters.git | ||
- | ||
name: Check license | ||
run: | | ||
echo "::add-matcher::.github/license-checker-matcher.json" | ||
bash -c "set -e; .github/misc-linters/licence-checker/licence-checker.py --config .github/license-checker.hjson" | ||
echo "::remove-matcher owner=license-checker-matcher::" | ||
lint-sv: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
- | ||
name: Run Verible | ||
uses: chipsalliance/verible-linter-action@main | ||
with: | ||
paths: hw | ||
extra_args: "--waiver_files .github/verible.waiver" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
fail_on_error: true | ||
reviewdog_reporter: github-check |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.bender | ||
cheshire | ||
modelsim.ini | ||
scripts/carfield_compile.tcl | ||
tb/hyp_vip | ||
transcript | ||
work/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2022 ETH Zurich and University of Bologna. | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Paul Scheffler <[email protected]> | ||
|
||
# We initialize the nonfree repo, then spawn a sub-pipeline from it | ||
|
||
stages: | ||
- nonfree | ||
|
||
init: | ||
stage: nonfree | ||
script: make nonfree-init | ||
artifacts: | ||
paths: [ nonfree/ci.yml ] | ||
|
||
subpipe: | ||
stage: nonfree | ||
needs: [ init ] | ||
trigger: | ||
include: | ||
- artifact: nonfree/ci.yml | ||
job: init | ||
strategy: depend |
Oops, something went wrong.