Skip to content

Commit

Permalink
ci: Move before_script steps to iis-setup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Mar 21, 2024
1 parent 01a8af4 commit 573cef6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 24 deletions.
25 changes: 1 addition & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,9 @@
variables:
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: recursive
PYTHON: /usr/local/anaconda3-2022.05/bin/python3
BENDER: bender-0.27.1
CLANG_FORMAT: clang-format-10.0.1
CC: gcc-9.2.0
CXX: g++-9.2.0
QUESTA_SEPP: questa-2022.3
LLVM_BINROOT: /usr/pack/riscv-1.0-kgf/pulp-llvm-0.12.0/bin
CLANG: /usr/pack/riscv-1.0-kgf/pulp-llvm-0.12.0/bin/clang
RISCV_GCC_VERSION: 8.3.0-2020.04.0

before_script:
# yamllint disable rule:line-length
- $PYTHON -m venv .venv
- source .venv/bin/activate
- $BENDER update
- pip install -r python-requirements.txt
# Install CVA6 compiler toolchain
- 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
- mkdir -p .tools/riscv && chmod 777 .tools/riscv
- tar -C .tools/riscv -xf riscv-gcc.tar.gz --strip-components=1
- export PATH="$(pwd)/.tools/riscv/bin:$PATH"
# Install verible
- mkdir -p .tools/verible && chmod 777 .tools/verible
- curl -L https://github.com/chipsalliance/verible/releases/download/v0.0-3222-gb19cdf44/verible-v0.0-3222-gb19cdf44-CentOS-7.9.2009-Core-x86_64.tar.gz | tar xz -C .tools/verible --strip-components=1
- export PATH="$(pwd)/.tools/verible/bin:$PATH"
# yamllint enable rule:line-length
source iis-setup.sh

##############
# Build docs #
Expand Down
32 changes: 32 additions & 0 deletions iis-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# Copyright 2024 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

export BENDER=bender-0.27.1
$BENDER checkout

source deps/snitch_cluster/iis-setup.sh

# TODO: uncomment if needed else remove
# export CLANG=/usr/pack/riscv-1.0-kgf/pulp-llvm-0.12.0/bin/clang
export CLANG_FORMAT=clang-format-10.0.1

# Install CVA6 compiler toolchain
RISCV_GCC_VERSION=8.3.0-2020.04.0
mkdir -p tools/riscv
chmod 777 tools/riscv
cd tools/riscv
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
tar -xf riscv-gcc.tar.gz --strip-components=1
export PATH=$(pwd)/bin:$PATH
cd -

# Install verible
mkdir -p tools/verible
chmod 777 tools/verible
cd tools/verible
curl -Ls -o verible.tar.gz https://github.com/chipsalliance/verible/releases/download/v0.0-3222-gb19cdf44/verible-v0.0-3222-gb19cdf44-CentOS-7.9.2009-Core-x86_64.tar.gz
tar -xzf verible.tar.gz --strip-components=1
export PATH=$(pwd)/bin:$PATH
cd -

0 comments on commit 573cef6

Please sign in to comment.