Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Wistoff <[email protected]>
  • Loading branch information
niwis committed Jun 30, 2023
1 parent 97dcb14 commit 7e61044
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/verible-lint-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "verible-lint-matcher",
"pattern": [
{
"regexp": "^(.+):(\\d+):(\\d+):\\s(.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
}
]
}
24 changes: 24 additions & 0 deletions .github/workflows/gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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

# Based on https://github.com/pulp-platform/pulp-actions/tree/main/gitlab-ci#action-usage

# Author: Nils Wistoff <[email protected]>

name: gitlab-ci

on: [ push, pull_request, workflow_dispatch ]

jobs:
gitlab-ci:
runs-on: ubuntu-latest
# Skip on forks or pull requests from forks due to missing secrets.
if: github.repository == 'pulp-platform/axi_riscv_atomics' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
steps:
- name: Check Gitlab CI
uses: pulp-platform/pulp-actions/gitlab-ci@v2
with:
domain: iis-git.ee.ethz.ch
repo: github-mirror/axi_riscv_atomics
token: ${{ secrets.GITLAB_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: lint
on: [ push, pull_request, workflow_dispatch ]

jobs:
################
# Verible Lint #
################
verilog:
name: Verilog Sources
# This job runs on Linux (fixed ubuntu version)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chipsalliance/verible-linter-action@main
with:
paths: |
./src
exclude_paths: |
./src/deprecated
extra_args: "--rules=-interface-name-style --lint_fatal"
github_token: ${{ secrets.GITHUB_TOKEN }}
reviewdog_reporter: github-check
36 changes: 36 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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

# Author: Nils Wistoff <[email protected]>

variables:
VSIM: questa-2022.3 vsim -64
VLIB: questa-2022.3 vlib
VMAP: questa-2022.3 vmap
VCOM: questa-2022.3 vcom -64
VLOG: questa-2022.3 vlog -64
VOPT: questa-2022.3 vopt -64

stages:
- test

.test-tpl:
stage: test
needs:
variables:
TOPLEVEL: ""
timeout: 10min
script:
- bender script vsim -t test > compile.tcl
- $VSIM -c -quiet -do 'source compile.tcl; quit'
- $VSIM -c $TOPLEVEL -do "run -all"
- (! grep -n "Error:" transcript)

tests:
extends: .test-tpl
parallel:
matrix:
- TOPLEVEL:
- axi_riscv_atomics_tb
- axi_riscv_lrsc_tb

0 comments on commit 7e61044

Please sign in to comment.