2024-05-22 14:05:29 +02:00
|
|
|
void checkout_project(String repoUrl, String branch = 'develop') {
|
|
|
|
checkout([
|
|
|
|
$class: 'GitSCM',
|
|
|
|
branches: [
|
|
|
|
[name: "*/${branch}"]
|
|
|
|
],
|
|
|
|
extensions: [
|
|
|
|
[$class: 'CleanBeforeCheckout'],
|
2024-07-11 11:23:17 +02:00
|
|
|
[$class: 'SubmoduleOption', disableSubmodules: false, parentCredentials: true, recursiveSubmodules: true, reference: '', trackingSubmodules: false, shallow: true]
|
2024-05-22 14:05:29 +02:00
|
|
|
],
|
|
|
|
submoduleCfg: [],
|
|
|
|
userRemoteConfigs: [
|
|
|
|
[credentialsId: 'gitea-jenkins', url: repoUrl]
|
|
|
|
]
|
|
|
|
])
|
|
|
|
}
|
|
|
|
|
|
|
|
pipeline {
|
2024-07-11 10:19:56 +02:00
|
|
|
agent any
|
2024-05-22 14:05:29 +02:00
|
|
|
stages {
|
2024-07-11 10:24:49 +02:00
|
|
|
stage("Checkout and build"){
|
|
|
|
agent {docker { image 'ubuntu-riscv' }}
|
|
|
|
stages{
|
|
|
|
stage("Checkout TGC-Compliance and TGC-GEN"){
|
|
|
|
steps {
|
2024-07-11 11:26:54 +02:00
|
|
|
sh 'rm -rf * .??* '
|
2024-07-11 11:23:17 +02:00
|
|
|
checkout_project("https://git.minres.com/TGFS/TGC-ISS.git", "develop")
|
2024-07-11 10:24:49 +02:00
|
|
|
dir("TGC-COMPLIANCE"){
|
|
|
|
checkout_project("https://git.minres.com/TGFS/TGC-COMPLIANCE.git", "master")
|
|
|
|
}
|
|
|
|
dir("TGC-GEN"){
|
|
|
|
checkout_project("https://git.minres.com/TGFS/TGC-GEN.git", "develop")
|
|
|
|
}
|
|
|
|
}
|
2024-07-11 09:41:06 +02:00
|
|
|
}
|
2024-07-11 10:24:49 +02:00
|
|
|
stage("Generate cores and build TGC-ISS"){
|
|
|
|
steps {
|
2024-07-11 10:55:27 +02:00
|
|
|
sh '''
|
2024-07-18 14:32:59 +02:00
|
|
|
for core in TGC5A TGC5B TGC5D TGC5E; do
|
2024-07-11 10:53:59 +02:00
|
|
|
for backend in interp llvm tcc asmjit; do
|
|
|
|
TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc
|
|
|
|
done
|
2024-07-11 10:55:27 +02:00
|
|
|
done
|
2024-07-11 12:41:14 +02:00
|
|
|
for core in TGC6B TGC6C TGC6D TGC6E; do
|
|
|
|
for backend in interp llvm asmjit; do
|
|
|
|
TGC-GEN/scripts/generate_iss.sh -o dbt-rise-tgc/ -c $core -b ${backend} TGC-GEN/CoreDSL/${core}.core_desc
|
|
|
|
done
|
|
|
|
done
|
2024-07-11 10:55:27 +02:00
|
|
|
'''
|
2024-07-11 10:24:49 +02:00
|
|
|
sh 'conan profile new default --detect --force'
|
|
|
|
sh 'cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWITH_ASMJIT=ON -DWITH_TCC=ON -DWITH_LLVM=ON'
|
|
|
|
sh 'cmake --build build -j'
|
|
|
|
}
|
2024-07-11 09:41:06 +02:00
|
|
|
}
|
2024-05-22 17:47:31 +02:00
|
|
|
}
|
|
|
|
}
|
2024-07-11 10:19:56 +02:00
|
|
|
stage("Run test suite") {
|
2024-07-11 10:14:46 +02:00
|
|
|
agent {
|
|
|
|
docker {
|
2024-07-11 10:53:59 +02:00
|
|
|
image 'git.minres.com/tooling/riscof_sail:latest'
|
|
|
|
args ' -e CONAN_USER_HOME=/var/jenkins_home/workspace/riscof_sail'
|
2024-07-11 10:14:46 +02:00
|
|
|
}
|
2024-07-11 09:41:06 +02:00
|
|
|
}
|
2024-07-11 10:14:46 +02:00
|
|
|
stages {
|
|
|
|
stage('ACT 32bit') {
|
|
|
|
matrix {
|
|
|
|
axes {
|
|
|
|
axis {
|
|
|
|
name 'CORE'
|
2024-07-18 14:32:59 +02:00
|
|
|
values 'TGC5A', 'TGC5B','TGC5C', 'TGC5D', 'TGC5E'
|
2024-07-11 10:14:46 +02:00
|
|
|
}
|
|
|
|
axis {
|
|
|
|
name 'BACKEND'
|
|
|
|
values 'interp', 'llvm', 'tcc', 'asmjit'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Run riscof') {
|
|
|
|
steps {
|
2024-07-11 12:59:43 +02:00
|
|
|
sh "mkdir -p ${BACKEND}"
|
2024-07-11 10:14:46 +02:00
|
|
|
sh "python3 TGC-COMPLIANCE/run_act.py -core ${CORE} -sim build/dbt-rise-tgc/tgc-sim -w ${BACKEND} --local --backend ${BACKEND}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-22 17:47:31 +02:00
|
|
|
}
|
|
|
|
}
|
2024-07-11 10:14:46 +02:00
|
|
|
stage('ACT 64bit') {
|
|
|
|
matrix {
|
|
|
|
axes {
|
|
|
|
axis {
|
|
|
|
name 'CORE'
|
|
|
|
values 'TGC6B', 'TGC6C', 'TGC6D', 'TGC6E'
|
|
|
|
}
|
|
|
|
axis {
|
|
|
|
name 'BACKEND'
|
|
|
|
values 'interp', 'llvm', 'asmjit'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Run riscof') {
|
|
|
|
steps {
|
2024-07-11 12:59:43 +02:00
|
|
|
sh "mkdir -p ${BACKEND}"
|
2024-07-11 10:14:46 +02:00
|
|
|
sh "python3 TGC-COMPLIANCE/run_act.py -core ${CORE} -sim build/dbt-rise-tgc/tgc-sim -w ${BACKEND} --local --backend ${BACKEND}"
|
|
|
|
}
|
|
|
|
}
|
2024-07-11 09:41:06 +02:00
|
|
|
}
|
2024-05-22 15:35:02 +02:00
|
|
|
}
|
2024-05-22 15:33:40 +02:00
|
|
|
}
|
|
|
|
}
|
2024-07-11 09:41:06 +02:00
|
|
|
}
|
2024-05-22 14:05:29 +02:00
|
|
|
}
|
|
|
|
}
|