Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jordancarlin committed Oct 16, 2024
1 parent b4447b3 commit ffee136
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
##################################

name: Installation

# Run on PR that modifies the installation scripts, weekly, or manually
on:
workflow_dispatch:
pull_request:
Expand All @@ -19,9 +21,12 @@ on:
- 'wally-package-install.sh'
schedule:
- cron: "0 0 * * 3" # Run at 12:00 AM on Wednesdays

# Use bash shell with extra GitHub Actions options for all jobs
defaults:
run:
shell: bash

jobs:
installation_test:
name: Test installation for ${{ matrix.name }}
Expand Down Expand Up @@ -63,21 +68,26 @@ jobs:
image: null
riscv_path: /home/riscv

# run on selected version of ubuntu or on ubuntu-latest with docker image
runs-on: ${{ matrix.os }}
container:
image: ${{ matrix.image }}
options: --privileged --mount type=bind,source=/,target=/host --pid=host --entrypoint /bin/bash
options: --privileged --mount type=bind,source=/,target=/host --pid=host --entrypoint /bin/bash # Allow for connection with host

steps:
# Docker images need git installed or the checkout action fails
- name: Install Dependencies for Red Hat
if: ${{ matrix.image != null }}
run: |
dnf install -y sudo git
dnf install curl -y --allowerasing || true
# Only clone submodules needed for standard tests/regression to save space
- uses: actions/checkout@v4
- name: Clone Necessary Submodules
run: |
git config --global --add safe.directory '*'
git submodule update --init addins/riscv-arch-test addins/verilog-ethernet
# Free up space on the host machine, either from the container or the host
- name: Free Up Storage
run: |
df -h
Expand All @@ -87,6 +97,7 @@ jobs:
nsenter -t 1 -m -u -n -i bash -c "$(cat .github/cli-space-cleanup.sh)"
fi
df -h
# Run main tool chain installation script, either as a user or system wide
- name: Install
run: |
if [ -z ${{ matrix.user }} ]; then
Expand All @@ -95,32 +106,38 @@ jobs:
sudo ./bin/wally-package-install.sh
./bin/wally-tool-chain-install.sh --clean ${{ matrix.riscv_path }}
fi
# Set environment variables for the rest of the job
- name: Set Environment Variables
run: |
if [ ! -z ${{ matrix.riscv_path }} ]; then
sed -i 's,exit 1,export RISCV=${{ matrix.riscv_path }},g' setup.sh
fi
source setup.sh
echo "RISCV=$RISCV" >> "$GITHUB_ENV"
# Upload installation logs for debugging
- name: Upload Installation Logs
uses: actions/upload-artifact@v4
if: always()
with:
name: installation-logs-${{ matrix.name }}
path: ${{ env.RISCV }}/logs/
# Make riscof only as that is the only testsuite used by standard regression
- name: make tests
run: |
source setup.sh
make riscof --jobs $(nproc --ignore 1)
# Only the linux-testvectors are needed, so remove the rest of the buildroot to save space
- name: Remove Buildroot to Save Space
run: |
sudo rm -rf $RISCV/buildroot/output/build
df -h
# Run standard regression, skipping distros that are known to be broken with Verilator
- name: Regression
if: ${{ matrix.name != 'ubuntu-20.04' && matrix.name != 'rocky-8' && matrix.name != 'almalinux-8'}}
run: |
source setup.sh
regression-wally
# Upload regression logs for debugging
- name: Upload regression logs
uses: actions/upload-artifact@v4
if: always()
Expand Down

0 comments on commit ffee136

Please sign in to comment.