Skip to content

Commit

Permalink
Update CI to maitain the artifacts and add a upper job run limit (#535)
Browse files Browse the repository at this point in the history
* update ci to save the artifacts as well

* Increase the maximum size limit to 1GB

* Update comments

* time limit increase to 30 minutes
  • Loading branch information
MuhammadHammad001 authored Oct 18, 2024
1 parent 278a5e4 commit e29f6b0
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
ACT-sail-spike:
name: ACT-sail-spike (RV${{ matrix.xlen }})
runs-on: ubuntu-22.04
# Set a 15-minute time limit for this job
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
Expand All @@ -42,8 +44,8 @@ jobs:
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-venv
sudo apt-get install -y gcc git autoconf automake libtool curl make unzip
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
sudo apt-get install device-tree-compiler libboost-regex-dev libboost-system-dev
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
sudo apt-get install -y device-tree-compiler libboost-regex-dev libboost-system-dev
pip3 install git+https://github.com/riscv/riscof.git
- name: Build RISCV-GNU Toolchain (${{ matrix.xlen }} bit)
Expand Down Expand Up @@ -134,3 +136,31 @@ jobs:
run: |
cd riscof-plugins/rv${{ matrix.xlen }}
riscof run --config config.ini --suite ../../riscv-test-suite/rv${{ matrix.xlen }}i_m/ --env ../../riscv-test-suite/env
- name: Check size of riscof_work folder
id: check_size
run: |
folder_size=$(du -sm /home/runner/work/riscv-arch-test/riscv-arch-test/riscof-plugins/rv${{ matrix.xlen }}/riscof_work | cut -f1)
echo "Folder size: ${folder_size} MB"
if [ "$folder_size" -gt 1000 ]; then
echo "Size exceeds 1 GB. Skipping upload."
echo "upload=false" >> $GITHUB_ENV # Set an environment variable to skip upload
else
echo "Size is within limit. Proceeding with upload."
echo "upload=true" >> $GITHUB_ENV # Set an environment variable to proceed with upload
fi
# Upload the riscof_work for rv${{ matrix.xlen }} folder if size check passes
- name: Upload the riscof_work for rv${{ matrix.xlen }} folder
# Proceed with upload only if the size is within limit
if: ${{ env.upload == 'true' }}
uses: actions/upload-artifact@v4
with:
name: riscof-test-report-rv${{ matrix.xlen }}
path: /home/runner/work/riscv-arch-test/riscv-arch-test/riscof-plugins/rv${{ matrix.xlen }}/riscof_work/
if-no-files-found: warn
retention-days: 3
compression-level: 6
overwrite: true
include-hidden-files: false

0 comments on commit e29f6b0

Please sign in to comment.