From 7ad946b20ded7d56cd94438bbffe48d175e5a295 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Sun, 19 May 2024 18:54:46 +0500 Subject: [PATCH 01/32] Added Makefile and cross file for build --- Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ riscv64-cross.txt | 11 +++++++++++ 2 files changed, 51 insertions(+) create mode 100644 Makefile create mode 100644 riscv64-cross.txt diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..544067091 --- /dev/null +++ b/Makefile @@ -0,0 +1,40 @@ +# Makefile + +# Define the directory to search for executables +DIR := build/test + +# Define a shell command to find all executable files, excluding C/C++ files and directories +EXEC_FILES := $(shell find $(DIR) -type f -executable ! -name '*.c' ! -name '*.cpp' ! -name '*.h') + +# Log file +LOG_FILE := test.mak.log + +# Default target +all: run + +# Target to run all executable files and log the output +run: + @echo "Running executables in $(DIR)..." > $(LOG_FILE) + @count=0; \ + @pass_count=0; \ + @fail_count=0; \ + for file in $(EXEC_FILES); do \ + echo "Executing $$file" | tee -a $(LOG_FILE); \ + $$file >> $(LOG_FILE) 2>&1; \ + case "$$?" in \ + 0) echo "PASSED" | tee -a $(LOG_FILE); \ + pass_count=$$((pass_count + 1)) ;; \ + *) echo "FAILED" | tee -a $(LOG_FILE); \ + fail_count=$$((fail_count + 1)) ;; \ + esac; \ + echo ""; \ + echo "" >> $(LOG_FILE); \ + count=$$((count + 1)); \ + done; \ + echo "Total executables run: $$count" | tee -a $(LOG_FILE); \ + echo "Total passed: $$pass_count" | tee -a $(LOG_FILE); \ + echo "Total failed: $$fail_count" | tee -a $(LOG_FILE) + +# Clean target (example, not strictly necessary for this task) +clean: + @echo "Nothing to clean" \ No newline at end of file diff --git a/riscv64-cross.txt b/riscv64-cross.txt new file mode 100644 index 000000000..210feebe8 --- /dev/null +++ b/riscv64-cross.txt @@ -0,0 +1,11 @@ +[binaries] +c = 'riscv64-unknown-linux-gnu-gcc' +cpp = 'riscv64-unknown-linux-gnu-g++' +ar = 'riscv64-unknown-linux-gnu-ar' +strip = 'riscv64-unknown-linux-gnu-strip' + +[host_machine] +system = 'linux' +cpu_family = 'riscv64' +cpu = 'riscv64' +endian = 'little' \ No newline at end of file From 486353c730099cb7745aef88028445e6a5c9f758 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 20 May 2024 14:28:38 +0500 Subject: [PATCH 02/32] Modified Makefile --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 544067091..db77f58b7 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ run: echo "Total executables run: $$count" | tee -a $(LOG_FILE); \ echo "Total passed: $$pass_count" | tee -a $(LOG_FILE); \ echo "Total failed: $$fail_count" | tee -a $(LOG_FILE) + echo "Complete log is saved in test.mak.log" # Clean target (example, not strictly necessary for this task) clean: From e46ed6a2d07eb8027fff34ba39a55d8ac96becad Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 20 May 2024 15:39:09 +0500 Subject: [PATCH 03/32] Added cloud-v-pipeline file --- cloud-v-pipeline | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 cloud-v-pipeline diff --git a/cloud-v-pipeline b/cloud-v-pipeline new file mode 100644 index 000000000..88a2f9b39 --- /dev/null +++ b/cloud-v-pipeline @@ -0,0 +1,45 @@ +node('J-TESTVM-1') { + stage('Clone') { + checkout scm + } + stage('Run system_info') { + sh '''#!/bin/bash + cat /proc/cpuinfo + ''' + } + stage('Run meson clean') { + sh '''#!/bin/bash -l + module load riscv64-gnu-glibc/12042024 + meson setup --cross-file riscv64-cross.txt build --wipe + ''' + } + stage('Run configure') { + sh '''#!/bin/bash -l + module load riscv64-gnu-glibc/12042024 + meson setup build --cross-file=riscv64-cross.txt -Db_lundef=false + ''' + } + stage('Run cross compile') { + sh '''#!/bin/bash -l + module load riscv64-gnu-glibc/12042024 + meson compile -C build -v + echo "source $(pwd)" > testvm_pwd.sh + ''' + stash includes: 'testvm_pwd.sh', name: 'testvm_pwd.sh' + } +} +node('J-K230-1') { + stage('Get Cross-compiled binaries') { + unstash + withCredentials([sshUserPrivateKey(credentialsId: 'TESTVM_SSH_CREDENTIALS', keyFileVariable: 'SSH_KEY')]) { + sh '''#!/bin/bash + ssh -i $SSH_KEY jenkins_user@machine.cloud-v.co -p 30013 "cd $SIMDE_PATH && tar cvf - ." | tar xvf - -C ./ + ''' + } + } + stage('Run test') { + sh'''#!/bin/bash + make + ''' + } +} From 26177aec58e0eeccbc09374748aee12f42d73050 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 20 May 2024 15:50:44 +0500 Subject: [PATCH 04/32] Changed the cloning process --- cloud-v-pipeline | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index 88a2f9b39..9e162903a 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -1,6 +1,8 @@ node('J-TESTVM-1') { stage('Clone') { - checkout scm + sh '''#!/bin/bash -l + git clone https://github.com/alitariq4589/simde-cloud-v.git + ''' } stage('Run system_info') { sh '''#!/bin/bash From d8e7efe1db10f5fa308987b383b2d0a8ad47108e Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 20 May 2024 15:58:37 +0500 Subject: [PATCH 05/32] Changed cloning command --- cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index 9e162903a..8ad03f2b5 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -1,7 +1,7 @@ node('J-TESTVM-1') { stage('Clone') { sh '''#!/bin/bash -l - git clone https://github.com/alitariq4589/simde-cloud-v.git + git clone https://github.com/alitariq4589/simde-cloud-v.git . ''' } stage('Run system_info') { From 330d9d467cabcda28fbaab0c0ca86eb836e76374 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 20 May 2024 16:00:18 +0500 Subject: [PATCH 06/32] Changed cloning command --- cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index 8ad03f2b5..0d6bab7be 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -1,6 +1,6 @@ node('J-TESTVM-1') { stage('Clone') { - sh '''#!/bin/bash -l + sh '''#!/bin/bash -v git clone https://github.com/alitariq4589/simde-cloud-v.git . ''' } From 729f21160c239b59aed55615aba0e8a87cee0f26 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 20 May 2024 16:06:19 +0500 Subject: [PATCH 07/32] Added cleanup stage --- cloud-v-pipeline | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index 0d6bab7be..c6cb7cfe1 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -1,4 +1,7 @@ node('J-TESTVM-1') { + stage('Clean Workspace'){ + cleanWs() + } stage('Clone') { sh '''#!/bin/bash -v git clone https://github.com/alitariq4589/simde-cloud-v.git . From d6c37810188c7dcb75844872615e02a7ac8aaa5b Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 20 May 2024 16:46:27 +0500 Subject: [PATCH 08/32] Removed clean stage --- cloud-v-pipeline | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index c6cb7cfe1..dd7bea52c 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -12,12 +12,6 @@ node('J-TESTVM-1') { cat /proc/cpuinfo ''' } - stage('Run meson clean') { - sh '''#!/bin/bash -l - module load riscv64-gnu-glibc/12042024 - meson setup --cross-file riscv64-cross.txt build --wipe - ''' - } stage('Run configure') { sh '''#!/bin/bash -l module load riscv64-gnu-glibc/12042024 From 870f91c76c8c480927c9e4e87ac9b722253886b2 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 20 May 2024 16:50:45 +0500 Subject: [PATCH 09/32] modified clone stage --- cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index dd7bea52c..6fbc0a9b3 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -4,7 +4,7 @@ node('J-TESTVM-1') { } stage('Clone') { sh '''#!/bin/bash -v - git clone https://github.com/alitariq4589/simde-cloud-v.git . + git clone -b rvv1.0-integration https://github.com/alitariq4589/simde-cloud-v.git . ''' } stage('Run system_info') { From a21ffaae0b3abad6902d5854831dab8644759957 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 20 May 2024 17:20:56 +0500 Subject: [PATCH 10/32] Corrected pipeline file --- cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index 6fbc0a9b3..09fbf702f 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -29,7 +29,7 @@ node('J-TESTVM-1') { } node('J-K230-1') { stage('Get Cross-compiled binaries') { - unstash + unstash 'testvm_pwd.sh' withCredentials([sshUserPrivateKey(credentialsId: 'TESTVM_SSH_CREDENTIALS', keyFileVariable: 'SSH_KEY')]) { sh '''#!/bin/bash ssh -i $SSH_KEY jenkins_user@machine.cloud-v.co -p 30013 "cd $SIMDE_PATH && tar cvf - ." | tar xvf - -C ./ From 24c7d77715da64f0aa0700ce48d0b9afe1d29101 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 20 May 2024 19:57:22 +0500 Subject: [PATCH 11/32] Added clean up step on k230 --- cloud-v-pipeline | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index 09fbf702f..3831eed9a 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -28,6 +28,9 @@ node('J-TESTVM-1') { } } node('J-K230-1') { + stage('Clean Workspace'){ + cleanWs() + } stage('Get Cross-compiled binaries') { unstash 'testvm_pwd.sh' withCredentials([sshUserPrivateKey(credentialsId: 'TESTVM_SSH_CREDENTIALS', keyFileVariable: 'SSH_KEY')]) { From e67062a74b3130b53f6c9f39b61f80f36311fc06 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 20 May 2024 21:49:48 +0500 Subject: [PATCH 12/32] changed compress command --- cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index 3831eed9a..be79a52e4 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -35,7 +35,7 @@ node('J-K230-1') { unstash 'testvm_pwd.sh' withCredentials([sshUserPrivateKey(credentialsId: 'TESTVM_SSH_CREDENTIALS', keyFileVariable: 'SSH_KEY')]) { sh '''#!/bin/bash - ssh -i $SSH_KEY jenkins_user@machine.cloud-v.co -p 30013 "cd $SIMDE_PATH && tar cvf - ." | tar xvf - -C ./ + ssh -i $SSH_KEY jenkins_user@machine.cloud-v.co -p 30013 "cd $SIMDE_PATH && tar cvf - ./*" | tar xvf - -C ./ ''' } } From 71f2fdda2d76b74c3662c205c1cbf0c6840f135d Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Tue, 21 May 2024 12:18:51 +0500 Subject: [PATCH 13/32] Added source file --- cloud-v-pipeline | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index be79a52e4..c228736fe 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -35,6 +35,8 @@ node('J-K230-1') { unstash 'testvm_pwd.sh' withCredentials([sshUserPrivateKey(credentialsId: 'TESTVM_SSH_CREDENTIALS', keyFileVariable: 'SSH_KEY')]) { sh '''#!/bin/bash + source testvm_pwd.sh + echo "$SIMDE_PATH" ssh -i $SSH_KEY jenkins_user@machine.cloud-v.co -p 30013 "cd $SIMDE_PATH && tar cvf - ./*" | tar xvf - -C ./ ''' } From fd5e46e9a138c3723be14f295c7bf5253f37fcb1 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Tue, 21 May 2024 14:56:04 +0500 Subject: [PATCH 14/32] Changed the stashed file content --- cloud-v-pipeline | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index c228736fe..e263ec1e0 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -1,5 +1,5 @@ node('J-TESTVM-1') { - stage('Clean Workspace'){ + stage('Clean Workspace') { cleanWs() } stage('Clone') { @@ -22,20 +22,20 @@ node('J-TESTVM-1') { sh '''#!/bin/bash -l module load riscv64-gnu-glibc/12042024 meson compile -C build -v - echo "source $(pwd)" > testvm_pwd.sh + echo "export SIMDE_PATH=$(pwd)" > testvm_pwd.sh ''' stash includes: 'testvm_pwd.sh', name: 'testvm_pwd.sh' } } node('J-K230-1') { - stage('Clean Workspace'){ + stage('Clean Workspace') { cleanWs() } stage('Get Cross-compiled binaries') { unstash 'testvm_pwd.sh' withCredentials([sshUserPrivateKey(credentialsId: 'TESTVM_SSH_CREDENTIALS', keyFileVariable: 'SSH_KEY')]) { - sh '''#!/bin/bash - source testvm_pwd.sh + sh '''#!/bin/bash -v + bash testvm_pwd.sh echo "$SIMDE_PATH" ssh -i $SSH_KEY jenkins_user@machine.cloud-v.co -p 30013 "cd $SIMDE_PATH && tar cvf - ./*" | tar xvf - -C ./ ''' From 675add8909f4e26b184041f6960f4bd3e777f0a2 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Wed, 22 May 2024 12:30:04 +0500 Subject: [PATCH 15/32] Changed the command for source --- cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index e263ec1e0..5c0705826 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -35,7 +35,7 @@ node('J-K230-1') { unstash 'testvm_pwd.sh' withCredentials([sshUserPrivateKey(credentialsId: 'TESTVM_SSH_CREDENTIALS', keyFileVariable: 'SSH_KEY')]) { sh '''#!/bin/bash -v - bash testvm_pwd.sh + source testvm_pwd.sh echo "$SIMDE_PATH" ssh -i $SSH_KEY jenkins_user@machine.cloud-v.co -p 30013 "cd $SIMDE_PATH && tar cvf - ./*" | tar xvf - -C ./ ''' From 6aec4f6f965d08918ca211870d73fd7ffc51fcad Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Wed, 22 May 2024 14:29:25 +0500 Subject: [PATCH 16/32] Corrected Makefile syntax --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index db77f58b7..8efcb438b 100644 --- a/Makefile +++ b/Makefile @@ -14,10 +14,10 @@ all: run # Target to run all executable files and log the output run: - @echo "Running executables in $(DIR)..." > $(LOG_FILE) - @count=0; \ - @pass_count=0; \ - @fail_count=0; \ + @echo "Running executables in $(DIR)..." > $(LOG_FILE)aaaa + count=0; \ + pass_count=0; \ + fail_count=0; \ for file in $(EXEC_FILES); do \ echo "Executing $$file" | tee -a $(LOG_FILE); \ $$file >> $(LOG_FILE) 2>&1; \ From 855e858152909ee43cc27954ef0d12c8607ab8f6 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Wed, 22 May 2024 15:58:00 +0500 Subject: [PATCH 17/32] Changed the clone branch to master --- cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index 5c0705826..22131eff7 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -4,7 +4,7 @@ node('J-TESTVM-1') { } stage('Clone') { sh '''#!/bin/bash -v - git clone -b rvv1.0-integration https://github.com/alitariq4589/simde-cloud-v.git . + git clone -b master https://github.com/alitariq4589/simde-cloud-v.git . ''' } stage('Run system_info') { From be84a57c13dff7c8e8352ddeae68bded5a3b194b Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Wed, 22 May 2024 16:19:49 +0500 Subject: [PATCH 18/32] Added -march for vector --- riscv64-cross.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/riscv64-cross.txt b/riscv64-cross.txt index 210feebe8..98319d7c1 100644 --- a/riscv64-cross.txt +++ b/riscv64-cross.txt @@ -1,6 +1,6 @@ [binaries] -c = 'riscv64-unknown-linux-gnu-gcc' -cpp = 'riscv64-unknown-linux-gnu-g++' +c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv'] +cpp = ['riscv64-unknown-linux-gnu-g++', '-march=rv64gcv'] ar = 'riscv64-unknown-linux-gnu-ar' strip = 'riscv64-unknown-linux-gnu-strip' From 0bf48165a3570cfb61597ef8e2b5d09c42a3eceb Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Wed, 22 May 2024 16:26:44 +0500 Subject: [PATCH 19/32] Changed the clone stage --- cloud-v-pipeline | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index 22131eff7..aa32cf246 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -3,9 +3,7 @@ node('J-TESTVM-1') { cleanWs() } stage('Clone') { - sh '''#!/bin/bash -v - git clone -b master https://github.com/alitariq4589/simde-cloud-v.git . - ''' + checkout scm } stage('Run system_info') { sh '''#!/bin/bash From 3ead31b98d8de5e92603d6d8217f77f1a36111be Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Wed, 22 May 2024 16:55:22 +0500 Subject: [PATCH 20/32] Added error handling for meson command --- cloud-v-pipeline | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cloud-v-pipeline b/cloud-v-pipeline index aa32cf246..8c3f06a49 100644 --- a/cloud-v-pipeline +++ b/cloud-v-pipeline @@ -3,7 +3,9 @@ node('J-TESTVM-1') { cleanWs() } stage('Clone') { - checkout scm + sh '''#!/bin/bash -v + git clone -b testing_march https://github.com/alitariq4589/simde-cloud-v.git . + ''' } stage('Run system_info') { sh '''#!/bin/bash @@ -18,8 +20,13 @@ node('J-TESTVM-1') { } stage('Run cross compile') { sh '''#!/bin/bash -l + set -e module load riscv64-gnu-glibc/12042024 meson compile -C build -v + if [ $? -ne 0 ]; then + echo "Meson compile failed" + exit 1 + fi echo "export SIMDE_PATH=$(pwd)" > testvm_pwd.sh ''' stash includes: 'testvm_pwd.sh', name: 'testvm_pwd.sh' From 72f0b56151e756e7e18c61d5ecdb34e4365a92e6 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Wed, 22 May 2024 17:19:04 +0500 Subject: [PATCH 21/32] Reordered the files --- Makefile => .cloud-v/Makefile | 2 +- cloud-v-pipeline => .cloud-v/cloud-v-pipeline | 8 ++++---- .../cross-files/riscv64-gcc-13-unknown.cross | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename Makefile => .cloud-v/Makefile (98%) rename cloud-v-pipeline => .cloud-v/cloud-v-pipeline (83%) rename riscv64-cross.txt => docker/cross-files/riscv64-gcc-13-unknown.cross (100%) diff --git a/Makefile b/.cloud-v/Makefile similarity index 98% rename from Makefile rename to .cloud-v/Makefile index 8efcb438b..70a6b4a52 100644 --- a/Makefile +++ b/.cloud-v/Makefile @@ -1,7 +1,7 @@ # Makefile # Define the directory to search for executables -DIR := build/test +DIR := ../build/test # Define a shell command to find all executable files, excluding C/C++ files and directories EXEC_FILES := $(shell find $(DIR) -type f -executable ! -name '*.c' ! -name '*.cpp' ! -name '*.h') diff --git a/cloud-v-pipeline b/.cloud-v/cloud-v-pipeline similarity index 83% rename from cloud-v-pipeline rename to .cloud-v/cloud-v-pipeline index 8c3f06a49..aca20bf4c 100644 --- a/cloud-v-pipeline +++ b/.cloud-v/cloud-v-pipeline @@ -1,11 +1,10 @@ +// All CI build results of this pipeline are available at: https://dash.cloud-v.co/blue/organizations/jenkins/simde/activity node('J-TESTVM-1') { stage('Clean Workspace') { cleanWs() } stage('Clone') { - sh '''#!/bin/bash -v - git clone -b testing_march https://github.com/alitariq4589/simde-cloud-v.git . - ''' + checkout scm } stage('Run system_info') { sh '''#!/bin/bash @@ -15,7 +14,7 @@ node('J-TESTVM-1') { stage('Run configure') { sh '''#!/bin/bash -l module load riscv64-gnu-glibc/12042024 - meson setup build --cross-file=riscv64-cross.txt -Db_lundef=false + meson setup build --cross-file=./docker/cross-files/riscv64-gcc-13-unknown.cross -Db_lundef=false ''' } stage('Run cross compile') { @@ -48,6 +47,7 @@ node('J-K230-1') { } stage('Run test') { sh'''#!/bin/bash + cd .cloud-v make ''' } diff --git a/riscv64-cross.txt b/docker/cross-files/riscv64-gcc-13-unknown.cross similarity index 100% rename from riscv64-cross.txt rename to docker/cross-files/riscv64-gcc-13-unknown.cross From fb3cb9cd25fa3526efc61c6160643a9bc6c52fda Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Tue, 28 May 2024 14:34:24 +0500 Subject: [PATCH 22/32] Added -mrvv-vector-bits=128 in cross file --- docker/cross-files/riscv64-gcc-13-unknown.cross | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/cross-files/riscv64-gcc-13-unknown.cross b/docker/cross-files/riscv64-gcc-13-unknown.cross index 98319d7c1..333c7a7df 100644 --- a/docker/cross-files/riscv64-gcc-13-unknown.cross +++ b/docker/cross-files/riscv64-gcc-13-unknown.cross @@ -1,5 +1,5 @@ [binaries] -c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv'] +c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv', '-mrvv-vector-bits=128'] cpp = ['riscv64-unknown-linux-gnu-g++', '-march=rv64gcv'] ar = 'riscv64-unknown-linux-gnu-ar' strip = 'riscv64-unknown-linux-gnu-strip' From 4c86e298841c9e66b1caf60b094955f572808748 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Tue, 28 May 2024 14:38:23 +0500 Subject: [PATCH 23/32] Added gcc version string --- .cloud-v/cloud-v-pipeline | 1 + 1 file changed, 1 insertion(+) diff --git a/.cloud-v/cloud-v-pipeline b/.cloud-v/cloud-v-pipeline index aca20bf4c..03751f392 100644 --- a/.cloud-v/cloud-v-pipeline +++ b/.cloud-v/cloud-v-pipeline @@ -21,6 +21,7 @@ node('J-TESTVM-1') { sh '''#!/bin/bash -l set -e module load riscv64-gnu-glibc/12042024 + riscv64-unknown-linux-gnu-gcc --version meson compile -C build -v if [ $? -ne 0 ]; then echo "Meson compile failed" From 2fd0a18f517fb71b4ccdff118034c92e07d37d57 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Tue, 28 May 2024 14:40:13 +0500 Subject: [PATCH 24/32] Added gcc version string --- .cloud-v/cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cloud-v/cloud-v-pipeline b/.cloud-v/cloud-v-pipeline index 03751f392..d55de4999 100644 --- a/.cloud-v/cloud-v-pipeline +++ b/.cloud-v/cloud-v-pipeline @@ -14,6 +14,7 @@ node('J-TESTVM-1') { stage('Run configure') { sh '''#!/bin/bash -l module load riscv64-gnu-glibc/12042024 + riscv64-unknown-linux-gnu-gcc --version meson setup build --cross-file=./docker/cross-files/riscv64-gcc-13-unknown.cross -Db_lundef=false ''' } @@ -21,7 +22,6 @@ node('J-TESTVM-1') { sh '''#!/bin/bash -l set -e module load riscv64-gnu-glibc/12042024 - riscv64-unknown-linux-gnu-gcc --version meson compile -C build -v if [ $? -ne 0 ]; then echo "Meson compile failed" From 49d5ac28b6b75b86d025fefc37c41073bd4f4374 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Wed, 5 Jun 2024 12:04:37 +0500 Subject: [PATCH 25/32] Changed the RV GNU toolchain version --- .cloud-v/cloud-v-pipeline | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cloud-v/cloud-v-pipeline b/.cloud-v/cloud-v-pipeline index d55de4999..c3e372b2e 100644 --- a/.cloud-v/cloud-v-pipeline +++ b/.cloud-v/cloud-v-pipeline @@ -13,7 +13,7 @@ node('J-TESTVM-1') { } stage('Run configure') { sh '''#!/bin/bash -l - module load riscv64-gnu-glibc/12042024 + module load riscv64-gnu-glibc/14.1.1 riscv64-unknown-linux-gnu-gcc --version meson setup build --cross-file=./docker/cross-files/riscv64-gcc-13-unknown.cross -Db_lundef=false ''' @@ -21,7 +21,7 @@ node('J-TESTVM-1') { stage('Run cross compile') { sh '''#!/bin/bash -l set -e - module load riscv64-gnu-glibc/12042024 + module load riscv64-gnu-glibc/14.1.1 meson compile -C build -v if [ $? -ne 0 ]; then echo "Meson compile failed" From 753d2122a2a04a308b3f799512579fddde8aa590 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Wed, 5 Jun 2024 12:07:17 +0500 Subject: [PATCH 26/32] Removed the mrvv flag --- docker/cross-files/riscv64-gcc-13-unknown.cross | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/cross-files/riscv64-gcc-13-unknown.cross b/docker/cross-files/riscv64-gcc-13-unknown.cross index 333c7a7df..98319d7c1 100644 --- a/docker/cross-files/riscv64-gcc-13-unknown.cross +++ b/docker/cross-files/riscv64-gcc-13-unknown.cross @@ -1,5 +1,5 @@ [binaries] -c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv', '-mrvv-vector-bits=128'] +c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv'] cpp = ['riscv64-unknown-linux-gnu-g++', '-march=rv64gcv'] ar = 'riscv64-unknown-linux-gnu-ar' strip = 'riscv64-unknown-linux-gnu-strip' From fa792a1fb446754b33b06d79e7d0c0ee26cae22d Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Wed, 5 Jun 2024 12:18:43 +0500 Subject: [PATCH 27/32] Added zvl flags --- docker/cross-files/riscv64-gcc-13-unknown.cross | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/cross-files/riscv64-gcc-13-unknown.cross b/docker/cross-files/riscv64-gcc-13-unknown.cross index 98319d7c1..4de798794 100644 --- a/docker/cross-files/riscv64-gcc-13-unknown.cross +++ b/docker/cross-files/riscv64-gcc-13-unknown.cross @@ -1,5 +1,5 @@ [binaries] -c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv'] +c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv_zvl256b', '-mrvv-vector-bits=zvl', '-mabi=lp64d', '-Ofast'] cpp = ['riscv64-unknown-linux-gnu-g++', '-march=rv64gcv'] ar = 'riscv64-unknown-linux-gnu-ar' strip = 'riscv64-unknown-linux-gnu-strip' From 351be2fb8001e71a5bc449cb29549d7b5511e7bf Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Wed, 5 Jun 2024 12:22:23 +0500 Subject: [PATCH 28/32] Added zvl flags --- docker/cross-files/riscv64-gcc-13-unknown.cross | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/cross-files/riscv64-gcc-13-unknown.cross b/docker/cross-files/riscv64-gcc-13-unknown.cross index 4de798794..b3c4c0911 100644 --- a/docker/cross-files/riscv64-gcc-13-unknown.cross +++ b/docker/cross-files/riscv64-gcc-13-unknown.cross @@ -1,6 +1,6 @@ [binaries] c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv_zvl256b', '-mrvv-vector-bits=zvl', '-mabi=lp64d', '-Ofast'] -cpp = ['riscv64-unknown-linux-gnu-g++', '-march=rv64gcv'] +cpp = ['riscv64-unknown-linux-gnu-g++', '-march=rv64gcv_zvl256b', '-mrvv-vector-bits=zvl', '-mabi=lp64d', '-Ofast'] ar = 'riscv64-unknown-linux-gnu-ar' strip = 'riscv64-unknown-linux-gnu-strip' From 08cff65c84acf3d47b8cbf592976b04dddbb6755 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Mon, 24 Jun 2024 12:25:20 +0500 Subject: [PATCH 29/32] Changed -Ofast to -O3 --- docker/cross-files/riscv64-gcc-13-unknown.cross | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/cross-files/riscv64-gcc-13-unknown.cross b/docker/cross-files/riscv64-gcc-13-unknown.cross index b3c4c0911..2662a57ca 100644 --- a/docker/cross-files/riscv64-gcc-13-unknown.cross +++ b/docker/cross-files/riscv64-gcc-13-unknown.cross @@ -1,6 +1,6 @@ [binaries] -c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv_zvl256b', '-mrvv-vector-bits=zvl', '-mabi=lp64d', '-Ofast'] -cpp = ['riscv64-unknown-linux-gnu-g++', '-march=rv64gcv_zvl256b', '-mrvv-vector-bits=zvl', '-mabi=lp64d', '-Ofast'] +c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv_zvl256b', '-mrvv-vector-bits=zvl', '-mabi=lp64d', '-O3'] +cpp = ['riscv64-unknown-linux-gnu-g++', '-march=rv64gcv_zvl256b', '-mrvv-vector-bits=zvl', '-mabi=lp64d', '-O3'] ar = 'riscv64-unknown-linux-gnu-ar' strip = 'riscv64-unknown-linux-gnu-strip' From 64a11fd7b96c0e09d7460ac5f54a0a79cc6ac5f1 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Tue, 25 Jun 2024 16:50:46 +0500 Subject: [PATCH 30/32] Removed the optimization flag --- docker/cross-files/riscv64-gcc-13-unknown.cross | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/cross-files/riscv64-gcc-13-unknown.cross b/docker/cross-files/riscv64-gcc-13-unknown.cross index 2662a57ca..ea9afad67 100644 --- a/docker/cross-files/riscv64-gcc-13-unknown.cross +++ b/docker/cross-files/riscv64-gcc-13-unknown.cross @@ -1,6 +1,6 @@ [binaries] -c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv_zvl256b', '-mrvv-vector-bits=zvl', '-mabi=lp64d', '-O3'] -cpp = ['riscv64-unknown-linux-gnu-g++', '-march=rv64gcv_zvl256b', '-mrvv-vector-bits=zvl', '-mabi=lp64d', '-O3'] +c = ['riscv64-unknown-linux-gnu-gcc', '-march=rv64gcv_zvl256b', '-mrvv-vector-bits=zvl', '-mabi=lp64d'] +cpp = ['riscv64-unknown-linux-gnu-g++', '-march=rv64gcv_zvl256b', '-mrvv-vector-bits=zvl', '-mabi=lp64d'] ar = 'riscv64-unknown-linux-gnu-ar' strip = 'riscv64-unknown-linux-gnu-strip' From 9e68a0d55a99b5a373816c256cdd4254c8602084 Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Tue, 25 Jun 2024 18:14:32 +0500 Subject: [PATCH 31/32] Corrected the scp command --- .cloud-v/cloud-v-pipeline | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cloud-v/cloud-v-pipeline b/.cloud-v/cloud-v-pipeline index c3e372b2e..cfa21d6b3 100644 --- a/.cloud-v/cloud-v-pipeline +++ b/.cloud-v/cloud-v-pipeline @@ -42,7 +42,7 @@ node('J-K230-1') { sh '''#!/bin/bash -v source testvm_pwd.sh echo "$SIMDE_PATH" - ssh -i $SSH_KEY jenkins_user@machine.cloud-v.co -p 30013 "cd $SIMDE_PATH && tar cvf - ./*" | tar xvf - -C ./ + ssh -i $SSH_KEY jenkins_user@machine.cloud-v.co -p 30013 "cd $SIMDE_PATH && tar cvf - ." | tar xvf - -C ./ ''' } } From fa1e66e4e92cac785e51d25ceb3d4f501f16c96a Mon Sep 17 00:00:00 2001 From: Ali Tariq Date: Thu, 27 Jun 2024 17:06:29 +0500 Subject: [PATCH 32/32] Added Archive artifact stage --- .cloud-v/cloud-v-pipeline | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.cloud-v/cloud-v-pipeline b/.cloud-v/cloud-v-pipeline index cfa21d6b3..5ab4b8e6d 100644 --- a/.cloud-v/cloud-v-pipeline +++ b/.cloud-v/cloud-v-pipeline @@ -52,4 +52,7 @@ node('J-K230-1') { make ''' } + stage('Archive Artifacts'){ + archiveArtifacts artifacts: '.cloud-v/test.mak.log', fingerprint: true + } }