From 26d1731bd9a061688574938567a8f6923eca2059 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 19:42:50 -0700 Subject: [PATCH 01/31] Move RISCV env. var. setting interal to scripts --- .github/actions/run-tests/action.yml | 3 --- .github/scripts/build-extra-tests.sh | 8 ++++---- .github/scripts/run-firesim-scala-tests.sh | 4 ++++ .github/scripts/run-tests.sh | 4 ++++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index a7cdebcb..33bcad77 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -15,9 +15,6 @@ runs: steps: - name: run rtl build script cache of chipyard root should have been loaded by prepare-rtl run: | - export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" - export LD_LIBRARY_PATH="$RISCV/lib" - export PATH="$RISCV/bin:$PATH" ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} shell: bash diff --git a/.github/scripts/build-extra-tests.sh b/.github/scripts/build-extra-tests.sh index 68bf7fe6..a77f5482 100755 --- a/.github/scripts/build-extra-tests.sh +++ b/.github/scripts/build-extra-tests.sh @@ -3,13 +3,13 @@ # turn echo on and error on earliest command set -ex -export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" -export LD_LIBRARY_PATH="$RISCV/lib" -export PATH="$RISCV/bin:$PATH" - # get shared variables SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh +export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +export LD_LIBRARY_PATH="$RISCV/lib" +export PATH="$RISCV/bin:$PATH" + make -C $LOCAL_CHIPYARD_DIR/tests clean make -C $LOCAL_CHIPYARD_DIR/tests diff --git a/.github/scripts/run-firesim-scala-tests.sh b/.github/scripts/run-firesim-scala-tests.sh index a848df62..55a22365 100755 --- a/.github/scripts/run-firesim-scala-tests.sh +++ b/.github/scripts/run-firesim-scala-tests.sh @@ -13,6 +13,10 @@ source $SCRIPT_DIR/defaults.sh # call clean on exit trap clean EXIT +export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +export LD_LIBRARY_PATH="$RISCV/lib" +export PATH="$RISCV/bin:$PATH" + # Directory locations for handling firesim-local installations of libelf/libdwarf # This would generally be handled by build-setup.sh/firesim-setup.sh firesim_sysroot=lib-install diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index ab3cf5cc..7729579c 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -9,6 +9,10 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh +export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +export LD_LIBRARY_PATH="$RISCV/lib" +export PATH="$RISCV/bin:$PATH" + run_bmark () { make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ } From f117f7a0fe723ddd7e1437175fac5383150c1e10 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 20:05:43 -0700 Subject: [PATCH 02/31] Try to skip successful jobs on rerun workflow --- .github/actions/job-end/action.yml | 8 + .github/actions/job-start/action.yml | 19 ++ .github/workflows/chipyard-run-tests.yml | 294 ++++++++++++++++++++++- 3 files changed, 319 insertions(+), 2 deletions(-) create mode 100644 .github/actions/job-end/action.yml create mode 100644 .github/actions/job-start/action.yml diff --git a/.github/actions/job-end/action.yml b/.github/actions/job-end/action.yml new file mode 100644 index 00000000..51b4f4d7 --- /dev/null +++ b/.github/actions/job-end/action.yml @@ -0,0 +1,8 @@ +name: job-end +description: "Save a job status" + +runs: + using: "composite" + steps: + - run: echo "success" > run_result + shell: bash diff --git a/.github/actions/job-start/action.yml b/.github/actions/job-start/action.yml new file mode 100644 index 00000000..dc4d0642 --- /dev/null +++ b/.github/actions/job-start/action.yml @@ -0,0 +1,19 @@ +name: job-start +description: "Setup a job status" +outputs: + run_result: + value: ${{ steps.run_result.outputs.run_result }} + +runs: + using: "composite" + steps: + - name: Restore the previous run result + uses: actions/cache@v2 + with: + path: run_result + key: ${{ github.run_id }}-${{ github.job }} + restore-keys: ${{ github.run_id }}-${{ github.job }} + - name: Set run_result to default or use cached value + id: run_result + run: echo "::set-output name=run_result::$(cat run_result 2>/dev/null || echo 'default')" + shell: bash diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index aa5c438e..0167d455 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -20,8 +20,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Check commits of each submodule + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh + - uses: ./.github/actions/job-end tutorial-setup-check: name: tutorial-setup-check @@ -32,8 +36,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Check that the tutorial-setup patches apply + if: steps.job-start.outputs.run_result != 'success' run: scripts/tutorial-setup.sh + - uses: ./.github/actions/job-end documentation-check: name: documentation-check @@ -44,15 +52,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Check that documentation builds with no warnings/errors + if: steps.job-start.outputs.run_result != 'success' run: | sudo apt-get update -y sudo apt-get install -y python3-pip sudo pip3 install -r docs/requirements.txt make -C docs html - name: Show error log from sphinx if failed - if: ${{ failure() }} + if: (steps.job-start.outputs.run_result != 'success') && ${{ failure() }} run: cat /tmp/sphinx-err*.log + - uses: ./.github/actions/job-end make-keys: name: make-keys @@ -67,14 +79,19 @@ jobs: access_token: ${{ github.token }} - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Generate hashes + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/create-hash.sh - name: Generate keys + if: steps.job-start.outputs.run_result != 'success' id: genkey run: | echo "::set-output name=riscvtools-cache-key::riscv-tools-installed-${{ env.tools-cache-version }}-$(shasum riscv-tools.hash | cut -d' ' -f1)" echo "::set-output name=esptools-cache-key::esp-tools-installed-${{ env.tools-cache-version }}-$(shasum esp-tools.hash | cut -d' ' -f1)" echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" + - uses: ./.github/actions/job-end outputs: riscvtools-cache-key: ${{ steps.genkey.outputs.riscvtools-cache-key }} esptools-cache-key: ${{ steps.genkey.outputs.esptools-cache-key }} @@ -90,13 +107,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - uses: ./.github/actions/job-end install-esp-toolchain: needs: make-keys @@ -108,13 +130,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} + - uses: ./.github/actions/job-end build-extra-tests: name: build-extra-tests @@ -126,21 +153,28 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - uses: actions/cache@v2 + if: steps.job-start.outputs.run_result != 'success' id: build-extra-tools-cache with: path: extra-tests-install key: ${{ needs.make-keys.outputs.extra-tests-cache-key }} restore-keys: ${{ needs.make-keys.outputs.extra-tests-cache-key }} - name: Build extra tests if not cached + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/build-extra-tests.sh + - uses: ./.github/actions/job-end install-verilator: name: install-verilator @@ -151,13 +185,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Build verilator on remote + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/install-verilator.sh + - uses: ./.github/actions/job-end # Sentinel job to simplify how we specify which that basic setup is complete # @@ -169,8 +208,12 @@ jobs: build-extra-tests] runs-on: ubuntu-latest steps: + - uses: ./.github/actions/job-start + id: job-start - name: Set up complete + if: steps.job-start.outputs.run_result != 'success' run: echo Set up is complete! + - uses: ./.github/actions/job-end ########################################################################## @@ -184,24 +227,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" + - uses: ./.github/actions/job-end prepare-chipyard-peripherals: name: prepare-chipyard-peripherals @@ -213,24 +264,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" + - uses: ./.github/actions/job-end prepare-chipyard-accels: name: prepare-chipyard-accels @@ -242,24 +301,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" + - uses: ./.github/actions/job-end prepare-chipyard-tracegen: name: prepare-chipyard-tracegen @@ -271,24 +338,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-tracegen" + - uses: ./.github/actions/job-end prepare-chipyard-other: name: prepare-chipyard-other @@ -300,24 +375,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-other" + - uses: ./.github/actions/job-end prepare-chipyard-fpga: name: prepare-chipyard-fpga @@ -329,25 +412,33 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-fpga" build-type: "fpga" + - uses: ./.github/actions/job-end ########################################################################## @@ -361,28 +452,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-rocket" + - uses: ./.github/actions/job-end chipyard-hetero-run-tests: name: chipyard-hetero-run-tests @@ -394,28 +494,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-hetero" + - uses: ./.github/actions/job-end chipyard-boom-run-tests: name: chipyard-boom-run-tests @@ -427,28 +536,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-boom" + - uses: ./.github/actions/job-end chipyard-cva6-run-tests: name: chipyard-cva6-run-tests @@ -460,28 +578,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-cva6" + - uses: ./.github/actions/job-end chipyard-sodor-run-tests: name: chipyard-sodor-run-tests @@ -493,28 +620,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-sodor" + - uses: ./.github/actions/job-end chipyard-dmirocket-run-tests: name: chipyard-dmirocket-run-tests @@ -526,28 +662,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-dmirocket" + - uses: ./.github/actions/job-end chipyard-spiflashwrite-run-tests: name: chipyard-spiflashwrite-run-tests @@ -559,28 +704,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-spiflashwrite" + - uses: ./.github/actions/job-end chipyard-spiflashread-run-tests: name: chipyard-spiflashread-run-tests @@ -592,28 +746,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-spiflashread" + - uses: ./.github/actions/job-end chipyard-lbwif-run-tests: name: chipyard-lbwif-run-tests @@ -625,28 +788,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-lbwif" + - uses: ./.github/actions/job-end chipyard-sha3-run-tests: name: chipyard-sha3-run-tests @@ -658,28 +830,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-sha3" + - uses: ./.github/actions/job-end chipyard-streaming-fir-run-tests: name: chipyard-streaming-fir-run-tests @@ -691,28 +872,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-streaming-fir" + - uses: ./.github/actions/job-end chipyard-streaming-passthrough-run-tests: name: chipyard-streaming-passthrough-run-tests @@ -724,28 +914,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-streaming-passthrough" + - uses: ./.github/actions/job-end chipyard-hwacha-run-tests: name: chipyard-hwacha-run-tests @@ -757,28 +956,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-hwacha" + - uses: ./.github/actions/job-end chipyard-gemmini-run-tests: name: chipyard-gemmini-run-tests @@ -790,28 +998,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-gemmini" + - uses: ./.github/actions/job-end chipyard-nvdla-run-tests: name: chipyard-nvdla-run-tests @@ -823,28 +1040,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-nvdla" + - uses: ./.github/actions/job-end tracegen-boom-run-tests: name: tracegen-boom-run-tests @@ -856,28 +1082,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-tracegen" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "tracegen-boom" + - uses: ./.github/actions/job-end tracegen-run-tests: name: tracegen-run-tests @@ -889,28 +1124,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-tracegen" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "tracegen" + - uses: ./.github/actions/job-end icenet-run-tests: name: icenet-run-tests @@ -922,28 +1166,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + if: steps.job-start.outputs.run_result != 'success' + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-other" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "icenet" + - uses: ./.github/actions/job-end testchipip-run-tests: name: testchipip-run-tests @@ -955,28 +1209,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-other" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "testchipip" + - uses: ./.github/actions/job-end firesim-run-tests: name: firesim-run-tests @@ -988,29 +1251,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "extra-tests" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "firesim" run-script: "run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end fireboom-run-tests: name: fireboom-run-tests @@ -1022,29 +1294,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "extra-tests" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "fireboom" run-script: "run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end firesim-multiclock-run-tests: name: firesim-multiclock-run-tests @@ -1056,29 +1337,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "extra-tests" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "firesim-multiclock" run-script: "run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end # Sentinel job to simplify how we specify which checks need to pass in branch # protection and in Mergify @@ -1097,4 +1387,4 @@ jobs: firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] runs-on: ubuntu-latest steps: - - run: echo Success! \ No newline at end of file + - run: echo Success! From ff41808df4536eaaa9928eeeed7e1e14c2abf4df Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 22:57:29 -0700 Subject: [PATCH 03/31] Try abstracting more away into composite actions --- .github/actions/prepare-rtl/action.yml | 11 +- .github/actions/run-tests/action.yml | 25 +- .github/actions/ssh-checkout/action.yml | 14 + .github/actions/toolchain-build/action.yml | 50 +- .github/workflows/chipyard-run-tests.yml | 851 +++------------------ 5 files changed, 170 insertions(+), 781 deletions(-) create mode 100644 .github/actions/ssh-checkout/action.yml diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index fd9e9759..89dbb431 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -21,6 +21,11 @@ inputs: runs: using: "composite" steps: + - name: Build toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: ${{ inputs.tools-version }} + - uses: actions/cache@v2 id: rtl-build-id with: @@ -29,13 +34,13 @@ runs: sims/firesim/sim generators/gemmini/software/gemmini-rocc-tests key: ${{ inputs.group-key }}-${{ github.ref }}-${{ github.sha }} - - name: run rtl build script if not cached + + - name: Run RTL build if not cached run: | if [[ "${{ steps.rtl-build-id.outputs.cache-hit }}" != 'true' ]]; then echo "Cache miss on ${{ inputs.group-key }}-${{ github.ref }}-${{ github.sha }}" ./.github/scripts/${{ inputs.build-script }} ${{ inputs.group-key }} ${{ inputs.build-type }} else - echo "cache hit do not prepare rtl" + echo "Cache hit do not rebuild RTL for ${{ inputs.group-key }}" fi shell: bash - diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 33bcad77..f0aa9d25 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -2,6 +2,13 @@ name: run-tests description: 'Runs tests according to input parameters' inputs: + tools-version: + description: Which toolchain to build + required: false + default: 'riscv-tools' + group-key: + description: group key + required: true project-key: description: project key required: true @@ -13,8 +20,18 @@ inputs: runs: using: "composite" steps: - - name: run rtl build script cache of chipyard root should have been loaded by prepare-rtl - run: | - ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} - shell: bash + - name: Build toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: ${{ inputs.tools-version }} + # Note: You shouldn't need the other inputs since it shouldn't build RTL from scratch + - name: Build RTL + uses: ./.github/actions/toolchain-build + with: + tools-version: ${{ inputs.tools-version }} + group-key: ${{ inputs.group-key }} + + - name: Run RTL tests + run: ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} + shell: bash diff --git a/.github/actions/ssh-checkout/action.yml b/.github/actions/ssh-checkout/action.yml new file mode 100644 index 00000000..bed48cf6 --- /dev/null +++ b/.github/actions/ssh-checkout/action.yml @@ -0,0 +1,14 @@ +name: ssh-checkout +description: "Checkout code and add SSH keys to access remote build server" + +runs: + using: "composite" + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index cd883c61..f6afb68c 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -6,24 +6,42 @@ inputs: description: Which toolchain to build required: false default: 'riscv-tools' - cache-key: - description: Use this for caching - required: true + runs: using: "composite" steps: - - uses: actions/cache@v2 - id: toolchain-build-id - with: - path: ${{ inputs.tools-version }}-install - key: ${{ inputs.cache-key }} - - name: run build toolchain if not cached - run: | - if [[ "${{ steps.toolchain-build-id.outputs.cache-hit }}" != 'true' ]]; then - echo "Cache miss on ${{ inputs.tools-version }}-install" - ./.github/scripts/build-toolchains.sh ${{ inputs.tools-version }} - else - echo "cache hit do not generate build ${{ inputs.tools-version }}" - fi + - name: Generate hashes + run: .github/scripts/create-hash.sh shell: bash + - name: Generate keys + id: genkey + run: | + echo "::set-output name=riscvtools-cache-key::riscv-tools-installed-${{ env.tools-cache-version }}-$(shasum riscv-tools.hash | cut -d' ' -f1)" + echo "::set-output name=esptools-cache-key::esp-tools-installed-${{ env.tools-cache-version }}-$(shasum esp-tools.hash | cut -d' ' -f1)" + shell: bash + + # brute force way to swap between riscv/esp-tools caches + - uses: actions/cache@v2 + id: toolchain-build-riscv-tools + if: ${{ inputs.tools-version == "riscv-tools" }} + with: + path: ${{ inputs.tools-version }}-install + key: ${{ steps.genkey.outputs.riscvtools-cache-key }} + + - uses: actions/cache@v2 + id: toolchain-build-esp-tools + if: ${{ inputs.tools-version == "esp-tools" }} + with: + path: ${{ inputs.tools-version }}-install + key: ${{ steps.genkey.outputs.esptools-cache-key }} + + - name: Build toolchain if not cached + run: | + if [[ "${{ steps.toolchain-build-riscv-tools.outputs.cache-hit }}" != 'true' || "${{ steps.toolchain-build-esp-tools.outputs.cache-hit }}" != 'true' ]]; then + echo "Cache miss on ${{ inputs.tools-version }}-install. Build." + ./.github/scripts/build-toolchains.sh ${{ inputs.tools-version }} + else + echo "Cache hit do not rebuild toolchain ${{ inputs.tools-version }}." + fi + shell: bash diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 0167d455..d908014a 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -66,39 +66,7 @@ jobs: run: cat /tmp/sphinx-err*.log - uses: ./.github/actions/job-end - make-keys: - name: make-keys - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Generate hashes - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/create-hash.sh - - name: Generate keys - if: steps.job-start.outputs.run_result != 'success' - id: genkey - run: | - echo "::set-output name=riscvtools-cache-key::riscv-tools-installed-${{ env.tools-cache-version }}-$(shasum riscv-tools.hash | cut -d' ' -f1)" - echo "::set-output name=esptools-cache-key::esp-tools-installed-${{ env.tools-cache-version }}-$(shasum esp-tools.hash | cut -d' ' -f1)" - echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - - uses: ./.github/actions/job-end - outputs: - riscvtools-cache-key: ${{ steps.genkey.outputs.riscvtools-cache-key }} - esptools-cache-key: ${{ steps.genkey.outputs.esptools-cache-key }} - extra-tests-cache-key: ${{ steps.genkey.outputs.extra-tests-cache-key }} - install-riscv-toolchain: - needs: make-keys name: install-riscv-toolchain runs-on: ubuntu-latest container: @@ -109,19 +77,14 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - uses: ./.github/actions/job-end install-esp-toolchain: - needs: make-keys name: install-esp-toolchain runs-on: ubuntu-latest container: @@ -132,20 +95,16 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build ESP RISC-V toolchain if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - uses: ./.github/actions/job-end build-extra-tests: name: build-extra-tests - needs: [make-keys, install-riscv-toolchain] + needs: install-riscv-toolchain runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -155,23 +114,24 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Generate keys + if: steps.job-start.outputs.run_result != 'success' + id: genkey + run: | + echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - uses: actions/cache@v2 if: steps.job-start.outputs.run_result != 'success' id: build-extra-tools-cache with: path: extra-tests-install - key: ${{ needs.make-keys.outputs.extra-tests-cache-key }} - restore-keys: ${{ needs.make-keys.outputs.extra-tests-cache-key }} - - name: Build extra tests if not cached + key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} + - name: Build extra tests if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/build-extra-tests.sh - uses: ./.github/actions/job-end @@ -183,16 +143,9 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - name: Build verilator on remote if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/install-verilator.sh @@ -203,8 +156,7 @@ jobs: # When adding new prep jobs, please add them to `needs` below setup-complete: name: "setup complete" - needs: [commit-on-master-check, tutorial-setup-check, documentation-check, - install-riscv-toolchain, install-esp-toolchain, install-verilator, + needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, build-extra-tests] runs-on: ubuntu-latest steps: @@ -219,34 +171,15 @@ jobs: prepare-chipyard-cores: name: prepare-chipyard-cores - needs: [make-keys, setup-complete] + needs: setup-complete runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -256,34 +189,15 @@ jobs: prepare-chipyard-peripherals: name: prepare-chipyard-peripherals - needs: [make-keys, setup-complete] + needs: setup-complete runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -293,71 +207,34 @@ jobs: prepare-chipyard-accels: name: prepare-chipyard-accels - needs: [make-keys, setup-complete] + needs: setup-complete runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: + tools-version: "esp-tools" group-key: "group-accels" - uses: ./.github/actions/job-end prepare-chipyard-tracegen: name: prepare-chipyard-tracegen - needs: [make-keys, setup-complete] + needs: setup-complete runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -367,34 +244,15 @@ jobs: prepare-chipyard-other: name: prepare-chipyard-other - needs: [make-keys, setup-complete] + needs: setup-complete runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -404,34 +262,15 @@ jobs: prepare-chipyard-fpga: name: prepare-chipyard-fpga - needs: [make-keys, setup-complete] + needs: setup-complete runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -444,928 +283,424 @@ jobs: chipyard-rocket-run-tests: name: chipyard-rocket-run-tests - needs: [make-keys, prepare-chipyard-cores] + needs: prepare-chipyard-cores runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-rocket" - uses: ./.github/actions/job-end chipyard-hetero-run-tests: name: chipyard-hetero-run-tests - needs: [make-keys, prepare-chipyard-cores] + needs: prepare-chipyard-cores runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-hetero" - uses: ./.github/actions/job-end chipyard-boom-run-tests: name: chipyard-boom-run-tests - needs: [make-keys, prepare-chipyard-cores] + needs: prepare-chipyard-cores runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-boom" - uses: ./.github/actions/job-end chipyard-cva6-run-tests: name: chipyard-cva6-run-tests - needs: [make-keys, prepare-chipyard-cores] + needs: prepare-chipyard-cores runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-cva6" - uses: ./.github/actions/job-end chipyard-sodor-run-tests: name: chipyard-sodor-run-tests - needs: [make-keys, prepare-chipyard-cores] + needs: prepare-chipyard-cores runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-sodor" - uses: ./.github/actions/job-end chipyard-dmirocket-run-tests: name: chipyard-dmirocket-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-dmirocket" - uses: ./.github/actions/job-end chipyard-spiflashwrite-run-tests: name: chipyard-spiflashwrite-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-spiflashwrite" - uses: ./.github/actions/job-end chipyard-spiflashread-run-tests: name: chipyard-spiflashread-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-spiflashread" - uses: ./.github/actions/job-end chipyard-lbwif-run-tests: name: chipyard-lbwif-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-lbwif" - uses: ./.github/actions/job-end chipyard-sha3-run-tests: name: chipyard-sha3-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + tools-version: "esp-tools" + group-key: "group-accels" project-key: "chipyard-sha3" - uses: ./.github/actions/job-end chipyard-streaming-fir-run-tests: name: chipyard-streaming-fir-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-streaming-fir" - uses: ./.github/actions/job-end chipyard-streaming-passthrough-run-tests: name: chipyard-streaming-passthrough-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-streaming-passthrough" - uses: ./.github/actions/job-end chipyard-hwacha-run-tests: name: chipyard-hwacha-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + tools-version: "esp-tools" + group-key: "group-accels" project-key: "chipyard-hwacha" - uses: ./.github/actions/job-end chipyard-gemmini-run-tests: name: chipyard-gemmini-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + tools-version: "esp-tools" + group-key: "group-accels" project-key: "chipyard-gemmini" - uses: ./.github/actions/job-end chipyard-nvdla-run-tests: name: chipyard-nvdla-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-nvdla" - uses: ./.github/actions/job-end tracegen-boom-run-tests: name: tracegen-boom-run-tests - needs: [make-keys, prepare-chipyard-tracegen] + needs: prepare-chipyard-tracegen runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-tracegen" project-key: "tracegen-boom" - uses: ./.github/actions/job-end tracegen-run-tests: name: tracegen-run-tests - needs: [make-keys, prepare-chipyard-tracegen] + needs: prepare-chipyard-tracegen runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-tracegen" project-key: "tracegen" - uses: ./.github/actions/job-end icenet-run-tests: name: icenet-run-tests - needs: [make-keys, prepare-chipyard-other] + needs: prepare-chipyard-other runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start - if: steps.job-start.outputs.run_result != 'success' id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-other" project-key: "icenet" - uses: ./.github/actions/job-end testchipip-run-tests: name: testchipip-run-tests - needs: [make-keys, prepare-chipyard-other] + needs: prepare-chipyard-other runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-other" project-key: "testchipip" - uses: ./.github/actions/job-end firesim-run-tests: name: firesim-run-tests - needs: [make-keys, setup-complete] + needs: setup-complete runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "extra-tests" project-key: "firesim" run-script: "run-firesim-scala-tests.sh" - uses: ./.github/actions/job-end fireboom-run-tests: name: fireboom-run-tests - needs: [make-keys, setup-complete] + needs: setup-complete runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "extra-tests" project-key: "fireboom" run-script: "run-firesim-scala-tests.sh" - uses: ./.github/actions/job-end firesim-multiclock-run-tests: name: firesim-multiclock-run-tests - needs: [make-keys, setup-complete] + needs: setup-complete runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "extra-tests" project-key: "firesim-multiclock" run-script: "run-firesim-scala-tests.sh" - uses: ./.github/actions/job-end From 4584a37951267f2d8f252390ab566f465e8cb3ee Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:10:53 -0700 Subject: [PATCH 04/31] Unnest ssh-checkout action | Remove unnecessary SSH key additions --- .github/actions/ssh-checkout/action.yml | 14 --- .github/actions/toolchain-build/action.yml | 10 +- .github/workflows/chipyard-run-tests.yml | 137 ++++++++++++++++----- 3 files changed, 114 insertions(+), 47 deletions(-) delete mode 100644 .github/actions/ssh-checkout/action.yml diff --git a/.github/actions/ssh-checkout/action.yml b/.github/actions/ssh-checkout/action.yml deleted file mode 100644 index bed48cf6..00000000 --- a/.github/actions/ssh-checkout/action.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: ssh-checkout -description: "Checkout code and add SSH keys to access remote build server" - -runs: - using: "composite" - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index f6afb68c..5994546b 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -22,16 +22,18 @@ runs: shell: bash # brute force way to swap between riscv/esp-tools caches - - uses: actions/cache@v2 - id: toolchain-build-riscv-tools + - name: Cache riscv-tools if: ${{ inputs.tools-version == "riscv-tools" }} + uses: actions/cache@v2 + id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-install key: ${{ steps.genkey.outputs.riscvtools-cache-key }} - - uses: actions/cache@v2 - id: toolchain-build-esp-tools + - name: Cache esp-tools if: ${{ inputs.tools-version == "esp-tools" }} + uses: actions/cache@v2 + id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-install key: ${{ steps.genkey.outputs.esptools-cache-key }} diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index d908014a..aec5d8d3 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -143,7 +143,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build verilator on remote @@ -177,7 +183,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -195,7 +207,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -213,7 +231,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -232,7 +256,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -250,7 +280,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -268,7 +304,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -289,7 +331,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -308,7 +351,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -327,7 +371,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -346,7 +391,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -365,7 +411,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -384,7 +431,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -403,7 +451,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -422,7 +471,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -441,7 +491,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -460,7 +511,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -480,7 +532,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -499,7 +552,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -518,7 +572,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -538,7 +593,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -558,7 +614,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -577,7 +634,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -596,7 +654,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -615,7 +674,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -634,7 +694,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -653,7 +714,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -673,7 +740,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -693,7 +766,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Run tests From f4b88ac9135ad776adf3782041a500dc464d7a3f Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:12:05 -0700 Subject: [PATCH 05/31] Slightly more robust run_script function --- .github/scripts/defaults.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 3d08e74b..f250023b 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -9,7 +9,9 @@ run () { } run_script () { - ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" + SCRIPT=$1 + shift + ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $SCRIPT "$@" } clean () { From 897156ad5b5f7ccdfc0b4419fd8473bb054a89ec Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:25:42 -0700 Subject: [PATCH 06/31] Workaround not allowing if: within composite actions --- .github/actions/toolchain-build/action.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 5994546b..f05b5be8 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -14,29 +14,21 @@ runs: run: .github/scripts/create-hash.sh shell: bash - - name: Generate keys - id: genkey - run: | - echo "::set-output name=riscvtools-cache-key::riscv-tools-installed-${{ env.tools-cache-version }}-$(shasum riscv-tools.hash | cut -d' ' -f1)" - echo "::set-output name=esptools-cache-key::esp-tools-installed-${{ env.tools-cache-version }}-$(shasum esp-tools.hash | cut -d' ' -f1)" - shell: bash - # brute force way to swap between riscv/esp-tools caches - name: Cache riscv-tools - if: ${{ inputs.tools-version == "riscv-tools" }} uses: actions/cache@v2 id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-install - key: ${{ steps.genkey.outputs.riscvtools-cache-key }} + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(riscv-tools.hash) }} + # brute force way to swap between riscv/esp-tools caches - name: Cache esp-tools - if: ${{ inputs.tools-version == "esp-tools" }} uses: actions/cache@v2 id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-install - key: ${{ steps.genkey.outputs.esptools-cache-key }} + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(esp-tools.hash) }} - name: Build toolchain if not cached run: | From c776ebf970a79eeb40a4ef20337231ab3ce85c98 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:33:18 -0700 Subject: [PATCH 07/31] Try to search/add hash files into GH-workspace --- .github/actions/toolchain-build/action.yml | 4 ++-- .github/scripts/create-hash.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index f05b5be8..bbaf6513 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -20,7 +20,7 @@ runs: id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-install - key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(riscv-tools.hash) }} + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(**/riscv-tools.hash) }} # brute force way to swap between riscv/esp-tools caches - name: Cache esp-tools @@ -28,7 +28,7 @@ runs: id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-install - key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(esp-tools.hash) }} + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(**/esp-tools.hash) }} - name: Build toolchain if not cached run: | diff --git a/.github/scripts/create-hash.sh b/.github/scripts/create-hash.sh index dae9f25d..0fa95628 100755 --- a/.github/scripts/create-hash.sh +++ b/.github/scripts/create-hash.sh @@ -15,6 +15,6 @@ for tools in 'riscv-tools' 'esp-tools' ; do git submodule status "toolchains/${tools}" 'toolchains/libgloss' 'toolchains/qemu' | while read -r line ; do echo "${line#[!0-9a-f]}" - done > "${tools}.hash" + done > "$GITHUB_WORKSPACE/${tools}.hash" done echo "Hashfile for riscv-tools and esp-tools created in $HOME" From 7064c469bc3b6133ef55b68a52a6d0193c9ebf65 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:35:05 -0700 Subject: [PATCH 08/31] Forgot quotes --- .github/actions/toolchain-build/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index bbaf6513..6e5329a7 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -20,7 +20,7 @@ runs: id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-install - key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(**/riscv-tools.hash) }} + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/riscv-tools.hash') }} # brute force way to swap between riscv/esp-tools caches - name: Cache esp-tools @@ -28,7 +28,7 @@ runs: id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-install - key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(**/esp-tools.hash) }} + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/esp-tools.hash') }} - name: Build toolchain if not cached run: | From 9c6f4bc2ac5e50ccb11dbb66308a40c4b5146d87 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:44:04 -0700 Subject: [PATCH 09/31] Try fixing docs + Add non-rtl checks to final pass --- .github/workflows/chipyard-run-tests.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index aec5d8d3..7a50ce25 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -11,6 +11,18 @@ env: JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit jobs: + cancel-prior-workflows: + name: cancel-prior-workflows + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + commit-on-master-check: name: commit-on-master-check runs-on: ubuntu-latest @@ -62,7 +74,7 @@ jobs: sudo pip3 install -r docs/requirements.txt make -C docs html - name: Show error log from sphinx if failed - if: (steps.job-start.outputs.run_result != 'success') && ${{ failure() }} + if: steps.job-start.outputs.run_result != 'success' && ${{ failure() }} run: cat /tmp/sphinx-err*.log - uses: ./.github/actions/job-end @@ -790,7 +802,8 @@ jobs: # When adding new top level jobs, please add them to `needs` below all_tests_passed: name: "all tests passed" - needs: [chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, + needs: [commit-on-master-check, tutorial-setup-check, documentation-check, + chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, From c2647e333a67093a268e1bc5fc8962bc5a3c07b3 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 10:17:58 -0700 Subject: [PATCH 10/31] Fix doc build error | Don't skip setup-complete --- .github/workflows/chipyard-run-tests.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 7a50ce25..ffe3e95a 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -73,9 +73,7 @@ jobs: sudo apt-get install -y python3-pip sudo pip3 install -r docs/requirements.txt make -C docs html - - name: Show error log from sphinx if failed - if: steps.job-start.outputs.run_result != 'success' && ${{ failure() }} - run: cat /tmp/sphinx-err*.log + cat /tmp/sphinx-err*.log 2>/dev/null - uses: ./.github/actions/job-end install-riscv-toolchain: @@ -173,17 +171,13 @@ jobs: # # When adding new prep jobs, please add them to `needs` below setup-complete: - name: "setup complete" + name: setup-complete needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, build-extra-tests] runs-on: ubuntu-latest steps: - - uses: ./.github/actions/job-start - id: job-start - name: Set up complete - if: steps.job-start.outputs.run_result != 'success' run: echo Set up is complete! - - uses: ./.github/actions/job-end ########################################################################## From d7f7d071ed4b5c78061d60ffe9cb228ae40bfacb Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 10:24:23 -0700 Subject: [PATCH 11/31] Retry fixing doc build error --- .github/workflows/chipyard-run-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index ffe3e95a..74f46aa1 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -73,7 +73,9 @@ jobs: sudo apt-get install -y python3-pip sudo pip3 install -r docs/requirements.txt make -C docs html - cat /tmp/sphinx-err*.log 2>/dev/null + - name: Show error log from sphinx if failed + if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + run: cat /tmp/sphinx-err*.log - uses: ./.github/actions/job-end install-riscv-toolchain: From b9401dbc4b2bb19f879c335a601d4dfd8b836c2c Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 13:43:27 -0700 Subject: [PATCH 12/31] Mockup self-hosted runners + Bugfix run-tests by init-submods --- .github/actions/run-tests/action.yml | 4 + .github/scripts/defaults.sh | 27 +- .github/scripts/do-rtl-build.sh | 58 +- .github/scripts/install-verilator.sh | 20 +- .github/scripts/run-firesim-scala-tests.sh | 50 +- .github/workflows/chipyard-run-tests.yml | 1544 ++++++++++---------- 6 files changed, 815 insertions(+), 888 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index f0aa9d25..892ea699 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -20,6 +20,10 @@ inputs: runs: using: "composite" steps: + - name: Init submodules (since only the RTL is cached) + run: ./scripts/init-submodules-no-riscv-tools.sh + shell: bash + - name: Build toolchain uses: ./.github/actions/toolchain-build with: diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index f250023b..22307531 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -1,24 +1,5 @@ #!/bin/bash -copy () { - rsync -azp -e 'ssh' --exclude '.git' $1 $2 -} - -run () { - ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER $@ -} - -run_script () { - SCRIPT=$1 - shift - ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $SCRIPT "$@" -} - -clean () { - # remove remote work dir - run "rm -rf $REMOTE_WORK_DIR" -} - # make parallelism CI_MAKE_NPROC=8 # chosen based on a 24c system shared with 1 other project @@ -35,10 +16,10 @@ CURRENT_BRANCH=$(git branch --show-current) HOME=`pwd` REMOTE_PREFIX=$CI_DIR/${GITHUB_REPOSITORY#*/}-$CURRENT_BRANCH -REMOTE_WORK_DIR=$REMOTE_PREFIX-$GITHUB_SHA-$GITHUB_JOB -REMOTE_RISCV_DIR=$REMOTE_WORK_DIR/riscv-tools-install -REMOTE_ESP_DIR=$REMOTE_WORK_DIR/esp-tools-install -REMOTE_CHIPYARD_DIR=$REMOTE_WORK_DIR/chipyard +REMOTE_WORK_DIR=$GITHUB_WORKSPACE +REMOTE_RISCV_DIR=$GITHUB_WORKSPACE/riscv-tools-install +REMOTE_ESP_DIR=$GITHUB_WORKSPACE/esp-tools-install +REMOTE_CHIPYARD_DIR=$GITHUB_WORKSPACE REMOTE_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/verilator REMOTE_FIRESIM_DIR=$REMOTE_CHIPYARD_DIR/sims/firesim/sim REMOTE_FPGA_DIR=$REMOTE_CHIPYARD_DIR/fpga diff --git a/.github/scripts/do-rtl-build.sh b/.github/scripts/do-rtl-build.sh index 3a5d56ca..e37cc863 100755 --- a/.github/scripts/do-rtl-build.sh +++ b/.github/scripts/do-rtl-build.sh @@ -17,45 +17,22 @@ source $SCRIPT_DIR/defaults.sh # call clean on exit trap clean EXIT -cd $LOCAL_CHIPYARD_DIR +cd $REMOTE_CHIPYARD_DIR ./scripts/init-submodules-no-riscv-tools.sh ./scripts/init-fpga.sh -# replace the workspace dir with a local dir so you can copy around -sed -i -E 's/(workspace=).*(\/tools)/\1$PWD\2/g' .sbtopts - -# set stricthostkeychecking to no (must happen before rsync) -run "echo \"Ping $SERVER\"" - -clean - -# copy over riscv/esp-tools, and chipyard to remote -run "mkdir -p $REMOTE_CHIPYARD_DIR" -copy $LOCAL_CHIPYARD_DIR/ $SERVER:$REMOTE_CHIPYARD_DIR - -run "cp -r ~/.ivy2 $REMOTE_WORK_DIR" -run "cp -r ~/.sbt $REMOTE_WORK_DIR" - TOOLS_DIR=$REMOTE_RISCV_DIR LD_LIB_DIR=$REMOTE_RISCV_DIR/lib if [ $1 = "group-accels" ]; then - export RISCV=$LOCAL_ESP_DIR - export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib + export RISCV=$REMOTE_ESP_DIR + export LD_LIBRARY_PATH=$REMOTE_ESP_DIR/lib export PATH=$RISCV/bin:$PATH - GEMMINI_SOFTWARE_DIR=$LOCAL_SIM_DIR/../../generators/gemmini/software/gemmini-rocc-tests - cd $LOCAL_SIM_DIR/../../generators/gemmini/software + GEMMINI_SOFTWARE_DIR=$REMOTE_CHIPYARD_DIR/generators/gemmini/software/gemmini-rocc-tests + cd $GEMMINI_SOFTWARE_DIR git submodule update --init --recursive gemmini-rocc-tests cd gemmini-rocc-tests ./build.sh - - TOOLS_DIR=$REMOTE_ESP_DIR - LD_LIB_DIR=$REMOTE_ESP_DIR/lib - run "mkdir -p $REMOTE_ESP_DIR" - copy $LOCAL_ESP_DIR/ $SERVER:$REMOTE_ESP_DIR -else - run "mkdir -p $REMOTE_RISCV_DIR" - copy $LOCAL_RISCV_DIR/ $SERVER:$REMOTE_RISCV_DIR fi # choose what make dir to use @@ -69,27 +46,20 @@ case $2 in esac # enter the verilator directory and build the specific config on remote server -run "export RISCV=\"$TOOLS_DIR\"; \ - make -C $REMOTE_MAKE_DIR clean;" +export RISCV=$TOOLS_DIR +make -C $REMOTE_MAKE_DIR clean read -a keys <<< ${grouping[$1]} # need to set the PATH to use the new verilator (with the new verilator root) for key in "${keys[@]}" do - run "export RISCV=\"$TOOLS_DIR\"; \ - export LD_LIBRARY_PATH=\"$LD_LIB_DIR\"; \ - export PATH=\"$REMOTE_VERILATOR_DIR/bin:\$PATH\"; \ - export VERILATOR_ROOT=\"$REMOTE_VERILATOR_DIR\"; \ - export COURSIER_CACHE=\"$REMOTE_WORK_DIR/.coursier-cache\"; \ - make -j$REMOTE_MAKE_NPROC -C $REMOTE_MAKE_DIR FIRRTL_LOGLEVEL=info JAVA_OPTS=\"$REMOTE_JAVA_OPTS\" SBT_OPTS=\"$REMOTE_SBT_OPTS\" ${mapping[$key]}" + export RISCV=$TOOLS_DIR + export LD_LIBRARY_PATH=$LD_LIB_DIR + export PATH=$REMOTE_VERILATOR_DIR/bin:$PATH + export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR + export COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache + make -j$REMOTE_MAKE_NPROC -C $REMOTE_MAKE_DIR FIRRTL_LOGLEVEL=info JAVA_OPTS=$REMOTE_JAVA_OPTS SBT_OPTS=$REMOTE_SBT_OPTS ${mapping[$key]} done -run "rm -rf $REMOTE_CHIPYARD_DIR/project" - -# choose to copy back results -if [ $2 = "sim" ]; then - # copy back the final build - mkdir -p $LOCAL_CHIPYARD_DIR - copy $SERVER:$REMOTE_CHIPYARD_DIR/ $LOCAL_CHIPYARD_DIR -fi +rm -rf $REMOTE_CHIPYARD_DIR/project diff --git a/.github/scripts/install-verilator.sh b/.github/scripts/install-verilator.sh index f667b365..1159fc47 100755 --- a/.github/scripts/install-verilator.sh +++ b/.github/scripts/install-verilator.sh @@ -10,16 +10,14 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh # clean older directories (delete prior directories related to this branch also) -run_script $LOCAL_CHIPYARD_DIR/.github/scripts/clean-old-files.sh $CI_DIR -run "rm -rf $REMOTE_PREFIX*" -# set stricthostkeychecking to no (must happen before rsync) -run "echo \"Ping $SERVER\"" +$SCRIPT_DIR/clean-old-files.sh $CI_DIR +rm -rf $REMOTE_PREFIX* -run "git clone http://git.veripool.org/git/verilator $REMOTE_VERILATOR_DIR; \ - cd $REMOTE_VERILATOR_DIR; \ - git checkout $VERILATOR_VERSION; \ - autoconf; \ - export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR; \ - ./configure; \ - make -j$REMOTE_MAKE_NPROC;" +git clone http://git.veripool.org/git/verilator $REMOTE_VERILATOR_DIR +cd $REMOTE_VERILATOR_DIR +git checkout $VERILATOR_VERSION +autoconf +export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR +./configure +make -j$REMOTE_MAKE_NPROC diff --git a/.github/scripts/run-firesim-scala-tests.sh b/.github/scripts/run-firesim-scala-tests.sh index 55a22365..9b329fa7 100755 --- a/.github/scripts/run-firesim-scala-tests.sh +++ b/.github/scripts/run-firesim-scala-tests.sh @@ -13,54 +13,36 @@ source $SCRIPT_DIR/defaults.sh # call clean on exit trap clean EXIT -export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +export RISCV="$REMOTE_RISCV_DIR" export LD_LIBRARY_PATH="$RISCV/lib" export PATH="$RISCV/bin:$PATH" # Directory locations for handling firesim-local installations of libelf/libdwarf # This would generally be handled by build-setup.sh/firesim-setup.sh firesim_sysroot=lib-install -local_firesim_sysroot=$LOCAL_FIRESIM_DIR/$firesim_sysroot remote_firesim_sysroot=$REMOTE_FIRESIM_DIR/$firesim_sysroot -cd $LOCAL_CHIPYARD_DIR +cd $REMOTE_CHIPYARD_DIR ./scripts/init-submodules-no-riscv-tools.sh -cd $LOCAL_CHIPYARD_DIR/sims/firesim/sim/firesim-lib/src/main/cc/lib +cd $REMOTE_CHIPYARD_DIR/sims/firesim/sim/firesim-lib/src/main/cc/lib git submodule update --init elfutils libdwarf -cd $LOCAL_CHIPYARD_DIR/sims/firesim -mkdir -p $local_firesim_sysroot -./scripts/build-libelf.sh $local_firesim_sysroot -./scripts/build-libdwarf.sh $local_firesim_sysroot -cd $LOCAL_CHIPYARD_DIR +cd $REMOTE_CHIPYARD_DIR/sims/firesim +mkdir -p $remote_firesim_sysroot +./scripts/build-libelf.sh $remote_firesim_sysroot +./scripts/build-libdwarf.sh $remote_firesim_sysroot +cd $REMOTE_CHIPYARD_DIR -# replace the workspace dir with a local dir so you can copy around -sed -i -E 's/(workspace=).*(\/tools)/\1$PWD\2/g' .sbtopts - -make -C $LOCAL_CHIPYARD_DIR/tools/dromajo/dromajo-src/src - -# set stricthostkeychecking to no (must happen before rsync) -run "echo \"Ping $SERVER\"" - -clean - -# copy over riscv/esp-tools, and chipyard to remote -run "mkdir -p $REMOTE_CHIPYARD_DIR" -run "mkdir -p $REMOTE_RISCV_DIR" -copy $LOCAL_CHIPYARD_DIR/ $SERVER:$REMOTE_CHIPYARD_DIR -copy $LOCAL_RISCV_DIR/ $SERVER:$REMOTE_RISCV_DIR - -run "cp -r ~/.ivy2 $REMOTE_WORK_DIR" -run "cp -r ~/.sbt $REMOTE_WORK_DIR" +make -C $REMOTE_CHIPYARD_DIR/tools/dromajo/dromajo-src/src TOOLS_DIR=$REMOTE_RISCV_DIR LD_LIB_DIR=$remote_firesim_sysroot/lib:$REMOTE_RISCV_DIR/lib # Run Firesim Scala Tests -run "export RISCV=\"$TOOLS_DIR\"; \ - export LD_LIBRARY_PATH=\"$LD_LIB_DIR\"; \ - export FIRESIM_ENV_SOURCED=1; \ - export PATH=\"$REMOTE_VERILATOR_DIR/bin:\$PATH\"; \ - export VERILATOR_ROOT=\"$REMOTE_VERILATOR_DIR\"; \ - export COURSIER_CACHE=\"$REMOTE_WORK_DIR/.coursier-cache\"; \ - make -C $REMOTE_FIRESIM_DIR JAVA_OPTS=\"$REMOTE_JAVA_OPTS\" SBT_OPTS=\"$REMOTE_SBT_OPTS\" testOnly ${mapping[$1]}" +export RISCV=$TOOLS_DIR +export LD_LIBRARY_PATH=$LD_LIB_DIR +export FIRESIM_ENV_SOURCED=1; +export PATH=$REMOTE_VERILATOR_DIR/bin:$PATH +export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR +export COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache +make -C $REMOTE_FIRESIM_DIR JAVA_OPTS=$REMOTE_JAVA_OPTS SBT_OPTS=$REMOTE_SBT_OPTS testOnly ${mapping[$1]} diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 74f46aa1..753bd66c 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -23,791 +23,783 @@ jobs: with: access_token: ${{ github.token }} - commit-on-master-check: - name: commit-on-master-check - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Check commits of each submodule - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - uses: ./.github/actions/job-end - - tutorial-setup-check: - name: tutorial-setup-check - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Check that the tutorial-setup patches apply - if: steps.job-start.outputs.run_result != 'success' - run: scripts/tutorial-setup.sh - - uses: ./.github/actions/job-end - - documentation-check: - name: documentation-check - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Check that documentation builds with no warnings/errors - if: steps.job-start.outputs.run_result != 'success' - run: | - sudo apt-get update -y - sudo apt-get install -y python3-pip - sudo pip3 install -r docs/requirements.txt - make -C docs html - - name: Show error log from sphinx if failed - if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - run: cat /tmp/sphinx-err*.log - - uses: ./.github/actions/job-end - - install-riscv-toolchain: - name: install-riscv-toolchain - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - - uses: ./.github/actions/job-end - - install-esp-toolchain: - name: install-esp-toolchain - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - - uses: ./.github/actions/job-end - - build-extra-tests: - name: build-extra-tests - needs: install-riscv-toolchain - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - - name: Generate keys - if: steps.job-start.outputs.run_result != 'success' - id: genkey - run: | - echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - - uses: actions/cache@v2 - if: steps.job-start.outputs.run_result != 'success' - id: build-extra-tools-cache - with: - path: extra-tests-install - key: ${{ steps.genkey.outputs.extra-tests-cache-key }} - restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} - - name: Build extra tests - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/build-extra-tests.sh - - uses: ./.github/actions/job-end + # commit-on-master-check: + # name: commit-on-master-check + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Check commits of each submodule + # if: steps.job-start.outputs.run_result != 'success' + # run: .github/scripts/check-commit.sh + # - uses: ./.github/actions/job-end + # + # tutorial-setup-check: + # name: tutorial-setup-check + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Check that the tutorial-setup patches apply + # if: steps.job-start.outputs.run_result != 'success' + # run: scripts/tutorial-setup.sh + # - uses: ./.github/actions/job-end + # + # documentation-check: + # name: documentation-check + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Check that documentation builds with no warnings/errors + # if: steps.job-start.outputs.run_result != 'success' + # run: | + # sudo apt-get update -y + # sudo apt-get install -y python3-pip + # sudo pip3 install -r docs/requirements.txt + # make -C docs html + # - name: Show error log from sphinx if failed + # if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + # run: cat /tmp/sphinx-err*.log + # - uses: ./.github/actions/job-end + # + # install-riscv-toolchain: + # name: install-riscv-toolchain + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build default RISC-V toolchain + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # with: + # tools-version: 'riscv-tools' + # - uses: ./.github/actions/job-end + # + # install-esp-toolchain: + # name: install-esp-toolchain + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build ESP RISC-V toolchain + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # with: + # tools-version: 'esp-tools' + # - uses: ./.github/actions/job-end + # + # build-extra-tests: + # name: build-extra-tests + # needs: install-riscv-toolchain + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build default RISC-V toolchain + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # with: + # tools-version: 'riscv-tools' + # - name: Generate keys + # if: steps.job-start.outputs.run_result != 'success' + # id: genkey + # run: | + # echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" + # - uses: actions/cache@v2 + # if: steps.job-start.outputs.run_result != 'success' + # id: build-extra-tools-cache + # with: + # path: extra-tests-install + # key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + # restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} + # - name: Build extra tests + # if: steps.job-start.outputs.run_result != 'success' + # run: .github/scripts/build-extra-tests.sh + # - uses: ./.github/actions/job-end install-verilator: name: install-verilator - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - - name: Build verilator on remote + - name: Build verilator on self-hosted if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/install-verilator.sh - uses: ./.github/actions/job-end - # Sentinel job to simplify how we specify which that basic setup is complete - # - # When adding new prep jobs, please add them to `needs` below - setup-complete: - name: setup-complete - needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, - build-extra-tests] - runs-on: ubuntu-latest - steps: - - name: Set up complete - run: echo Set up is complete! - - ########################################################################## - - prepare-chipyard-cores: - name: prepare-chipyard-cores - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - - uses: ./.github/actions/job-end - - prepare-chipyard-peripherals: - name: prepare-chipyard-peripherals - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - - uses: ./.github/actions/job-end - - prepare-chipyard-accels: - name: prepare-chipyard-accels - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - tools-version: "esp-tools" - group-key: "group-accels" - - uses: ./.github/actions/job-end - - prepare-chipyard-tracegen: - name: prepare-chipyard-tracegen - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - - uses: ./.github/actions/job-end - - prepare-chipyard-other: - name: prepare-chipyard-other - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - - uses: ./.github/actions/job-end - - prepare-chipyard-fpga: - name: prepare-chipyard-fpga - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-fpga" - build-type: "fpga" - - uses: ./.github/actions/job-end - - ########################################################################## - - chipyard-rocket-run-tests: - name: chipyard-rocket-run-tests - needs: prepare-chipyard-cores - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-rocket" - - uses: ./.github/actions/job-end - - chipyard-hetero-run-tests: - name: chipyard-hetero-run-tests - needs: prepare-chipyard-cores - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-hetero" - - uses: ./.github/actions/job-end - - chipyard-boom-run-tests: - name: chipyard-boom-run-tests - needs: prepare-chipyard-cores - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-boom" - - uses: ./.github/actions/job-end - - chipyard-cva6-run-tests: - name: chipyard-cva6-run-tests - needs: prepare-chipyard-cores - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-cva6" - - uses: ./.github/actions/job-end - - chipyard-sodor-run-tests: - name: chipyard-sodor-run-tests - needs: prepare-chipyard-cores - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-sodor" - - uses: ./.github/actions/job-end - - chipyard-dmirocket-run-tests: - name: chipyard-dmirocket-run-tests - needs: prepare-chipyard-peripherals - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-dmirocket" - - uses: ./.github/actions/job-end - - chipyard-spiflashwrite-run-tests: - name: chipyard-spiflashwrite-run-tests - needs: prepare-chipyard-peripherals - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-spiflashwrite" - - uses: ./.github/actions/job-end - - chipyard-spiflashread-run-tests: - name: chipyard-spiflashread-run-tests - needs: prepare-chipyard-peripherals - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-spiflashread" - - uses: ./.github/actions/job-end - - chipyard-lbwif-run-tests: - name: chipyard-lbwif-run-tests - needs: prepare-chipyard-peripherals - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-lbwif" - - uses: ./.github/actions/job-end - - chipyard-sha3-run-tests: - name: chipyard-sha3-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-sha3" - - uses: ./.github/actions/job-end - - chipyard-streaming-fir-run-tests: - name: chipyard-streaming-fir-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-streaming-fir" - - uses: ./.github/actions/job-end - - chipyard-streaming-passthrough-run-tests: - name: chipyard-streaming-passthrough-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-streaming-passthrough" - - uses: ./.github/actions/job-end - - chipyard-hwacha-run-tests: - name: chipyard-hwacha-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-hwacha" - - uses: ./.github/actions/job-end - - chipyard-gemmini-run-tests: - name: chipyard-gemmini-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-gemmini" - - uses: ./.github/actions/job-end - - chipyard-nvdla-run-tests: - name: chipyard-nvdla-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-nvdla" - - uses: ./.github/actions/job-end - - tracegen-boom-run-tests: - name: tracegen-boom-run-tests - needs: prepare-chipyard-tracegen - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-tracegen" - project-key: "tracegen-boom" - - uses: ./.github/actions/job-end - - tracegen-run-tests: - name: tracegen-run-tests - needs: prepare-chipyard-tracegen - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-tracegen" - project-key: "tracegen" - - uses: ./.github/actions/job-end - - icenet-run-tests: - name: icenet-run-tests - needs: prepare-chipyard-other - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-other" - project-key: "icenet" - - uses: ./.github/actions/job-end - - testchipip-run-tests: - name: testchipip-run-tests - needs: prepare-chipyard-other - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-other" - project-key: "testchipip" - - uses: ./.github/actions/job-end - - firesim-run-tests: - name: firesim-run-tests - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "firesim" - run-script: "run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - fireboom-run-tests: - name: fireboom-run-tests - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "fireboom" - run-script: "run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - firesim-multiclock-run-tests: - name: firesim-multiclock-run-tests - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "firesim-multiclock" - run-script: "run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - # Sentinel job to simplify how we specify which checks need to pass in branch - # protection and in Mergify - # - # When adding new top level jobs, please add them to `needs` below - all_tests_passed: - name: "all tests passed" - needs: [commit-on-master-check, tutorial-setup-check, documentation-check, - chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, - chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, - chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, - chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, - chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, - tracegen-boom-run-tests, tracegen-run-tests, - icenet-run-tests, testchipip-run-tests, - prepare-chipyard-fpga, - firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - runs-on: ubuntu-latest - steps: - - run: echo Success! + # # Sentinel job to simplify how we specify which that basic setup is complete + # # + # # When adding new prep jobs, please add them to `needs` below + # setup-complete: + # name: setup-complete + # needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, + # build-extra-tests] + # runs-on: ubuntu-latest + # steps: + # - name: Set up complete + # run: echo Set up is complete! + # + # ########################################################################## + # + # prepare-chipyard-cores: + # name: prepare-chipyard-cores + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Install SSH key + # uses: shimataro/ssh-key-action@v2 + # with: + # key: ${{ secrets.SERVERKEY }} + # known_hosts: ${{ secrets.BUILDSERVER }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-cores" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-peripherals: + # name: prepare-chipyard-peripherals + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Install SSH key + # uses: shimataro/ssh-key-action@v2 + # with: + # key: ${{ secrets.SERVERKEY }} + # known_hosts: ${{ secrets.BUILDSERVER }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-peripherals" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-accels: + # name: prepare-chipyard-accels + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Install SSH key + # uses: shimataro/ssh-key-action@v2 + # with: + # key: ${{ secrets.SERVERKEY }} + # known_hosts: ${{ secrets.BUILDSERVER }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # tools-version: "esp-tools" + # group-key: "group-accels" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-tracegen: + # name: prepare-chipyard-tracegen + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Install SSH key + # uses: shimataro/ssh-key-action@v2 + # with: + # key: ${{ secrets.SERVERKEY }} + # known_hosts: ${{ secrets.BUILDSERVER }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-tracegen" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-other: + # name: prepare-chipyard-other + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Install SSH key + # uses: shimataro/ssh-key-action@v2 + # with: + # key: ${{ secrets.SERVERKEY }} + # known_hosts: ${{ secrets.BUILDSERVER }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-other" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-fpga: + # name: prepare-chipyard-fpga + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Install SSH key + # uses: shimataro/ssh-key-action@v2 + # with: + # key: ${{ secrets.SERVERKEY }} + # known_hosts: ${{ secrets.BUILDSERVER }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-fpga" + # build-type: "fpga" + # - uses: ./.github/actions/job-end + # + # ########################################################################## + # + # chipyard-rocket-run-tests: + # name: chipyard-rocket-run-tests + # needs: prepare-chipyard-cores + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-rocket" + # - uses: ./.github/actions/job-end + # + # chipyard-hetero-run-tests: + # name: chipyard-hetero-run-tests + # needs: prepare-chipyard-cores + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-hetero" + # - uses: ./.github/actions/job-end + # + # chipyard-boom-run-tests: + # name: chipyard-boom-run-tests + # needs: prepare-chipyard-cores + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-boom" + # - uses: ./.github/actions/job-end + # + # chipyard-cva6-run-tests: + # name: chipyard-cva6-run-tests + # needs: prepare-chipyard-cores + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-cva6" + # - uses: ./.github/actions/job-end + # + # chipyard-sodor-run-tests: + # name: chipyard-sodor-run-tests + # needs: prepare-chipyard-cores + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-sodor" + # - uses: ./.github/actions/job-end + # + # chipyard-dmirocket-run-tests: + # name: chipyard-dmirocket-run-tests + # needs: prepare-chipyard-peripherals + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-peripherals" + # project-key: "chipyard-dmirocket" + # - uses: ./.github/actions/job-end + # + # chipyard-spiflashwrite-run-tests: + # name: chipyard-spiflashwrite-run-tests + # needs: prepare-chipyard-peripherals + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-peripherals" + # project-key: "chipyard-spiflashwrite" + # - uses: ./.github/actions/job-end + # + # chipyard-spiflashread-run-tests: + # name: chipyard-spiflashread-run-tests + # needs: prepare-chipyard-peripherals + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-peripherals" + # project-key: "chipyard-spiflashread" + # - uses: ./.github/actions/job-end + # + # chipyard-lbwif-run-tests: + # name: chipyard-lbwif-run-tests + # needs: prepare-chipyard-peripherals + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-peripherals" + # project-key: "chipyard-lbwif" + # - uses: ./.github/actions/job-end + # + # chipyard-sha3-run-tests: + # name: chipyard-sha3-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # tools-version: "esp-tools" + # group-key: "group-accels" + # project-key: "chipyard-sha3" + # - uses: ./.github/actions/job-end + # + # chipyard-streaming-fir-run-tests: + # name: chipyard-streaming-fir-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-accels" + # project-key: "chipyard-streaming-fir" + # - uses: ./.github/actions/job-end + # + # chipyard-streaming-passthrough-run-tests: + # name: chipyard-streaming-passthrough-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-accels" + # project-key: "chipyard-streaming-passthrough" + # - uses: ./.github/actions/job-end + # + # chipyard-hwacha-run-tests: + # name: chipyard-hwacha-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # tools-version: "esp-tools" + # group-key: "group-accels" + # project-key: "chipyard-hwacha" + # - uses: ./.github/actions/job-end + # + # chipyard-gemmini-run-tests: + # name: chipyard-gemmini-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # tools-version: "esp-tools" + # group-key: "group-accels" + # project-key: "chipyard-gemmini" + # - uses: ./.github/actions/job-end + # + # chipyard-nvdla-run-tests: + # name: chipyard-nvdla-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-accels" + # project-key: "chipyard-nvdla" + # - uses: ./.github/actions/job-end + # + # tracegen-boom-run-tests: + # name: tracegen-boom-run-tests + # needs: prepare-chipyard-tracegen + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-tracegen" + # project-key: "tracegen-boom" + # - uses: ./.github/actions/job-end + # + # tracegen-run-tests: + # name: tracegen-run-tests + # needs: prepare-chipyard-tracegen + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-tracegen" + # project-key: "tracegen" + # - uses: ./.github/actions/job-end + # + # icenet-run-tests: + # name: icenet-run-tests + # needs: prepare-chipyard-other + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-other" + # project-key: "icenet" + # - uses: ./.github/actions/job-end + # + # testchipip-run-tests: + # name: testchipip-run-tests + # needs: prepare-chipyard-other + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-other" + # project-key: "testchipip" + # - uses: ./.github/actions/job-end + # + # firesim-run-tests: + # name: firesim-run-tests + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Install SSH key + # uses: shimataro/ssh-key-action@v2 + # with: + # key: ${{ secrets.SERVERKEY }} + # known_hosts: ${{ secrets.BUILDSERVER }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "extra-tests" + # project-key: "firesim" + # run-script: "run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # fireboom-run-tests: + # name: fireboom-run-tests + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Install SSH key + # uses: shimataro/ssh-key-action@v2 + # with: + # key: ${{ secrets.SERVERKEY }} + # known_hosts: ${{ secrets.BUILDSERVER }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "extra-tests" + # project-key: "fireboom" + # run-script: "run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # firesim-multiclock-run-tests: + # name: firesim-multiclock-run-tests + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - name: Install SSH key + # uses: shimataro/ssh-key-action@v2 + # with: + # key: ${{ secrets.SERVERKEY }} + # known_hosts: ${{ secrets.BUILDSERVER }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "extra-tests" + # project-key: "firesim-multiclock" + # run-script: "run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # # Sentinel job to simplify how we specify which checks need to pass in branch + # # protection and in Mergify + # # + # # When adding new top level jobs, please add them to `needs` below + # all_tests_passed: + # name: "all tests passed" + # needs: [commit-on-master-check, tutorial-setup-check, documentation-check, + # chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, + # chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, + # chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, + # chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, + # chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, + # tracegen-boom-run-tests, tracegen-run-tests, + # icenet-run-tests, testchipip-run-tests, + # prepare-chipyard-fpga, + # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + # runs-on: ubuntu-latest + # steps: + # - run: echo Success! From 43430cb8bc05edd6d8d713e292789b8e48b23fd6 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 13:56:07 -0700 Subject: [PATCH 13/31] Retry --- .github/scripts/defaults.sh | 5 ++-- .github/workflows/chipyard-run-tests.yml | 34 ++++++++++++------------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 22307531..04ccd331 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -8,13 +8,12 @@ REMOTE_MAKE_NPROC=4 # verilator version VERILATOR_VERSION=v4.034 -# remote variables - +HOME=$GITHUB_WORKSPACE CURRENT_BRANCH=$(git branch --show-current) +# remote variables # CI_DIR is defined externally based on the GH repository secret BUILDDIR -HOME=`pwd` REMOTE_PREFIX=$CI_DIR/${GITHUB_REPOSITORY#*/}-$CURRENT_BRANCH REMOTE_WORK_DIR=$GITHUB_WORKSPACE REMOTE_RISCV_DIR=$GITHUB_WORKSPACE/riscv-tools-install diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 753bd66c..61b3bfc4 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -78,23 +78,23 @@ jobs: # run: cat /tmp/sphinx-err*.log # - uses: ./.github/actions/job-end # - # install-riscv-toolchain: - # name: install-riscv-toolchain - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build default RISC-V toolchain - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # with: - # tools-version: 'riscv-tools' - # - uses: ./.github/actions/job-end + install-riscv-toolchain: + name: install-riscv-toolchain + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + - uses: ./.github/actions/job-end # # install-esp-toolchain: # name: install-esp-toolchain From ca4e9563b9829728e198499fe2752a4e06313d1b Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 14:15:46 -0700 Subject: [PATCH 14/31] Clearer script naming | Renable all CI --- .github/actions/prepare-rtl/action.yml | 2 +- .github/scripts/create-hash.sh | 4 +- ...do-rtl-build.sh => remote-do-rtl-build.sh} | 0 ...rilator.sh => remote-install-verilator.sh} | 3 +- ...s.sh => remote-run-firesim-scala-tests.sh} | 15 +- .github/workflows/chipyard-run-tests.yml | 1487 ++++++++--------- 6 files changed, 745 insertions(+), 766 deletions(-) rename .github/scripts/{do-rtl-build.sh => remote-do-rtl-build.sh} (100%) rename .github/scripts/{install-verilator.sh => remote-install-verilator.sh} (93%) rename .github/scripts/{run-firesim-scala-tests.sh => remote-run-firesim-scala-tests.sh} (77%) diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index 89dbb431..45996a90 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -12,7 +12,7 @@ inputs: build-script: description: rtl build script to use required: false - default: "do-rtl-build.sh" + default: "remote-do-rtl-build.sh" build-type: description: type of build required: false diff --git a/.github/scripts/create-hash.sh b/.github/scripts/create-hash.sh index 0fa95628..f64c0696 100755 --- a/.github/scripts/create-hash.sh +++ b/.github/scripts/create-hash.sh @@ -15,6 +15,6 @@ for tools in 'riscv-tools' 'esp-tools' ; do git submodule status "toolchains/${tools}" 'toolchains/libgloss' 'toolchains/qemu' | while read -r line ; do echo "${line#[!0-9a-f]}" - done > "$GITHUB_WORKSPACE/${tools}.hash" + done > "${tools}.hash" done -echo "Hashfile for riscv-tools and esp-tools created in $HOME" +echo "Hashfile for riscv-tools and esp-tools created in $PWD" diff --git a/.github/scripts/do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh similarity index 100% rename from .github/scripts/do-rtl-build.sh rename to .github/scripts/remote-do-rtl-build.sh diff --git a/.github/scripts/install-verilator.sh b/.github/scripts/remote-install-verilator.sh similarity index 93% rename from .github/scripts/install-verilator.sh rename to .github/scripts/remote-install-verilator.sh index 1159fc47..b244614e 100755 --- a/.github/scripts/install-verilator.sh +++ b/.github/scripts/remote-install-verilator.sh @@ -1,6 +1,6 @@ #!/bin/bash -# move verilator to the remote server +# install verilator # turn echo on and error on earliest command set -ex @@ -10,7 +10,6 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh # clean older directories (delete prior directories related to this branch also) - $SCRIPT_DIR/clean-old-files.sh $CI_DIR rm -rf $REMOTE_PREFIX* diff --git a/.github/scripts/run-firesim-scala-tests.sh b/.github/scripts/remote-run-firesim-scala-tests.sh similarity index 77% rename from .github/scripts/run-firesim-scala-tests.sh rename to .github/scripts/remote-run-firesim-scala-tests.sh index 9b329fa7..916c7ca5 100755 --- a/.github/scripts/run-firesim-scala-tests.sh +++ b/.github/scripts/remote-run-firesim-scala-tests.sh @@ -10,33 +10,28 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh -# call clean on exit -trap clean EXIT - export RISCV="$REMOTE_RISCV_DIR" export LD_LIBRARY_PATH="$RISCV/lib" export PATH="$RISCV/bin:$PATH" # Directory locations for handling firesim-local installations of libelf/libdwarf # This would generally be handled by build-setup.sh/firesim-setup.sh -firesim_sysroot=lib-install -remote_firesim_sysroot=$REMOTE_FIRESIM_DIR/$firesim_sysroot +REMOTE_FIRESIM_SYSROOT=$REMOTE_FIRESIM_DIR/lib-install -cd $REMOTE_CHIPYARD_DIR ./scripts/init-submodules-no-riscv-tools.sh cd $REMOTE_CHIPYARD_DIR/sims/firesim/sim/firesim-lib/src/main/cc/lib git submodule update --init elfutils libdwarf cd $REMOTE_CHIPYARD_DIR/sims/firesim -mkdir -p $remote_firesim_sysroot -./scripts/build-libelf.sh $remote_firesim_sysroot -./scripts/build-libdwarf.sh $remote_firesim_sysroot +mkdir -p $REMOTE_FIRESIM_SYSROOT +./scripts/build-libelf.sh $REMOTE_FIRESIM_SYSROOT +./scripts/build-libdwarf.sh $REMOTE_FIRESIM_SYSROOT cd $REMOTE_CHIPYARD_DIR make -C $REMOTE_CHIPYARD_DIR/tools/dromajo/dromajo-src/src TOOLS_DIR=$REMOTE_RISCV_DIR -LD_LIB_DIR=$remote_firesim_sysroot/lib:$REMOTE_RISCV_DIR/lib +LD_LIB_DIR=$REMOTE_FIRESIM_SYSROOT/lib:$REMOTE_RISCV_DIR/lib # Run Firesim Scala Tests export RISCV=$TOOLS_DIR diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 61b3bfc4..35ea5c45 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -23,64 +23,64 @@ jobs: with: access_token: ${{ github.token }} - # commit-on-master-check: - # name: commit-on-master-check - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Check commits of each submodule - # if: steps.job-start.outputs.run_result != 'success' - # run: .github/scripts/check-commit.sh - # - uses: ./.github/actions/job-end - # - # tutorial-setup-check: - # name: tutorial-setup-check - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Check that the tutorial-setup patches apply - # if: steps.job-start.outputs.run_result != 'success' - # run: scripts/tutorial-setup.sh - # - uses: ./.github/actions/job-end - # - # documentation-check: - # name: documentation-check - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Check that documentation builds with no warnings/errors - # if: steps.job-start.outputs.run_result != 'success' - # run: | - # sudo apt-get update -y - # sudo apt-get install -y python3-pip - # sudo pip3 install -r docs/requirements.txt - # make -C docs html - # - name: Show error log from sphinx if failed - # if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - # run: cat /tmp/sphinx-err*.log - # - uses: ./.github/actions/job-end - # + commit-on-master-check: + name: commit-on-master-check + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Check commits of each submodule + if: steps.job-start.outputs.run_result != 'success' + run: .github/scripts/check-commit.sh + - uses: ./.github/actions/job-end + + tutorial-setup-check: + name: tutorial-setup-check + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Check that the tutorial-setup patches apply + if: steps.job-start.outputs.run_result != 'success' + run: scripts/tutorial-setup.sh + - uses: ./.github/actions/job-end + + documentation-check: + name: documentation-check + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Check that documentation builds with no warnings/errors + if: steps.job-start.outputs.run_result != 'success' + run: | + sudo apt-get update -y + sudo apt-get install -y python3-pip + sudo pip3 install -r docs/requirements.txt + make -C docs html + - name: Show error log from sphinx if failed + if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + run: cat /tmp/sphinx-err*.log + - uses: ./.github/actions/job-end + install-riscv-toolchain: name: install-riscv-toolchain - runs-on: ubuntu-latest + runs-on: self-hosted container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash @@ -95,58 +95,58 @@ jobs: with: tools-version: 'riscv-tools' - uses: ./.github/actions/job-end - # - # install-esp-toolchain: - # name: install-esp-toolchain - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build ESP RISC-V toolchain - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # with: - # tools-version: 'esp-tools' - # - uses: ./.github/actions/job-end - # - # build-extra-tests: - # name: build-extra-tests - # needs: install-riscv-toolchain - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build default RISC-V toolchain - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # with: - # tools-version: 'riscv-tools' - # - name: Generate keys - # if: steps.job-start.outputs.run_result != 'success' - # id: genkey - # run: | - # echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - # - uses: actions/cache@v2 - # if: steps.job-start.outputs.run_result != 'success' - # id: build-extra-tools-cache - # with: - # path: extra-tests-install - # key: ${{ steps.genkey.outputs.extra-tests-cache-key }} - # restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} - # - name: Build extra tests - # if: steps.job-start.outputs.run_result != 'success' - # run: .github/scripts/build-extra-tests.sh - # - uses: ./.github/actions/job-end + + install-esp-toolchain: + name: install-esp-toolchain + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + with: + tools-version: 'esp-tools' + - uses: ./.github/actions/job-end + + build-extra-tests: + name: build-extra-tests + needs: install-riscv-toolchain + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + - name: Generate keys + if: steps.job-start.outputs.run_result != 'success' + id: genkey + run: | + echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" + - uses: actions/cache@v2 + if: steps.job-start.outputs.run_result != 'success' + id: build-extra-tools-cache + with: + path: extra-tests-install + key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} + - name: Build extra tests + if: steps.job-start.outputs.run_result != 'success' + run: .github/scripts/build-extra-tests.sh + - uses: ./.github/actions/job-end install-verilator: name: install-verilator @@ -158,648 +158,633 @@ jobs: id: job-start - name: Build verilator on self-hosted if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/install-verilator.sh + run: .github/scripts/remote-install-verilator.sh - uses: ./.github/actions/job-end - # # Sentinel job to simplify how we specify which that basic setup is complete - # # - # # When adding new prep jobs, please add them to `needs` below - # setup-complete: - # name: setup-complete - # needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, - # build-extra-tests] - # runs-on: ubuntu-latest - # steps: - # - name: Set up complete - # run: echo Set up is complete! - # - # ########################################################################## - # - # prepare-chipyard-cores: - # name: prepare-chipyard-cores - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Install SSH key - # uses: shimataro/ssh-key-action@v2 - # with: - # key: ${{ secrets.SERVERKEY }} - # known_hosts: ${{ secrets.BUILDSERVER }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-cores" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-peripherals: - # name: prepare-chipyard-peripherals - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Install SSH key - # uses: shimataro/ssh-key-action@v2 - # with: - # key: ${{ secrets.SERVERKEY }} - # known_hosts: ${{ secrets.BUILDSERVER }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-peripherals" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-accels: - # name: prepare-chipyard-accels - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Install SSH key - # uses: shimataro/ssh-key-action@v2 - # with: - # key: ${{ secrets.SERVERKEY }} - # known_hosts: ${{ secrets.BUILDSERVER }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # tools-version: "esp-tools" - # group-key: "group-accels" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-tracegen: - # name: prepare-chipyard-tracegen - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Install SSH key - # uses: shimataro/ssh-key-action@v2 - # with: - # key: ${{ secrets.SERVERKEY }} - # known_hosts: ${{ secrets.BUILDSERVER }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-tracegen" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-other: - # name: prepare-chipyard-other - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Install SSH key - # uses: shimataro/ssh-key-action@v2 - # with: - # key: ${{ secrets.SERVERKEY }} - # known_hosts: ${{ secrets.BUILDSERVER }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-other" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-fpga: - # name: prepare-chipyard-fpga - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Install SSH key - # uses: shimataro/ssh-key-action@v2 - # with: - # key: ${{ secrets.SERVERKEY }} - # known_hosts: ${{ secrets.BUILDSERVER }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-fpga" - # build-type: "fpga" - # - uses: ./.github/actions/job-end - # - # ########################################################################## - # - # chipyard-rocket-run-tests: - # name: chipyard-rocket-run-tests - # needs: prepare-chipyard-cores - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-cores" - # project-key: "chipyard-rocket" - # - uses: ./.github/actions/job-end - # - # chipyard-hetero-run-tests: - # name: chipyard-hetero-run-tests - # needs: prepare-chipyard-cores - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-cores" - # project-key: "chipyard-hetero" - # - uses: ./.github/actions/job-end - # - # chipyard-boom-run-tests: - # name: chipyard-boom-run-tests - # needs: prepare-chipyard-cores - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-cores" - # project-key: "chipyard-boom" - # - uses: ./.github/actions/job-end - # - # chipyard-cva6-run-tests: - # name: chipyard-cva6-run-tests - # needs: prepare-chipyard-cores - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-cores" - # project-key: "chipyard-cva6" - # - uses: ./.github/actions/job-end - # - # chipyard-sodor-run-tests: - # name: chipyard-sodor-run-tests - # needs: prepare-chipyard-cores - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-cores" - # project-key: "chipyard-sodor" - # - uses: ./.github/actions/job-end - # - # chipyard-dmirocket-run-tests: - # name: chipyard-dmirocket-run-tests - # needs: prepare-chipyard-peripherals - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-peripherals" - # project-key: "chipyard-dmirocket" - # - uses: ./.github/actions/job-end - # - # chipyard-spiflashwrite-run-tests: - # name: chipyard-spiflashwrite-run-tests - # needs: prepare-chipyard-peripherals - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-peripherals" - # project-key: "chipyard-spiflashwrite" - # - uses: ./.github/actions/job-end - # - # chipyard-spiflashread-run-tests: - # name: chipyard-spiflashread-run-tests - # needs: prepare-chipyard-peripherals - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-peripherals" - # project-key: "chipyard-spiflashread" - # - uses: ./.github/actions/job-end - # - # chipyard-lbwif-run-tests: - # name: chipyard-lbwif-run-tests - # needs: prepare-chipyard-peripherals - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-peripherals" - # project-key: "chipyard-lbwif" - # - uses: ./.github/actions/job-end - # - # chipyard-sha3-run-tests: - # name: chipyard-sha3-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # tools-version: "esp-tools" - # group-key: "group-accels" - # project-key: "chipyard-sha3" - # - uses: ./.github/actions/job-end - # - # chipyard-streaming-fir-run-tests: - # name: chipyard-streaming-fir-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-accels" - # project-key: "chipyard-streaming-fir" - # - uses: ./.github/actions/job-end - # - # chipyard-streaming-passthrough-run-tests: - # name: chipyard-streaming-passthrough-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-accels" - # project-key: "chipyard-streaming-passthrough" - # - uses: ./.github/actions/job-end - # - # chipyard-hwacha-run-tests: - # name: chipyard-hwacha-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # tools-version: "esp-tools" - # group-key: "group-accels" - # project-key: "chipyard-hwacha" - # - uses: ./.github/actions/job-end - # - # chipyard-gemmini-run-tests: - # name: chipyard-gemmini-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # tools-version: "esp-tools" - # group-key: "group-accels" - # project-key: "chipyard-gemmini" - # - uses: ./.github/actions/job-end - # - # chipyard-nvdla-run-tests: - # name: chipyard-nvdla-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-accels" - # project-key: "chipyard-nvdla" - # - uses: ./.github/actions/job-end - # - # tracegen-boom-run-tests: - # name: tracegen-boom-run-tests - # needs: prepare-chipyard-tracegen - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-tracegen" - # project-key: "tracegen-boom" - # - uses: ./.github/actions/job-end - # - # tracegen-run-tests: - # name: tracegen-run-tests - # needs: prepare-chipyard-tracegen - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-tracegen" - # project-key: "tracegen" - # - uses: ./.github/actions/job-end - # - # icenet-run-tests: - # name: icenet-run-tests - # needs: prepare-chipyard-other - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-other" - # project-key: "icenet" - # - uses: ./.github/actions/job-end - # - # testchipip-run-tests: - # name: testchipip-run-tests - # needs: prepare-chipyard-other - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-other" - # project-key: "testchipip" - # - uses: ./.github/actions/job-end - # - # firesim-run-tests: - # name: firesim-run-tests - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Install SSH key - # uses: shimataro/ssh-key-action@v2 - # with: - # key: ${{ secrets.SERVERKEY }} - # known_hosts: ${{ secrets.BUILDSERVER }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "extra-tests" - # project-key: "firesim" - # run-script: "run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # fireboom-run-tests: - # name: fireboom-run-tests - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Install SSH key - # uses: shimataro/ssh-key-action@v2 - # with: - # key: ${{ secrets.SERVERKEY }} - # known_hosts: ${{ secrets.BUILDSERVER }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "extra-tests" - # project-key: "fireboom" - # run-script: "run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # firesim-multiclock-run-tests: - # name: firesim-multiclock-run-tests - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - name: Install SSH key - # uses: shimataro/ssh-key-action@v2 - # with: - # key: ${{ secrets.SERVERKEY }} - # known_hosts: ${{ secrets.BUILDSERVER }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "extra-tests" - # project-key: "firesim-multiclock" - # run-script: "run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # # Sentinel job to simplify how we specify which checks need to pass in branch - # # protection and in Mergify - # # - # # When adding new top level jobs, please add them to `needs` below - # all_tests_passed: - # name: "all tests passed" - # needs: [commit-on-master-check, tutorial-setup-check, documentation-check, - # chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, - # chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, - # chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, - # chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, - # chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, - # tracegen-boom-run-tests, tracegen-run-tests, - # icenet-run-tests, testchipip-run-tests, - # prepare-chipyard-fpga, - # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - # runs-on: ubuntu-latest - # steps: - # - run: echo Success! + # Sentinel job to simplify how we specify which that basic setup is complete + # + # When adding new prep jobs, please add them to `needs` below + setup-complete: + name: setup-complete + needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, + build-extra-tests] + runs-on: ubuntu-latest + steps: + - name: Set up complete + run: echo Set up is complete! + + ########################################################################## + + prepare-chipyard-cores: + name: prepare-chipyard-cores + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-cores" + - uses: ./.github/actions/job-end + + prepare-chipyard-peripherals: + name: prepare-chipyard-peripherals + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-peripherals" + - uses: ./.github/actions/job-end + + prepare-chipyard-accels: + name: prepare-chipyard-accels + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + tools-version: "esp-tools" + group-key: "group-accels" + - uses: ./.github/actions/job-end + + prepare-chipyard-tracegen: + name: prepare-chipyard-tracegen + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-tracegen" + - uses: ./.github/actions/job-end + + prepare-chipyard-other: + name: prepare-chipyard-other + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-other" + - uses: ./.github/actions/job-end + + prepare-chipyard-fpga: + name: prepare-chipyard-fpga + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-fpga" + build-type: "fpga" + - uses: ./.github/actions/job-end + + ########################################################################## + + chipyard-rocket-run-tests: + name: chipyard-rocket-run-tests + needs: prepare-chipyard-cores + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-rocket" + - uses: ./.github/actions/job-end + + chipyard-hetero-run-tests: + name: chipyard-hetero-run-tests + needs: prepare-chipyard-cores + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-hetero" + - uses: ./.github/actions/job-end + + chipyard-boom-run-tests: + name: chipyard-boom-run-tests + needs: prepare-chipyard-cores + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-boom" + - uses: ./.github/actions/job-end + + chipyard-cva6-run-tests: + name: chipyard-cva6-run-tests + needs: prepare-chipyard-cores + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-cva6" + - uses: ./.github/actions/job-end + + chipyard-sodor-run-tests: + name: chipyard-sodor-run-tests + needs: prepare-chipyard-cores + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-sodor" + - uses: ./.github/actions/job-end + + chipyard-dmirocket-run-tests: + name: chipyard-dmirocket-run-tests + needs: prepare-chipyard-peripherals + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-dmirocket" + - uses: ./.github/actions/job-end + + chipyard-spiflashwrite-run-tests: + name: chipyard-spiflashwrite-run-tests + needs: prepare-chipyard-peripherals + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-spiflashwrite" + - uses: ./.github/actions/job-end + + chipyard-spiflashread-run-tests: + name: chipyard-spiflashread-run-tests + needs: prepare-chipyard-peripherals + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-spiflashread" + - uses: ./.github/actions/job-end + + chipyard-lbwif-run-tests: + name: chipyard-lbwif-run-tests + needs: prepare-chipyard-peripherals + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-lbwif" + - uses: ./.github/actions/job-end + + chipyard-sha3-run-tests: + name: chipyard-sha3-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-sha3" + - uses: ./.github/actions/job-end + + chipyard-streaming-fir-run-tests: + name: chipyard-streaming-fir-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-streaming-fir" + - uses: ./.github/actions/job-end + + chipyard-streaming-passthrough-run-tests: + name: chipyard-streaming-passthrough-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-streaming-passthrough" + - uses: ./.github/actions/job-end + + chipyard-hwacha-run-tests: + name: chipyard-hwacha-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-hwacha" + - uses: ./.github/actions/job-end + + chipyard-gemmini-run-tests: + name: chipyard-gemmini-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-gemmini" + - uses: ./.github/actions/job-end + + chipyard-nvdla-run-tests: + name: chipyard-nvdla-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-nvdla" + - uses: ./.github/actions/job-end + + tracegen-boom-run-tests: + name: tracegen-boom-run-tests + needs: prepare-chipyard-tracegen + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-tracegen" + project-key: "tracegen-boom" + - uses: ./.github/actions/job-end + + tracegen-run-tests: + name: tracegen-run-tests + needs: prepare-chipyard-tracegen + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-tracegen" + project-key: "tracegen" + - uses: ./.github/actions/job-end + + icenet-run-tests: + name: icenet-run-tests + needs: prepare-chipyard-other + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "icenet" + - uses: ./.github/actions/job-end + + testchipip-run-tests: + name: testchipip-run-tests + needs: prepare-chipyard-other + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "testchipip" + - uses: ./.github/actions/job-end + + firesim-run-tests: + name: firesim-run-tests + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "firesim" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + fireboom-run-tests: + name: fireboom-run-tests + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "fireboom" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + firesim-multiclock-run-tests: + name: firesim-multiclock-run-tests + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "firesim-multiclock" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + # Sentinel job to simplify how we specify which checks need to pass in branch + # protection and in Mergify + # + # When adding new top level jobs, please add them to `needs` below + all_tests_passed: + name: "all tests passed" + needs: [commit-on-master-check, tutorial-setup-check, documentation-check, + chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, + chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, + chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, + chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, + chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, + tracegen-boom-run-tests, tracegen-run-tests, + icenet-run-tests, testchipip-run-tests, + prepare-chipyard-fpga, + firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + runs-on: ubuntu-latest + steps: + - run: echo Success! From 3d1301040b525e5af68eb37f744372b051f7a082 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 14:18:08 -0700 Subject: [PATCH 15/31] Revert toolchain to use GH-A area --- .github/workflows/chipyard-run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 35ea5c45..5e42678d 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -80,7 +80,7 @@ jobs: install-riscv-toolchain: name: install-riscv-toolchain - runs-on: self-hosted + runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash From b612d04db007613a5fb6fb9556392c68ecc21eb5 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 14:49:27 -0700 Subject: [PATCH 16/31] Update README --- .github/README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/README.md b/.github/README.md index e864d705..030fbc96 100644 --- a/.github/README.md +++ b/.github/README.md @@ -6,11 +6,11 @@ Website: https://gihub.com/gh/ucb-bar/chipyard/actions GitHub Actions Brief Explanation --------------------------- -CI is executed by Github Actions (GA). GA is controlled by `.yml` files in the `.github/workflows/` directory. +CI is executed by Github Actions (GA). GA is controlled by `.yml` files in the `.github/workflows/` directory. In our case we have just one workflow named `chipyard-rocket-run-tests.yml`. It defines a number of `jobs` within it that do particular tasks. All jobs in the workflow must pass for the CI run to be successful. -In general, a job is run in parallel with others unless it depends on some other job. +In general, a job is run in parallel with others unless it depends on some other job. The dependency of one job on the completion of another is specified via the `needs` field. For example: @@ -36,7 +36,7 @@ we specify things over and over like docker image tag and checkout commands. One use of CA: our process relies on caching to avoid running time-consuming and intensive tasks more often than necessary. The following is an example of using the cache@v2 composite action. A step `uses: actions/cache@v2` which take as parameters the -path that contains the data to be cached and a key. Paths can have multiple targets. +path that contains the data to be cached and a key. Paths can have multiple targets. The following step can look at the result of the cache operation, if there was cache miss, then we run the command that will generate the data to be cached. The caching of the generated data is implicit. >Note: GA cache documentation suggests using the yml level `if: steps.cache-primes.outputs.cache-hit != 'true'` to @@ -117,11 +117,6 @@ After adding a private key, it will show a fingerprint that should be added unde Note: On the remote server you need to have the `*.pub` key file added to the `authorized_keys` file. -Additional Work ---------------- -- It would be nice to add the ability to re-run just parts of the workflow. [See Workflows Hacks](https://github.com/jaredpalmer/razzle/blob/f8305c26997bae8ef0f5dfa52540d842451b4090/.github/workflows/examples.yml) - - Notes on CIRCLE CI ------------------ This code is heavily based on the origin [CircleCI]() work. There a quite a few differences From c7e251db137f6d9eebd8468d79c421a2ecd8e890 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 15:11:32 -0700 Subject: [PATCH 17/31] Bump README again --- .github/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/README.md b/.github/README.md index 030fbc96..4af1e9d9 100644 --- a/.github/README.md +++ b/.github/README.md @@ -73,14 +73,14 @@ The following is included in `.github/scripts/: directory `build-toolchains.sh` # build either riscv-tools or esp-tools `create-hash.sh` # create hashes of riscv-tools/esp-tools to use as hash keys - `do-rtl-build.sh` # use verilator to build a sim executable (remotely) + `remote-do-rtl-build.sh` # use verilator to build a sim executable (remotely) `defaults.sh` # default variables used `check-commit.sh` # check that submodule commits are valid `build-extra-tests.sh` # build default chipyard tests located in tests/ `clean-old-files.sh` # clean up build server files `do-fpga-rtl-build.sh` # similar to `do-rtl-build` but using fpga/ - `install-verilator.sh` # install verilator on build server - `run-firesim-scala-tests.sh` # run firesim scala tests + `remote-install-verilator.sh` # install verilator on build server + `remote-run-firesim-scala-tests.sh` # run firesim scala tests `run-tests.sh # run tests for a specific set of designs How things are set up for Chipyard From 51bc3ad7bb0f7e4e33d5385bd8aed46887d0ce1e Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 15:41:26 -0700 Subject: [PATCH 18/31] Fix setting JAVA/SBT make variables + Use run-binary-fast in run-tests --- .github/scripts/remote-do-rtl-build.sh | 2 +- .../scripts/remote-run-firesim-scala-tests.sh | 2 +- .github/scripts/run-tests.sh | 20 +++++++++---------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index e37cc863..ffe7e6e0 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -59,7 +59,7 @@ do export PATH=$REMOTE_VERILATOR_DIR/bin:$PATH export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR export COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache - make -j$REMOTE_MAKE_NPROC -C $REMOTE_MAKE_DIR FIRRTL_LOGLEVEL=info JAVA_OPTS=$REMOTE_JAVA_OPTS SBT_OPTS=$REMOTE_SBT_OPTS ${mapping[$key]} + make -j$REMOTE_MAKE_NPROC -C $REMOTE_MAKE_DIR FIRRTL_LOGLEVEL=info JAVA_OPTS="$REMOTE_JAVA_OPTS" SBT_OPTS="$REMOTE_SBT_OPTS" ${mapping[$key]} done rm -rf $REMOTE_CHIPYARD_DIR/project diff --git a/.github/scripts/remote-run-firesim-scala-tests.sh b/.github/scripts/remote-run-firesim-scala-tests.sh index 916c7ca5..732cb59d 100755 --- a/.github/scripts/remote-run-firesim-scala-tests.sh +++ b/.github/scripts/remote-run-firesim-scala-tests.sh @@ -40,4 +40,4 @@ export FIRESIM_ENV_SOURCED=1; export PATH=$REMOTE_VERILATOR_DIR/bin:$PATH export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR export COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache -make -C $REMOTE_FIRESIM_DIR JAVA_OPTS=$REMOTE_JAVA_OPTS SBT_OPTS=$REMOTE_SBT_OPTS testOnly ${mapping[$1]} +make -C $REMOTE_FIRESIM_DIR JAVA_OPTS="$REMOTE_JAVA_OPTS" SBT_OPTS="$REMOTE_SBT_OPTS" testOnly ${mapping[$1]} diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index 7729579c..93475a19 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -30,8 +30,6 @@ run_tracegen () { make tracegen -C $LOCAL_SIM_DIR $@ } -# TODO BUG: the run-binary command forces a rebuild of the simulator in CI -# instead, directly run the simulator binary case $1 in chipyard-rocket) run_bmark ${mapping[$1]} @@ -64,32 +62,32 @@ case $1 in GEMMINI_SOFTWARE_DIR=$LOCAL_SIM_DIR/../../generators/gemmini/software/gemmini-rocc-tests rm -rf $GEMMINI_SOFTWARE_DIR/riscv-tests cd $LOCAL_SIM_DIR - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/mvin_mvout-baremetal + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/mvin_mvout-baremetal ;; chipyard-sha3) export RISCV=$LOCAL_ESP_DIR export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib export PATH=$RISCV/bin:$PATH (cd $LOCAL_CHIPYARD_DIR/generators/sha3/software && ./build.sh) - $LOCAL_SIM_DIR/simulator-chipyard-Sha3RocketConfig $LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv ;; chipyard-streaming-passthrough) make -C $LOCAL_CHIPYARD_DIR/tests - $LOCAL_SIM_DIR/simulator-chipyard-StreamingPassthroughRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv ;; chipyard-streaming-fir) make -C $LOCAL_CHIPYARD_DIR/tests - $LOCAL_SIM_DIR/simulator-chipyard-StreamingFIRRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv ;; chipyard-spiflashread) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashread.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashread.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary-fast ;; chipyard-spiflashwrite) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary-fast [[ "`xxd $LOCAL_CHIPYARD_DIR/tests/spiflash.img | grep 1337\ 00ff\ aa55\ face | wc -l`" == "6" ]] || false ;; tracegen) @@ -106,7 +104,7 @@ case $1 in ;; chipyard-nvdla) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary-fast ;; icenet) make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} From 0cca14c910d6791824aa0f51bea3e03118a81c43 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:09:36 -0700 Subject: [PATCH 19/31] Try to work around perm. issues on self-hosted | Remove SSH key installs --- .github/workflows/chipyard-run-tests.yml | 50 ++++++++++-------------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 5e42678d..6ef2ee1b 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -152,6 +152,8 @@ jobs: name: install-verilator runs-on: self-hosted steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -183,13 +185,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -207,13 +206,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -231,13 +227,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -256,13 +249,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -280,13 +270,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -304,13 +291,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -714,6 +698,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -735,6 +721,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -756,6 +744,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start From 9c335ef1899ebaee36f8f166242886aacf71df41 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:12:50 -0700 Subject: [PATCH 20/31] test --- .github/workflows/chipyard-run-tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 6ef2ee1b..3aa55caf 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -152,8 +152,10 @@ jobs: name: install-verilator runs-on: self-hosted steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE + - name: TESTING + run: | + whoami + ls -al $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start From a66666a2e519554d92be4753e269a9c26eada909 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:34:51 -0700 Subject: [PATCH 21/31] Remove containers from self-hosted + Remove sudo dir stuff --- .github/workflows/chipyard-run-tests.yml | 68 ++++-------------------- 1 file changed, 10 insertions(+), 58 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 3aa55caf..fcadc402 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -151,11 +151,8 @@ jobs: install-verilator: name: install-verilator runs-on: self-hosted + needs: cancel-prior-workflows steps: - - name: TESTING - run: | - whoami - ls -al $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -183,17 +180,12 @@ jobs: name: prepare-chipyard-cores needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -204,17 +196,12 @@ jobs: name: prepare-chipyard-peripherals needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -225,17 +212,12 @@ jobs: name: prepare-chipyard-accels needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -247,17 +229,12 @@ jobs: name: prepare-chipyard-tracegen needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -268,17 +245,12 @@ jobs: name: prepare-chipyard-other needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -289,17 +261,12 @@ jobs: name: prepare-chipyard-fpga needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -696,17 +663,12 @@ jobs: name: firesim-run-tests needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Run tests + - name: Run tests on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: @@ -719,17 +681,12 @@ jobs: name: fireboom-run-tests needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Run tests + - name: Run tests on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: @@ -742,17 +699,12 @@ jobs: name: firesim-multiclock-run-tests needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Run tests + - name: Run tests on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: From e7b0cb4aedc38a1a74d256fc04c96bb2426800cf Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:36:37 -0700 Subject: [PATCH 22/31] Remove need for container for cleanup old workflow job --- .github/workflows/chipyard-run-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index fcadc402..c2348ae8 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -14,9 +14,6 @@ jobs: cancel-prior-workflows: name: cancel-prior-workflows runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.9.1 From 379ad3a73cbfa42be0428f1edc23d2f5edd1e5b7 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 21:08:39 -0700 Subject: [PATCH 23/31] Forgot to remove clean in one place --- .github/scripts/remote-do-rtl-build.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index ffe7e6e0..bda81ead 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -14,9 +14,6 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh -# call clean on exit -trap clean EXIT - cd $REMOTE_CHIPYARD_DIR ./scripts/init-submodules-no-riscv-tools.sh ./scripts/init-fpga.sh From 20ebcc9f1bb2ee72c1d10bc2dcd689e5af5e06de Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Sat, 9 Oct 2021 10:35:47 -0700 Subject: [PATCH 24/31] Fix run-tests to use prep-rtl action + Fix Gemmini software build --- .github/actions/run-tests/action.yml | 7 +------ .github/actions/toolchain-build/action.yml | 2 +- .github/scripts/remote-do-rtl-build.sh | 7 ++++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 892ea699..28064e31 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -24,14 +24,9 @@ runs: run: ./scripts/init-submodules-no-riscv-tools.sh shell: bash - - name: Build toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: ${{ inputs.tools-version }} - # Note: You shouldn't need the other inputs since it shouldn't build RTL from scratch - name: Build RTL - uses: ./.github/actions/toolchain-build + uses: ./.github/actions/prepare-rtl with: tools-version: ${{ inputs.tools-version }} group-key: ${{ inputs.group-key }} diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 6e5329a7..f84a0fd9 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -1,5 +1,5 @@ name: toolchain-build -description: 'Builds or retrieves cache of the selected toolchain' +description: 'Builds or retrieves cache of the all toolchains' inputs: tools-version: diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index bda81ead..e5c4e101 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -25,11 +25,12 @@ if [ $1 = "group-accels" ]; then export RISCV=$REMOTE_ESP_DIR export LD_LIBRARY_PATH=$REMOTE_ESP_DIR/lib export PATH=$RISCV/bin:$PATH - GEMMINI_SOFTWARE_DIR=$REMOTE_CHIPYARD_DIR/generators/gemmini/software/gemmini-rocc-tests - cd $GEMMINI_SOFTWARE_DIR + pushd $REMOTE_CHIPYARD_DIR/generators/gemmini/software git submodule update --init --recursive gemmini-rocc-tests - cd gemmini-rocc-tests + pushd gemmini-rocc-tests ./build.sh + popd + popd fi # choose what make dir to use From 78e733b99274056d4a4a63be8477218e2e27ae16 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Sat, 9 Oct 2021 11:59:24 -0700 Subject: [PATCH 25/31] Build both toolchains in 1 job + Rename toolchain build job --- .github/actions/prepare-rtl/action.yml | 8 +---- .github/actions/run-tests/action.yml | 5 --- .github/actions/toolchain-build/action.yml | 30 +++++----------- .github/scripts/remote-do-rtl-build.sh | 2 -- .github/workflows/chipyard-run-tests.yml | 41 ++++------------------ 5 files changed, 17 insertions(+), 69 deletions(-) diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index 45996a90..25098bfc 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -2,10 +2,6 @@ name: prepare-rtl description: 'Builds RTL based on parameters, caches the entire chipyard root dir when done' inputs: - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' group-key: description: group key required: true @@ -21,10 +17,8 @@ inputs: runs: using: "composite" steps: - - name: Build toolchain + - name: Build RISC-V toolchains uses: ./.github/actions/toolchain-build - with: - tools-version: ${{ inputs.tools-version }} - uses: actions/cache@v2 id: rtl-build-id diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 28064e31..d74b18af 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -2,10 +2,6 @@ name: run-tests description: 'Runs tests according to input parameters' inputs: - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' group-key: description: group key required: true @@ -28,7 +24,6 @@ runs: - name: Build RTL uses: ./.github/actions/prepare-rtl with: - tools-version: ${{ inputs.tools-version }} group-key: ${{ inputs.group-key }} - name: Run RTL tests diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index f84a0fd9..88da9a1a 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -1,11 +1,5 @@ name: toolchain-build -description: 'Builds or retrieves cache of the all toolchains' - -inputs: - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' +description: 'Build/cache both toolchains' runs: using: "composite" @@ -14,28 +8,22 @@ runs: run: .github/scripts/create-hash.sh shell: bash - # brute force way to swap between riscv/esp-tools caches - name: Cache riscv-tools uses: actions/cache@v2 - id: toolchain-build-riscv-tools with: - path: ${{ inputs.tools-version }}-install + path: riscv-tools-install key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/riscv-tools.hash') }} - # brute force way to swap between riscv/esp-tools caches + - name: Build RISC-V toolchain if not cached + run: ./.github/scripts/build-toolchains.sh riscv-tools + shell: bash + - name: Cache esp-tools uses: actions/cache@v2 - id: toolchain-build-esp-tools with: - path: ${{ inputs.tools-version }}-install + path: esp-tools-install key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/esp-tools.hash') }} - - name: Build toolchain if not cached - run: | - if [[ "${{ steps.toolchain-build-riscv-tools.outputs.cache-hit }}" != 'true' || "${{ steps.toolchain-build-esp-tools.outputs.cache-hit }}" != 'true' ]]; then - echo "Cache miss on ${{ inputs.tools-version }}-install. Build." - ./.github/scripts/build-toolchains.sh ${{ inputs.tools-version }} - else - echo "Cache hit do not rebuild toolchain ${{ inputs.tools-version }}." - fi + - name: Build ESP RISC-V toolchain if not cached + run: ./.github/scripts/build-toolchains.sh esp-tools shell: bash diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index e5c4e101..a5268288 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -59,5 +59,3 @@ do export COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache make -j$REMOTE_MAKE_NPROC -C $REMOTE_MAKE_DIR FIRRTL_LOGLEVEL=info JAVA_OPTS="$REMOTE_JAVA_OPTS" SBT_OPTS="$REMOTE_SBT_OPTS" ${mapping[$key]} done - -rm -rf $REMOTE_CHIPYARD_DIR/project diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index c2348ae8..c932d3e6 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -3,7 +3,7 @@ name: chipyard-ci-process on: [push] env: - tools-cache-version: v8 + tools-cache-version: v13 BUILDSERVER: ${{ secrets.BUILDSERVER }} BUILDUSER: ${{ secrets.BUILDUSER }} SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} @@ -75,8 +75,8 @@ jobs: run: cat /tmp/sphinx-err*.log - uses: ./.github/actions/job-end - install-riscv-toolchain: - name: install-riscv-toolchain + install-toolchains: + name: install-toolchains runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -86,34 +86,14 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build default RISC-V toolchain + - name: Build RISC-V toolchains if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - - uses: ./.github/actions/job-end - - install-esp-toolchain: - name: install-esp-toolchain - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - uses: ./.github/actions/job-end build-extra-tests: name: build-extra-tests - needs: install-riscv-toolchain + needs: install-toolchains runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -123,11 +103,9 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build default RISC-V toolchain + - name: Build RISC-V toolchains if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - name: Generate keys if: steps.job-start.outputs.run_result != 'success' id: genkey @@ -164,8 +142,7 @@ jobs: # When adding new prep jobs, please add them to `needs` below setup-complete: name: setup-complete - needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, - build-extra-tests] + needs: [install-toolchains, install-verilator, build-extra-tests] runs-on: ubuntu-latest steps: - name: Set up complete @@ -218,7 +195,6 @@ jobs: if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: - tools-version: "esp-tools" group-key: "group-accels" - uses: ./.github/actions/job-end @@ -469,7 +445,6 @@ jobs: if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: - tools-version: "esp-tools" group-key: "group-accels" project-key: "chipyard-sha3" - uses: ./.github/actions/job-end @@ -530,7 +505,6 @@ jobs: if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: - tools-version: "esp-tools" group-key: "group-accels" project-key: "chipyard-hwacha" - uses: ./.github/actions/job-end @@ -551,7 +525,6 @@ jobs: if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: - tools-version: "esp-tools" group-key: "group-accels" project-key: "chipyard-gemmini" - uses: ./.github/actions/job-end From 748c973d4427748f33d2e044cbb7b57da3207b61 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 11 Oct 2021 09:49:27 -0700 Subject: [PATCH 26/31] Clean extra disk space after build toolchains --- .github/scripts/build-toolchains.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/scripts/build-toolchains.sh b/.github/scripts/build-toolchains.sh index 160b6f5a..cd1abb1d 100755 --- a/.github/scripts/build-toolchains.sh +++ b/.github/scripts/build-toolchains.sh @@ -15,4 +15,7 @@ if [ ! -d "$HOME/$1-install" ]; then # init all submodules including the tools CHIPYARD_DIR="$LOCAL_CHIPYARD_DIR" NPROC=$CI_MAKE_NPROC $LOCAL_CHIPYARD_DIR/scripts/build-toolchains.sh $1 + + # de-init the toolchain area to save on space + git submodule deinit $LOCAL_CHIPYARD_DIR/toolchains/$1 fi From 192e60f5a19933ea39fd632841f439105f3273f7 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 11 Oct 2021 16:45:57 -0700 Subject: [PATCH 27/31] Debug --- .github/actions/toolchain-build/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 88da9a1a..0c74cc44 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -8,6 +8,15 @@ runs: run: .github/scripts/create-hash.sh shell: bash + - run: | + cat $GITHUB_WORKSPACE/riscv-tools.hash + ls -alh $GITHUB_WORKSPACE/riscv-tools.hash + cat $GITHUB_WORKSPACE/esp-tools.hash + ls -alh $GITHUB_WORKSPACE/esp-tools.hash + echo "${{ hashFiles('**/riscv-tools.hash') }}" + echo "${{ hashFiles('**/esp-tools.hash') }}" + shell: bash + - name: Cache riscv-tools uses: actions/cache@v2 with: From 6eb06137f12e976e4346c1320a54f88fcd3b066a Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Tue, 12 Oct 2021 21:31:56 -0700 Subject: [PATCH 28/31] Testing theory --- .github/workflows/chipyard-run-tests.yml | 1367 +++++++++++----------- 1 file changed, 700 insertions(+), 667 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index c932d3e6..f27f726b 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -20,685 +20,718 @@ jobs: with: access_token: ${{ github.token }} - commit-on-master-check: - name: commit-on-master-check - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Check commits of each submodule - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - uses: ./.github/actions/job-end - - tutorial-setup-check: - name: tutorial-setup-check - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Check that the tutorial-setup patches apply - if: steps.job-start.outputs.run_result != 'success' - run: scripts/tutorial-setup.sh - - uses: ./.github/actions/job-end - - documentation-check: - name: documentation-check - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Check that documentation builds with no warnings/errors - if: steps.job-start.outputs.run_result != 'success' - run: | - sudo apt-get update -y - sudo apt-get install -y python3-pip - sudo pip3 install -r docs/requirements.txt - make -C docs html - - name: Show error log from sphinx if failed - if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - run: cat /tmp/sphinx-err*.log - - uses: ./.github/actions/job-end - - install-toolchains: - name: install-toolchains - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RISC-V toolchains - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - - uses: ./.github/actions/job-end - - build-extra-tests: - name: build-extra-tests - needs: install-toolchains - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RISC-V toolchains - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - - name: Generate keys - if: steps.job-start.outputs.run_result != 'success' - id: genkey - run: | - echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - - uses: actions/cache@v2 - if: steps.job-start.outputs.run_result != 'success' - id: build-extra-tools-cache - with: - path: extra-tests-install - key: ${{ steps.genkey.outputs.extra-tests-cache-key }} - restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} - - name: Build extra tests - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/build-extra-tests.sh - - uses: ./.github/actions/job-end - - install-verilator: - name: install-verilator - runs-on: self-hosted - needs: cancel-prior-workflows - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build verilator on self-hosted - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/remote-install-verilator.sh - - uses: ./.github/actions/job-end - - # Sentinel job to simplify how we specify which that basic setup is complete - # - # When adding new prep jobs, please add them to `needs` below - setup-complete: - name: setup-complete - needs: [install-toolchains, install-verilator, build-extra-tests] + test1: + name: test1 runs-on: ubuntu-latest steps: - - name: Set up complete - run: echo Set up is complete! + - run: | + mkdir -p $GITHUB_WORKSPACE + echo "dummy" >> $GITHUB_WORKSPACE/temp.file + echo "${{ hashFiles('**/temp.file') }}" - ########################################################################## - - prepare-chipyard-cores: - name: prepare-chipyard-cores - needs: setup-complete + test2: + name: test2 runs-on: self-hosted steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - - uses: ./.github/actions/job-end + - run: | + mkdir -p $GITHUB_WORKSPACE + echo "dummy" >> $GITHUB_WORKSPACE/temp.file + echo "${{ hashFiles('**/temp.file') }}" - prepare-chipyard-peripherals: - name: prepare-chipyard-peripherals - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - - uses: ./.github/actions/job-end - - prepare-chipyard-accels: - name: prepare-chipyard-accels - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - - uses: ./.github/actions/job-end - - prepare-chipyard-tracegen: - name: prepare-chipyard-tracegen - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - - uses: ./.github/actions/job-end - - prepare-chipyard-other: - name: prepare-chipyard-other - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - - uses: ./.github/actions/job-end - - prepare-chipyard-fpga: - name: prepare-chipyard-fpga - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-fpga" - build-type: "fpga" - - uses: ./.github/actions/job-end - - ########################################################################## - - chipyard-rocket-run-tests: - name: chipyard-rocket-run-tests - needs: prepare-chipyard-cores + test3: + name: test3 runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-rocket" - - uses: ./.github/actions/job-end + - run: | + mkdir -p $GITHUB_WORKSPACE + echo "dummy" >> $GITHUB_WORKSPACE/temp.file + echo "${{ hashFiles('**/temp.file') }}" - chipyard-hetero-run-tests: - name: chipyard-hetero-run-tests - needs: prepare-chipyard-cores - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-hetero" - - uses: ./.github/actions/job-end - chipyard-boom-run-tests: - name: chipyard-boom-run-tests - needs: prepare-chipyard-cores - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-boom" - - uses: ./.github/actions/job-end - chipyard-cva6-run-tests: - name: chipyard-cva6-run-tests - needs: prepare-chipyard-cores - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-cva6" - - uses: ./.github/actions/job-end - chipyard-sodor-run-tests: - name: chipyard-sodor-run-tests - needs: prepare-chipyard-cores - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-sodor" - - uses: ./.github/actions/job-end - - chipyard-dmirocket-run-tests: - name: chipyard-dmirocket-run-tests - needs: prepare-chipyard-peripherals - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-dmirocket" - - uses: ./.github/actions/job-end - - chipyard-spiflashwrite-run-tests: - name: chipyard-spiflashwrite-run-tests - needs: prepare-chipyard-peripherals - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-spiflashwrite" - - uses: ./.github/actions/job-end - - chipyard-spiflashread-run-tests: - name: chipyard-spiflashread-run-tests - needs: prepare-chipyard-peripherals - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-spiflashread" - - uses: ./.github/actions/job-end - - chipyard-lbwif-run-tests: - name: chipyard-lbwif-run-tests - needs: prepare-chipyard-peripherals - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-lbwif" - - uses: ./.github/actions/job-end - - chipyard-sha3-run-tests: - name: chipyard-sha3-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-sha3" - - uses: ./.github/actions/job-end - - chipyard-streaming-fir-run-tests: - name: chipyard-streaming-fir-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-streaming-fir" - - uses: ./.github/actions/job-end - - chipyard-streaming-passthrough-run-tests: - name: chipyard-streaming-passthrough-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-streaming-passthrough" - - uses: ./.github/actions/job-end - - chipyard-hwacha-run-tests: - name: chipyard-hwacha-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-hwacha" - - uses: ./.github/actions/job-end - - chipyard-gemmini-run-tests: - name: chipyard-gemmini-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-gemmini" - - uses: ./.github/actions/job-end - - chipyard-nvdla-run-tests: - name: chipyard-nvdla-run-tests - needs: prepare-chipyard-accels - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-nvdla" - - uses: ./.github/actions/job-end - - tracegen-boom-run-tests: - name: tracegen-boom-run-tests - needs: prepare-chipyard-tracegen - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-tracegen" - project-key: "tracegen-boom" - - uses: ./.github/actions/job-end - - tracegen-run-tests: - name: tracegen-run-tests - needs: prepare-chipyard-tracegen - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-tracegen" - project-key: "tracegen" - - uses: ./.github/actions/job-end - - icenet-run-tests: - name: icenet-run-tests - needs: prepare-chipyard-other - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-other" - project-key: "icenet" - - uses: ./.github/actions/job-end - - testchipip-run-tests: - name: testchipip-run-tests - needs: prepare-chipyard-other - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "group-other" - project-key: "testchipip" - - uses: ./.github/actions/job-end - - firesim-run-tests: - name: firesim-run-tests - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "firesim" - run-script: "remote-run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - fireboom-run-tests: - name: fireboom-run-tests - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "fireboom" - run-script: "remote-run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - firesim-multiclock-run-tests: - name: firesim-multiclock-run-tests - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "firesim-multiclock" - run-script: "remote-run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - # Sentinel job to simplify how we specify which checks need to pass in branch - # protection and in Mergify - # - # When adding new top level jobs, please add them to `needs` below - all_tests_passed: - name: "all tests passed" - needs: [commit-on-master-check, tutorial-setup-check, documentation-check, - chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, - chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, - chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, - chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, - chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, - tracegen-boom-run-tests, tracegen-run-tests, - icenet-run-tests, testchipip-run-tests, - prepare-chipyard-fpga, - firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - runs-on: ubuntu-latest - steps: - - run: echo Success! + # commit-on-master-check: + # name: commit-on-master-check + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Check commits of each submodule + # if: steps.job-start.outputs.run_result != 'success' + # run: .github/scripts/check-commit.sh + # - uses: ./.github/actions/job-end + # + # tutorial-setup-check: + # name: tutorial-setup-check + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Check that the tutorial-setup patches apply + # if: steps.job-start.outputs.run_result != 'success' + # run: scripts/tutorial-setup.sh + # - uses: ./.github/actions/job-end + # + # documentation-check: + # name: documentation-check + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Check that documentation builds with no warnings/errors + # if: steps.job-start.outputs.run_result != 'success' + # run: | + # sudo apt-get update -y + # sudo apt-get install -y python3-pip + # sudo pip3 install -r docs/requirements.txt + # make -C docs html + # - name: Show error log from sphinx if failed + # if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + # run: cat /tmp/sphinx-err*.log + # - uses: ./.github/actions/job-end + # + # install-toolchains: + # name: install-toolchains + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RISC-V toolchains + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # - uses: ./.github/actions/job-end + # + # build-extra-tests: + # name: build-extra-tests + # needs: install-toolchains + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RISC-V toolchains + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # - name: Generate keys + # if: steps.job-start.outputs.run_result != 'success' + # id: genkey + # run: | + # echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" + # - uses: actions/cache@v2 + # if: steps.job-start.outputs.run_result != 'success' + # id: build-extra-tools-cache + # with: + # path: extra-tests-install + # key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + # restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} + # - name: Build extra tests + # if: steps.job-start.outputs.run_result != 'success' + # run: .github/scripts/build-extra-tests.sh + # - uses: ./.github/actions/job-end + # + # install-verilator: + # name: install-verilator + # runs-on: self-hosted + # needs: cancel-prior-workflows + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build verilator on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # run: .github/scripts/remote-install-verilator.sh + # - uses: ./.github/actions/job-end + # + # # Sentinel job to simplify how we specify which that basic setup is complete + # # + # # When adding new prep jobs, please add them to `needs` below + # setup-complete: + # name: setup-complete + # needs: [install-toolchains, install-verilator, build-extra-tests] + # runs-on: ubuntu-latest + # steps: + # - name: Set up complete + # run: echo Set up is complete! + # + # ########################################################################## + # + # prepare-chipyard-cores: + # name: prepare-chipyard-cores + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-cores" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-peripherals: + # name: prepare-chipyard-peripherals + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-peripherals" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-accels: + # name: prepare-chipyard-accels + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-accels" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-tracegen: + # name: prepare-chipyard-tracegen + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-tracegen" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-other: + # name: prepare-chipyard-other + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-other" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-fpga: + # name: prepare-chipyard-fpga + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-fpga" + # build-type: "fpga" + # - uses: ./.github/actions/job-end + # + # ########################################################################## + # + # chipyard-rocket-run-tests: + # name: chipyard-rocket-run-tests + # needs: prepare-chipyard-cores + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-rocket" + # - uses: ./.github/actions/job-end + # + # chipyard-hetero-run-tests: + # name: chipyard-hetero-run-tests + # needs: prepare-chipyard-cores + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-hetero" + # - uses: ./.github/actions/job-end + # + # chipyard-boom-run-tests: + # name: chipyard-boom-run-tests + # needs: prepare-chipyard-cores + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-boom" + # - uses: ./.github/actions/job-end + # + # chipyard-cva6-run-tests: + # name: chipyard-cva6-run-tests + # needs: prepare-chipyard-cores + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-cva6" + # - uses: ./.github/actions/job-end + # + # chipyard-sodor-run-tests: + # name: chipyard-sodor-run-tests + # needs: prepare-chipyard-cores + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-sodor" + # - uses: ./.github/actions/job-end + # + # chipyard-dmirocket-run-tests: + # name: chipyard-dmirocket-run-tests + # needs: prepare-chipyard-peripherals + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-peripherals" + # project-key: "chipyard-dmirocket" + # - uses: ./.github/actions/job-end + # + # chipyard-spiflashwrite-run-tests: + # name: chipyard-spiflashwrite-run-tests + # needs: prepare-chipyard-peripherals + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-peripherals" + # project-key: "chipyard-spiflashwrite" + # - uses: ./.github/actions/job-end + # + # chipyard-spiflashread-run-tests: + # name: chipyard-spiflashread-run-tests + # needs: prepare-chipyard-peripherals + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-peripherals" + # project-key: "chipyard-spiflashread" + # - uses: ./.github/actions/job-end + # + # chipyard-lbwif-run-tests: + # name: chipyard-lbwif-run-tests + # needs: prepare-chipyard-peripherals + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-peripherals" + # project-key: "chipyard-lbwif" + # - uses: ./.github/actions/job-end + # + # chipyard-sha3-run-tests: + # name: chipyard-sha3-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-accels" + # project-key: "chipyard-sha3" + # - uses: ./.github/actions/job-end + # + # chipyard-streaming-fir-run-tests: + # name: chipyard-streaming-fir-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-accels" + # project-key: "chipyard-streaming-fir" + # - uses: ./.github/actions/job-end + # + # chipyard-streaming-passthrough-run-tests: + # name: chipyard-streaming-passthrough-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-accels" + # project-key: "chipyard-streaming-passthrough" + # - uses: ./.github/actions/job-end + # + # chipyard-hwacha-run-tests: + # name: chipyard-hwacha-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-accels" + # project-key: "chipyard-hwacha" + # - uses: ./.github/actions/job-end + # + # chipyard-gemmini-run-tests: + # name: chipyard-gemmini-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-accels" + # project-key: "chipyard-gemmini" + # - uses: ./.github/actions/job-end + # + # chipyard-nvdla-run-tests: + # name: chipyard-nvdla-run-tests + # needs: prepare-chipyard-accels + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-accels" + # project-key: "chipyard-nvdla" + # - uses: ./.github/actions/job-end + # + # tracegen-boom-run-tests: + # name: tracegen-boom-run-tests + # needs: prepare-chipyard-tracegen + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-tracegen" + # project-key: "tracegen-boom" + # - uses: ./.github/actions/job-end + # + # tracegen-run-tests: + # name: tracegen-run-tests + # needs: prepare-chipyard-tracegen + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-tracegen" + # project-key: "tracegen" + # - uses: ./.github/actions/job-end + # + # icenet-run-tests: + # name: icenet-run-tests + # needs: prepare-chipyard-other + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-other" + # project-key: "icenet" + # - uses: ./.github/actions/job-end + # + # testchipip-run-tests: + # name: testchipip-run-tests + # needs: prepare-chipyard-other + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-other" + # project-key: "testchipip" + # - uses: ./.github/actions/job-end + # + # firesim-run-tests: + # name: firesim-run-tests + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "extra-tests" + # project-key: "firesim" + # run-script: "remote-run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # fireboom-run-tests: + # name: fireboom-run-tests + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "extra-tests" + # project-key: "fireboom" + # run-script: "remote-run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # firesim-multiclock-run-tests: + # name: firesim-multiclock-run-tests + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "extra-tests" + # project-key: "firesim-multiclock" + # run-script: "remote-run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # # Sentinel job to simplify how we specify which checks need to pass in branch + # # protection and in Mergify + # # + # # When adding new top level jobs, please add them to `needs` below + # all_tests_passed: + # name: "all tests passed" + # needs: [commit-on-master-check, tutorial-setup-check, documentation-check, + # chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, + # chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, + # chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, + # chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, + # chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, + # tracegen-boom-run-tests, tracegen-run-tests, + # icenet-run-tests, testchipip-run-tests, + # prepare-chipyard-fpga, + # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + # runs-on: ubuntu-latest + # steps: + # - run: echo Success! From 3afce5718b1b97596266c45182f9643bb3d9cd2f Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Tue, 12 Oct 2021 21:37:18 -0700 Subject: [PATCH 29/31] Testing theory --- .github/workflows/chipyard-run-tests.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index f27f726b..c4b4f6d3 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -24,19 +24,22 @@ jobs: name: test1 runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: | - mkdir -p $GITHUB_WORKSPACE echo "dummy" >> $GITHUB_WORKSPACE/temp.file echo "${{ hashFiles('**/temp.file') }}" + echo "${{ hashFiles('**/README.md') }}" test2: name: test2 runs-on: self-hosted steps: + - uses: actions/checkout@v2 - run: | - mkdir -p $GITHUB_WORKSPACE echo "dummy" >> $GITHUB_WORKSPACE/temp.file echo "${{ hashFiles('**/temp.file') }}" + echo "${{ hashFiles('**/README.md') }}" + test3: name: test3 @@ -45,12 +48,11 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - uses: actions/checkout@v2 - run: | - mkdir -p $GITHUB_WORKSPACE echo "dummy" >> $GITHUB_WORKSPACE/temp.file echo "${{ hashFiles('**/temp.file') }}" - - + echo "${{ hashFiles('**/README.md') }}" # commit-on-master-check: From 99f5345891ecc8703cd23e0380a4ec55cf92cdf2 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Tue, 12 Oct 2021 21:55:52 -0700 Subject: [PATCH 30/31] Try hack --- .github/actions/toolchain-build/action.yml | 32 +- .github/workflows/chipyard-run-tests.yml | 1385 ++++++++++---------- 2 files changed, 701 insertions(+), 716 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 0c74cc44..b2ee75c2 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -9,11 +9,31 @@ runs: shell: bash - run: | - cat $GITHUB_WORKSPACE/riscv-tools.hash - ls -alh $GITHUB_WORKSPACE/riscv-tools.hash - cat $GITHUB_WORKSPACE/esp-tools.hash - ls -alh $GITHUB_WORKSPACE/esp-tools.hash + echo "${{ hashFiles('**/riscv-tools.hash') }}" > riscv-tools.hashFilesOutput + echo "${{ hashFiles('**/esp-tools.hash') }}" > esp-tools.hashFilesOutput + shell: bash + + # AJG: hacky since "hashFiles" function differs on self-hosted vs GH-A machines + - name: Cache hashFiles outputs + uses: actions/cache@v2 + with: + path: | + riscv-tools.hashFilesOutput + esp-tools.hashFilesOutput + key: hashFiles-${{ github.sha }} + + - name: Generate cache keys based off hashFiles output + id: genkey + run: | + echo "::set-output name=riscv-tools-cache-key::$(cat riscv-tools.hashFilesOutput)" + echo "::set-output name=esp-tools-cache-key::$(cat esp-tools.hashFilesOutput)" + shell: bash + + - name: DEBUG - Check the output of the file vs the actual hashFiles output + run: | + echo "${{ steps.genkey.outputs.riscv-tools-cache-key }}" echo "${{ hashFiles('**/riscv-tools.hash') }}" + echo "${{ steps.genkey.outputs.esp-tools-cache-key }}" echo "${{ hashFiles('**/esp-tools.hash') }}" shell: bash @@ -21,7 +41,7 @@ runs: uses: actions/cache@v2 with: path: riscv-tools-install - key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/riscv-tools.hash') }} + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.riscv-tools-cache-key }} - name: Build RISC-V toolchain if not cached run: ./.github/scripts/build-toolchains.sh riscv-tools @@ -31,7 +51,7 @@ runs: uses: actions/cache@v2 with: path: esp-tools-install - key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/esp-tools.hash') }} + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.esp-tools-cache-key }} - name: Build ESP RISC-V toolchain if not cached run: ./.github/scripts/build-toolchains.sh esp-tools diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index c4b4f6d3..c932d3e6 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -20,720 +20,685 @@ jobs: with: access_token: ${{ github.token }} - test1: - name: test1 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: | - echo "dummy" >> $GITHUB_WORKSPACE/temp.file - echo "${{ hashFiles('**/temp.file') }}" - echo "${{ hashFiles('**/README.md') }}" - - test2: - name: test2 - runs-on: self-hosted - steps: - - uses: actions/checkout@v2 - - run: | - echo "dummy" >> $GITHUB_WORKSPACE/temp.file - echo "${{ hashFiles('**/temp.file') }}" - echo "${{ hashFiles('**/README.md') }}" - - - test3: - name: test3 + commit-on-master-check: + name: commit-on-master-check runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: actions/checkout@v2 - - run: | - echo "dummy" >> $GITHUB_WORKSPACE/temp.file - echo "${{ hashFiles('**/temp.file') }}" - echo "${{ hashFiles('**/README.md') }}" + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Check commits of each submodule + if: steps.job-start.outputs.run_result != 'success' + run: .github/scripts/check-commit.sh + - uses: ./.github/actions/job-end + tutorial-setup-check: + name: tutorial-setup-check + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Check that the tutorial-setup patches apply + if: steps.job-start.outputs.run_result != 'success' + run: scripts/tutorial-setup.sh + - uses: ./.github/actions/job-end - # commit-on-master-check: - # name: commit-on-master-check - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Check commits of each submodule - # if: steps.job-start.outputs.run_result != 'success' - # run: .github/scripts/check-commit.sh - # - uses: ./.github/actions/job-end - # - # tutorial-setup-check: - # name: tutorial-setup-check - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Check that the tutorial-setup patches apply - # if: steps.job-start.outputs.run_result != 'success' - # run: scripts/tutorial-setup.sh - # - uses: ./.github/actions/job-end - # - # documentation-check: - # name: documentation-check - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Check that documentation builds with no warnings/errors - # if: steps.job-start.outputs.run_result != 'success' - # run: | - # sudo apt-get update -y - # sudo apt-get install -y python3-pip - # sudo pip3 install -r docs/requirements.txt - # make -C docs html - # - name: Show error log from sphinx if failed - # if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - # run: cat /tmp/sphinx-err*.log - # - uses: ./.github/actions/job-end - # - # install-toolchains: - # name: install-toolchains - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RISC-V toolchains - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # - uses: ./.github/actions/job-end - # - # build-extra-tests: - # name: build-extra-tests - # needs: install-toolchains - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RISC-V toolchains - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # - name: Generate keys - # if: steps.job-start.outputs.run_result != 'success' - # id: genkey - # run: | - # echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - # - uses: actions/cache@v2 - # if: steps.job-start.outputs.run_result != 'success' - # id: build-extra-tools-cache - # with: - # path: extra-tests-install - # key: ${{ steps.genkey.outputs.extra-tests-cache-key }} - # restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} - # - name: Build extra tests - # if: steps.job-start.outputs.run_result != 'success' - # run: .github/scripts/build-extra-tests.sh - # - uses: ./.github/actions/job-end - # - # install-verilator: - # name: install-verilator - # runs-on: self-hosted - # needs: cancel-prior-workflows - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build verilator on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # run: .github/scripts/remote-install-verilator.sh - # - uses: ./.github/actions/job-end - # - # # Sentinel job to simplify how we specify which that basic setup is complete - # # - # # When adding new prep jobs, please add them to `needs` below - # setup-complete: - # name: setup-complete - # needs: [install-toolchains, install-verilator, build-extra-tests] - # runs-on: ubuntu-latest - # steps: - # - name: Set up complete - # run: echo Set up is complete! - # - # ########################################################################## - # - # prepare-chipyard-cores: - # name: prepare-chipyard-cores - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-cores" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-peripherals: - # name: prepare-chipyard-peripherals - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-peripherals" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-accels: - # name: prepare-chipyard-accels - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-accels" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-tracegen: - # name: prepare-chipyard-tracegen - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-tracegen" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-other: - # name: prepare-chipyard-other - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-other" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-fpga: - # name: prepare-chipyard-fpga - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-fpga" - # build-type: "fpga" - # - uses: ./.github/actions/job-end - # - # ########################################################################## - # - # chipyard-rocket-run-tests: - # name: chipyard-rocket-run-tests - # needs: prepare-chipyard-cores - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-cores" - # project-key: "chipyard-rocket" - # - uses: ./.github/actions/job-end - # - # chipyard-hetero-run-tests: - # name: chipyard-hetero-run-tests - # needs: prepare-chipyard-cores - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-cores" - # project-key: "chipyard-hetero" - # - uses: ./.github/actions/job-end - # - # chipyard-boom-run-tests: - # name: chipyard-boom-run-tests - # needs: prepare-chipyard-cores - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-cores" - # project-key: "chipyard-boom" - # - uses: ./.github/actions/job-end - # - # chipyard-cva6-run-tests: - # name: chipyard-cva6-run-tests - # needs: prepare-chipyard-cores - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-cores" - # project-key: "chipyard-cva6" - # - uses: ./.github/actions/job-end - # - # chipyard-sodor-run-tests: - # name: chipyard-sodor-run-tests - # needs: prepare-chipyard-cores - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-cores" - # project-key: "chipyard-sodor" - # - uses: ./.github/actions/job-end - # - # chipyard-dmirocket-run-tests: - # name: chipyard-dmirocket-run-tests - # needs: prepare-chipyard-peripherals - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-peripherals" - # project-key: "chipyard-dmirocket" - # - uses: ./.github/actions/job-end - # - # chipyard-spiflashwrite-run-tests: - # name: chipyard-spiflashwrite-run-tests - # needs: prepare-chipyard-peripherals - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-peripherals" - # project-key: "chipyard-spiflashwrite" - # - uses: ./.github/actions/job-end - # - # chipyard-spiflashread-run-tests: - # name: chipyard-spiflashread-run-tests - # needs: prepare-chipyard-peripherals - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-peripherals" - # project-key: "chipyard-spiflashread" - # - uses: ./.github/actions/job-end - # - # chipyard-lbwif-run-tests: - # name: chipyard-lbwif-run-tests - # needs: prepare-chipyard-peripherals - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-peripherals" - # project-key: "chipyard-lbwif" - # - uses: ./.github/actions/job-end - # - # chipyard-sha3-run-tests: - # name: chipyard-sha3-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-accels" - # project-key: "chipyard-sha3" - # - uses: ./.github/actions/job-end - # - # chipyard-streaming-fir-run-tests: - # name: chipyard-streaming-fir-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-accels" - # project-key: "chipyard-streaming-fir" - # - uses: ./.github/actions/job-end - # - # chipyard-streaming-passthrough-run-tests: - # name: chipyard-streaming-passthrough-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-accels" - # project-key: "chipyard-streaming-passthrough" - # - uses: ./.github/actions/job-end - # - # chipyard-hwacha-run-tests: - # name: chipyard-hwacha-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-accels" - # project-key: "chipyard-hwacha" - # - uses: ./.github/actions/job-end - # - # chipyard-gemmini-run-tests: - # name: chipyard-gemmini-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-accels" - # project-key: "chipyard-gemmini" - # - uses: ./.github/actions/job-end - # - # chipyard-nvdla-run-tests: - # name: chipyard-nvdla-run-tests - # needs: prepare-chipyard-accels - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-accels" - # project-key: "chipyard-nvdla" - # - uses: ./.github/actions/job-end - # - # tracegen-boom-run-tests: - # name: tracegen-boom-run-tests - # needs: prepare-chipyard-tracegen - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-tracegen" - # project-key: "tracegen-boom" - # - uses: ./.github/actions/job-end - # - # tracegen-run-tests: - # name: tracegen-run-tests - # needs: prepare-chipyard-tracegen - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-tracegen" - # project-key: "tracegen" - # - uses: ./.github/actions/job-end - # - # icenet-run-tests: - # name: icenet-run-tests - # needs: prepare-chipyard-other - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-other" - # project-key: "icenet" - # - uses: ./.github/actions/job-end - # - # testchipip-run-tests: - # name: testchipip-run-tests - # needs: prepare-chipyard-other - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-other" - # project-key: "testchipip" - # - uses: ./.github/actions/job-end - # - # firesim-run-tests: - # name: firesim-run-tests - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "extra-tests" - # project-key: "firesim" - # run-script: "remote-run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # fireboom-run-tests: - # name: fireboom-run-tests - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "extra-tests" - # project-key: "fireboom" - # run-script: "remote-run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # firesim-multiclock-run-tests: - # name: firesim-multiclock-run-tests - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "extra-tests" - # project-key: "firesim-multiclock" - # run-script: "remote-run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # # Sentinel job to simplify how we specify which checks need to pass in branch - # # protection and in Mergify - # # - # # When adding new top level jobs, please add them to `needs` below - # all_tests_passed: - # name: "all tests passed" - # needs: [commit-on-master-check, tutorial-setup-check, documentation-check, - # chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, - # chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, - # chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, - # chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, - # chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, - # tracegen-boom-run-tests, tracegen-run-tests, - # icenet-run-tests, testchipip-run-tests, - # prepare-chipyard-fpga, - # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - # runs-on: ubuntu-latest - # steps: - # - run: echo Success! + documentation-check: + name: documentation-check + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Check that documentation builds with no warnings/errors + if: steps.job-start.outputs.run_result != 'success' + run: | + sudo apt-get update -y + sudo apt-get install -y python3-pip + sudo pip3 install -r docs/requirements.txt + make -C docs html + - name: Show error log from sphinx if failed + if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + run: cat /tmp/sphinx-err*.log + - uses: ./.github/actions/job-end + + install-toolchains: + name: install-toolchains + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RISC-V toolchains + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + - uses: ./.github/actions/job-end + + build-extra-tests: + name: build-extra-tests + needs: install-toolchains + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RISC-V toolchains + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + - name: Generate keys + if: steps.job-start.outputs.run_result != 'success' + id: genkey + run: | + echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" + - uses: actions/cache@v2 + if: steps.job-start.outputs.run_result != 'success' + id: build-extra-tools-cache + with: + path: extra-tests-install + key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} + - name: Build extra tests + if: steps.job-start.outputs.run_result != 'success' + run: .github/scripts/build-extra-tests.sh + - uses: ./.github/actions/job-end + + install-verilator: + name: install-verilator + runs-on: self-hosted + needs: cancel-prior-workflows + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build verilator on self-hosted + if: steps.job-start.outputs.run_result != 'success' + run: .github/scripts/remote-install-verilator.sh + - uses: ./.github/actions/job-end + + # Sentinel job to simplify how we specify which that basic setup is complete + # + # When adding new prep jobs, please add them to `needs` below + setup-complete: + name: setup-complete + needs: [install-toolchains, install-verilator, build-extra-tests] + runs-on: ubuntu-latest + steps: + - name: Set up complete + run: echo Set up is complete! + + ########################################################################## + + prepare-chipyard-cores: + name: prepare-chipyard-cores + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-cores" + - uses: ./.github/actions/job-end + + prepare-chipyard-peripherals: + name: prepare-chipyard-peripherals + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-peripherals" + - uses: ./.github/actions/job-end + + prepare-chipyard-accels: + name: prepare-chipyard-accels + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-accels" + - uses: ./.github/actions/job-end + + prepare-chipyard-tracegen: + name: prepare-chipyard-tracegen + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-tracegen" + - uses: ./.github/actions/job-end + + prepare-chipyard-other: + name: prepare-chipyard-other + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-other" + - uses: ./.github/actions/job-end + + prepare-chipyard-fpga: + name: prepare-chipyard-fpga + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-fpga" + build-type: "fpga" + - uses: ./.github/actions/job-end + + ########################################################################## + + chipyard-rocket-run-tests: + name: chipyard-rocket-run-tests + needs: prepare-chipyard-cores + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-rocket" + - uses: ./.github/actions/job-end + + chipyard-hetero-run-tests: + name: chipyard-hetero-run-tests + needs: prepare-chipyard-cores + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-hetero" + - uses: ./.github/actions/job-end + + chipyard-boom-run-tests: + name: chipyard-boom-run-tests + needs: prepare-chipyard-cores + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-boom" + - uses: ./.github/actions/job-end + + chipyard-cva6-run-tests: + name: chipyard-cva6-run-tests + needs: prepare-chipyard-cores + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-cva6" + - uses: ./.github/actions/job-end + + chipyard-sodor-run-tests: + name: chipyard-sodor-run-tests + needs: prepare-chipyard-cores + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-sodor" + - uses: ./.github/actions/job-end + + chipyard-dmirocket-run-tests: + name: chipyard-dmirocket-run-tests + needs: prepare-chipyard-peripherals + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-dmirocket" + - uses: ./.github/actions/job-end + + chipyard-spiflashwrite-run-tests: + name: chipyard-spiflashwrite-run-tests + needs: prepare-chipyard-peripherals + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-spiflashwrite" + - uses: ./.github/actions/job-end + + chipyard-spiflashread-run-tests: + name: chipyard-spiflashread-run-tests + needs: prepare-chipyard-peripherals + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-spiflashread" + - uses: ./.github/actions/job-end + + chipyard-lbwif-run-tests: + name: chipyard-lbwif-run-tests + needs: prepare-chipyard-peripherals + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-lbwif" + - uses: ./.github/actions/job-end + + chipyard-sha3-run-tests: + name: chipyard-sha3-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-sha3" + - uses: ./.github/actions/job-end + + chipyard-streaming-fir-run-tests: + name: chipyard-streaming-fir-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-streaming-fir" + - uses: ./.github/actions/job-end + + chipyard-streaming-passthrough-run-tests: + name: chipyard-streaming-passthrough-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-streaming-passthrough" + - uses: ./.github/actions/job-end + + chipyard-hwacha-run-tests: + name: chipyard-hwacha-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-hwacha" + - uses: ./.github/actions/job-end + + chipyard-gemmini-run-tests: + name: chipyard-gemmini-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-gemmini" + - uses: ./.github/actions/job-end + + chipyard-nvdla-run-tests: + name: chipyard-nvdla-run-tests + needs: prepare-chipyard-accels + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-nvdla" + - uses: ./.github/actions/job-end + + tracegen-boom-run-tests: + name: tracegen-boom-run-tests + needs: prepare-chipyard-tracegen + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-tracegen" + project-key: "tracegen-boom" + - uses: ./.github/actions/job-end + + tracegen-run-tests: + name: tracegen-run-tests + needs: prepare-chipyard-tracegen + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-tracegen" + project-key: "tracegen" + - uses: ./.github/actions/job-end + + icenet-run-tests: + name: icenet-run-tests + needs: prepare-chipyard-other + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "icenet" + - uses: ./.github/actions/job-end + + testchipip-run-tests: + name: testchipip-run-tests + needs: prepare-chipyard-other + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "testchipip" + - uses: ./.github/actions/job-end + + firesim-run-tests: + name: firesim-run-tests + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "firesim" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + fireboom-run-tests: + name: fireboom-run-tests + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "fireboom" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + firesim-multiclock-run-tests: + name: firesim-multiclock-run-tests + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "firesim-multiclock" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + # Sentinel job to simplify how we specify which checks need to pass in branch + # protection and in Mergify + # + # When adding new top level jobs, please add them to `needs` below + all_tests_passed: + name: "all tests passed" + needs: [commit-on-master-check, tutorial-setup-check, documentation-check, + chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, + chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, + chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, + chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, + chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, + tracegen-boom-run-tests, tracegen-run-tests, + icenet-run-tests, testchipip-run-tests, + prepare-chipyard-fpga, + firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + runs-on: ubuntu-latest + steps: + - run: echo Success! From fdd9cb2f1d48ebdd410a7e9e398f9a5e51979b07 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Wed, 13 Oct 2021 09:43:44 -0700 Subject: [PATCH 31/31] Cleanup toolchain-build a bit more --- .github/actions/toolchain-build/action.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index b2ee75c2..c3492054 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -8,12 +8,13 @@ runs: run: .github/scripts/create-hash.sh shell: bash + # since "hashFiles" function differs on self-hosted vs GH-A machines + # make sure to cache the GH-A hashFiles result so that self-hosted can use it - run: | echo "${{ hashFiles('**/riscv-tools.hash') }}" > riscv-tools.hashFilesOutput echo "${{ hashFiles('**/esp-tools.hash') }}" > esp-tools.hashFilesOutput shell: bash - # AJG: hacky since "hashFiles" function differs on self-hosted vs GH-A machines - name: Cache hashFiles outputs uses: actions/cache@v2 with: @@ -29,30 +30,22 @@ runs: echo "::set-output name=esp-tools-cache-key::$(cat esp-tools.hashFilesOutput)" shell: bash - - name: DEBUG - Check the output of the file vs the actual hashFiles output - run: | - echo "${{ steps.genkey.outputs.riscv-tools-cache-key }}" - echo "${{ hashFiles('**/riscv-tools.hash') }}" - echo "${{ steps.genkey.outputs.esp-tools-cache-key }}" - echo "${{ hashFiles('**/esp-tools.hash') }}" - shell: bash - - name: Cache riscv-tools uses: actions/cache@v2 with: path: riscv-tools-install key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.riscv-tools-cache-key }} - - name: Build RISC-V toolchain if not cached - run: ./.github/scripts/build-toolchains.sh riscv-tools - shell: bash - - name: Cache esp-tools uses: actions/cache@v2 with: path: esp-tools-install key: esp-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.esp-tools-cache-key }} + - name: Build RISC-V toolchain if not cached + run: ./.github/scripts/build-toolchains.sh riscv-tools + shell: bash + - name: Build ESP RISC-V toolchain if not cached run: ./.github/scripts/build-toolchains.sh esp-tools shell: bash