Skip to content

Commit e29f6b0

Browse files
Update CI to maitain the artifacts and add a upper job run limit (#535)
* update ci to save the artifacts as well * Increase the maximum size limit to 1GB * Update comments * time limit increase to 30 minutes
1 parent 278a5e4 commit e29f6b0

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

.github/workflows/test.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
ACT-sail-spike:
2828
name: ACT-sail-spike (RV${{ matrix.xlen }})
2929
runs-on: ubuntu-22.04
30+
# Set a 15-minute time limit for this job
31+
timeout-minutes: 30
3032
strategy:
3133
fail-fast: false
3234
matrix:
@@ -42,8 +44,8 @@ jobs:
4244
sudo apt-get update
4345
sudo apt-get install -y python3 python3-pip python3-venv
4446
sudo apt-get install -y gcc git autoconf automake libtool curl make unzip
45-
sudo apt-get install autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev libslirp-dev pkg-config
46-
sudo apt-get install device-tree-compiler libboost-regex-dev libboost-system-dev
47+
sudo apt-get install -y autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev libslirp-dev pkg-config
48+
sudo apt-get install -y device-tree-compiler libboost-regex-dev libboost-system-dev
4749
pip3 install git+https://github.com/riscv/riscof.git
4850
4951
- name: Build RISCV-GNU Toolchain (${{ matrix.xlen }} bit)
@@ -134,3 +136,31 @@ jobs:
134136
run: |
135137
cd riscof-plugins/rv${{ matrix.xlen }}
136138
riscof run --config config.ini --suite ../../riscv-test-suite/rv${{ matrix.xlen }}i_m/ --env ../../riscv-test-suite/env
139+
140+
141+
- name: Check size of riscof_work folder
142+
id: check_size
143+
run: |
144+
folder_size=$(du -sm /home/runner/work/riscv-arch-test/riscv-arch-test/riscof-plugins/rv${{ matrix.xlen }}/riscof_work | cut -f1)
145+
echo "Folder size: ${folder_size} MB"
146+
if [ "$folder_size" -gt 1000 ]; then
147+
echo "Size exceeds 1 GB. Skipping upload."
148+
echo "upload=false" >> $GITHUB_ENV # Set an environment variable to skip upload
149+
else
150+
echo "Size is within limit. Proceeding with upload."
151+
echo "upload=true" >> $GITHUB_ENV # Set an environment variable to proceed with upload
152+
fi
153+
154+
# Upload the riscof_work for rv${{ matrix.xlen }} folder if size check passes
155+
- name: Upload the riscof_work for rv${{ matrix.xlen }} folder
156+
# Proceed with upload only if the size is within limit
157+
if: ${{ env.upload == 'true' }}
158+
uses: actions/upload-artifact@v4
159+
with:
160+
name: riscof-test-report-rv${{ matrix.xlen }}
161+
path: /home/runner/work/riscv-arch-test/riscv-arch-test/riscof-plugins/rv${{ matrix.xlen }}/riscof_work/
162+
if-no-files-found: warn
163+
retention-days: 3
164+
compression-level: 6
165+
overwrite: true
166+
include-hidden-files: false

0 commit comments

Comments
 (0)