Skip to content

Commit

Permalink
Merge pull request #540 from riscv-boom/ci-patch
Browse files Browse the repository at this point in the history
Small CI Fixes
  • Loading branch information
abejgonzalez committed Apr 12, 2021
2 parents 0ed3ddf + ee9530a commit 1ef2bc6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ jobs:
- run:
name: Run MediumBoomConfig riscv tests
command: .circleci/run-tests.sh mediumboom
no_output_timeout: 30m
largeboomconfig-run-csmith-tests:
executor: main-env
steps:
Expand Down Expand Up @@ -336,6 +337,7 @@ jobs:
- run:
name: Run HwachaBoomConfig riscv tests
command: .circleci/run-tests.sh hwachaboom
no_output_timeout: 30m

###########################################################################################

Expand Down
2 changes: 1 addition & 1 deletion CHIPYARD.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0f47d80edb350ec41d96586d57b886f50882af2b
45684f1b875f018a1945476cec9269068e1618ca
18 changes: 14 additions & 4 deletions util/csmith/install-csmith.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
#!/bin/bash

set -ex

# checkout csmith
git clone https://github.com/csmith-project/csmith.git
cd csmith
mkdir build
cd build
../configure --prefix=$RISCV
make install
git checkout deddca60d146c692e0ec5e4e345c466bbb3594b1

# install dependencies
sudo apt-get update -y
sudo apt-get install -y m4 cmake

# build csmith
cmake -DCMAKE_INSTALL_PREFIX=$RISCV .
make -j8 && make install
8 changes: 5 additions & 3 deletions util/csmith/run-csmith.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# Script to run the csmith random test generator multiple times

TEST_NAME=test
Expand Down Expand Up @@ -53,7 +55,7 @@ run_once () {
# Build both a RISCV binary and normal binary

# Test x86-64 first
gcc -I$RISCV/include/csmith-2.4.0 -w $BASE_NAME.c -o $BASE_NAME.bin
gcc -I$RISCV/include -w $BASE_NAME.c -o $BASE_NAME.bin
timeout 1s ./$BASE_NAME.bin | awk '{print tolower($0)}' > $BASE_NAME.host.out
RV=$?
if [ $RV -ne 0 ]; then
Expand All @@ -64,10 +66,10 @@ run_once () {

# Test RISCV spike version
if [ $PK == false ]; then
riscv64-unknown-elf-gcc -w -I./$SRC_DIR -DPREALLOCATE=1 -mcmodel=medany -static -std=gnu99 -O2 -ffast-math -fno-common -o $BASE_NAME.riscv $BASE_NAME.c $SRC_DIR/syscalls.c $SRC_DIR/crt.S -static -nostdlib -nostartfiles -lm -lgcc -T $SRC_DIR/link.ld -I$RISCV/include/csmith-2.4.0
riscv64-unknown-elf-gcc -w -I./$SRC_DIR -DPREALLOCATE=1 -mcmodel=medany -static -std=gnu99 -O2 -ffast-math -fno-common -o $BASE_NAME.riscv $BASE_NAME.c $SRC_DIR/syscalls.c $SRC_DIR/crt.S -static -nostdlib -nostartfiles -lm -lgcc -T $SRC_DIR/link.ld -I$RISCV/include
timeout --foreground 10s spike $BASE_NAME.riscv 1> $BASE_NAME.spike.out 2> $BASE_NAME.spike.log
else
riscv64-unknown-elf-gcc $BASE_NAME.c -I$RISCV/include/csmith-2.4.0 -o $BASE_NAME.riscv -w
riscv64-unknown-elf-gcc $BASE_NAME.c -I$RISCV/include -o $BASE_NAME.riscv -w
timeout --foreground 1m spike pk $BASE_NAME.riscv 1> $BASE_NAME.spike.out 2> $BASE_NAME.spike.log
fi
RV=$?
Expand Down

0 comments on commit 1ef2bc6

Please sign in to comment.