From 45c12eb014692d767cc2e64f27470d0daa96e898 Mon Sep 17 00:00:00 2001 From: Nils Wistoff Date: Fri, 30 Jun 2023 10:43:19 +0200 Subject: [PATCH] Add CI Signed-off-by: Nils Wistoff --- .github/workflows/gitlab-ci.yml | 24 ++++++++++++++++++++++ .gitlab-ci.yml | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/gitlab-ci.yml create mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/gitlab-ci.yml b/.github/workflows/gitlab-ci.yml new file mode 100644 index 0000000..5c863d4 --- /dev/null +++ b/.github/workflows/gitlab-ci.yml @@ -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 + +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 }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..1780190 --- /dev/null +++ b/.gitlab-ci.yml @@ -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 + +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: 20min + 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