diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index e761fd2a3..c0e1d6506 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -8,6 +8,8 @@ ################################## name: Installation + +# Run on PR that modifies the installation scripts, weekly, or manually on: workflow_dispatch: pull_request: @@ -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 }} @@ -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 @@ -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 @@ -95,6 +106,7 @@ 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 @@ -102,25 +114,30 @@ jobs: 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()