481 lines
15 KiB
YAML
481 lines
15 KiB
YAML
name: chipyard-ci-gpu
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- graphics
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash -leo pipefail {0}
|
|
|
|
env:
|
|
tools-cache-version: v17
|
|
CI_DIR: ${{ secrets.BUILDDIR }}
|
|
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
|
conda-env-name-no-time: cy-${{ github.run_id }}
|
|
workflow-timestamp: ${{ github.event.pull_request.updated_at }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
jobs:
|
|
cancel-prior-workflows:
|
|
name: cancel-prior-workflows
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Cancel Previous Runs
|
|
uses: styfle/cancel-workflow-action@0.11.0
|
|
with:
|
|
access_token: ${{ github.token }}
|
|
|
|
# Set up a set of boolean conditions to control which branches of the CI
|
|
# workflow will execute This is based off the conditional job execution
|
|
# example here: https://github.com/dorny/paths-filter#examples
|
|
change-filters:
|
|
name: filter-jobs-on-changes
|
|
runs-on: self-hosted
|
|
# Queried by downstream jobs to determine if they should run.
|
|
outputs:
|
|
needs-rtl: ${{ steps.filter.outputs.all_count != steps.filter.outputs.skip-rtl_count }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- uses: dorny/paths-filter@v2
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
all:
|
|
- '**'
|
|
|
|
# If any of the files changed match, do a doc build
|
|
docs: &docs-filter
|
|
- 'docs/**'
|
|
- '.readthedocs.yml'
|
|
|
|
# If all files match to this filter, skip the main ci pipeline
|
|
skip-rtl:
|
|
- *docs-filter
|
|
- '**/*.md'
|
|
- '**/.gitignore'
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
|
|
create-conda-env:
|
|
name: create-conda-env
|
|
needs: [change-filters, cancel-prior-workflows]
|
|
if: needs.change-filters.outputs.needs-rtl == 'true'
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Cleanup conda
|
|
uses: ./.github/actions/cleanup-conda
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
|
|
# 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: [create-conda-env]
|
|
runs-on: self-hosted
|
|
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: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
- name: Build RTL on self-hosted
|
|
uses: ./.github/actions/prepare-rtl
|
|
with:
|
|
group-key: "group-cores"
|
|
|
|
prepare-chipyard-gpu:
|
|
name: prepare-chipyard-gpu
|
|
needs: setup-complete
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
- name: Prepare GPU binaries
|
|
uses: ./.github/actions/prepare-gpu
|
|
- name: Build RTL on self-hosted
|
|
uses: ./.github/actions/prepare-rtl
|
|
with:
|
|
group-key: "group-gpu"
|
|
|
|
# prepare-chipyard-accels:
|
|
# name: prepare-chipyard-accels
|
|
# needs: setup-complete
|
|
# runs-on: self-hosted
|
|
# steps:
|
|
# - name: Delete old checkout
|
|
# run: |
|
|
# ls -alh .
|
|
# rm -rf ${{ github.workspace }}/* || true
|
|
# rm -rf ${{ github.workspace }}/.* || true
|
|
# ls -alh .
|
|
# - name: Checkout
|
|
# uses: actions/checkout@v3
|
|
# - name: Git workaround
|
|
# uses: ./.github/actions/git-workaround
|
|
# - name: Create conda env
|
|
# uses: ./.github/actions/create-conda-env
|
|
# - name: Build RTL on self-hosted
|
|
# uses: ./.github/actions/prepare-rtl
|
|
# with:
|
|
# group-key: "group-accels"
|
|
|
|
prepare-chipyard-other:
|
|
name: prepare-chipyard-other
|
|
needs: setup-complete
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
- name: Build RTL on self-hosted
|
|
uses: ./.github/actions/prepare-rtl
|
|
with:
|
|
group-key: "group-other"
|
|
|
|
##########################################################################
|
|
|
|
# chipyard-spike-gemmini-run-tests:
|
|
# name: chipyard-spike-gemmini-run-tests
|
|
# needs: prepare-chipyard-accels # technically doesn't depend on RTL but should be after the build.sh for Gemmini
|
|
# runs-on: self-hosted
|
|
# steps:
|
|
# - name: Delete old checkout
|
|
# run: |
|
|
# ls -alh .
|
|
# rm -rf ${{ github.workspace }}/* || true
|
|
# rm -rf ${{ github.workspace }}/.* || true
|
|
# ls -alh .
|
|
# - name: Checkout
|
|
# uses: actions/checkout@v3
|
|
# - name: Git workaround
|
|
# uses: ./.github/actions/git-workaround
|
|
# - name: Create conda env
|
|
# uses: ./.github/actions/create-conda-env
|
|
# - name: Build Gemmini FireMarshal
|
|
# run: |
|
|
# conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools
|
|
# cd ${{ github.workspace }} && ./scripts/init-submodules-no-riscv-tools.sh --force
|
|
# cd ${{ github.workspace }} && source ./scripts/fix-open-files.sh
|
|
# git submodule update --init software/firemarshal && cd software/firemarshal && ./init-submodules.sh
|
|
# cd ${{ github.workspace }}/generators/gemmini/software && ${{ github.workspace }}/software/firemarshal/marshal -v -d build gemmini-smoke.json
|
|
# - name: Running Gemmini FireMarshal smoke test
|
|
# run: |
|
|
# conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools
|
|
# cd ${{ github.workspace }}/generators/gemmini/software && ${{ github.workspace }}/software/firemarshal/marshal -v -d launch -s gemmini-smoke.json
|
|
|
|
chipyard-rocket-run-tests:
|
|
name: chipyard-rocket-run-tests
|
|
needs: prepare-chipyard-cores
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
- name: Run tests
|
|
uses: ./.github/actions/run-tests
|
|
with:
|
|
group-key: "group-cores"
|
|
project-key: "chipyard-rocket"
|
|
|
|
chipyard-boom-run-tests:
|
|
name: chipyard-boom-run-tests
|
|
needs: prepare-chipyard-cores
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
- name: Run tests
|
|
uses: ./.github/actions/run-tests
|
|
with:
|
|
group-key: "group-cores"
|
|
project-key: "chipyard-boom"
|
|
|
|
chipyard-vortex-run-tests:
|
|
name: chipyard-vortex-run-tests
|
|
needs: prepare-chipyard-gpu
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
- name: Run tests
|
|
uses: ./.github/actions/run-tests
|
|
with:
|
|
group-key: "group-gpu"
|
|
project-key: "chipyard-vortex"
|
|
|
|
chipyard-coalescer-run-tests:
|
|
name: chipyard-coalescer-run-tests
|
|
needs: prepare-chipyard-gpu
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
- name: Run tests
|
|
uses: ./.github/actions/run-tests
|
|
with:
|
|
group-key: "group-gpu"
|
|
project-key: "chipyard-coalescer"
|
|
|
|
coalescer-run-tests:
|
|
name: coalescer-run-tests
|
|
needs: prepare-chipyard-gpu
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
- name: Run tests
|
|
uses: ./.github/actions/run-tests
|
|
with:
|
|
group-key: "group-gpu"
|
|
project-key: "coalescer"
|
|
|
|
chipyard-spike-run-tests:
|
|
name: chipyard-spike-run-tests
|
|
needs: prepare-chipyard-cores
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
- name: Run tests
|
|
uses: ./.github/actions/run-tests
|
|
with:
|
|
group-key: "group-cores"
|
|
project-key: "chipyard-spike"
|
|
|
|
# chipyard-gemmini-run-tests:
|
|
# name: chipyard-gemmini-run-tests
|
|
# needs: prepare-chipyard-accels
|
|
# runs-on: self-hosted
|
|
# steps:
|
|
# - name: Delete old checkout
|
|
# run: |
|
|
# ls -alh .
|
|
# rm -rf ${{ github.workspace }}/* || true
|
|
# rm -rf ${{ github.workspace }}/.* || true
|
|
# ls -alh .
|
|
# - name: Checkout
|
|
# uses: actions/checkout@v3
|
|
# - name: Git workaround
|
|
# uses: ./.github/actions/git-workaround
|
|
# - name: Create conda env
|
|
# uses: ./.github/actions/create-conda-env
|
|
# - name: Run tests
|
|
# uses: ./.github/actions/run-tests
|
|
# with:
|
|
# group-key: "group-accels"
|
|
# project-key: "chipyard-gemmini"
|
|
|
|
# chipyard-nvdla-run-tests:
|
|
# name: chipyard-nvdla-run-tests
|
|
# needs: prepare-chipyard-accels
|
|
# runs-on: self-hosted
|
|
# steps:
|
|
# - name: Delete old checkout
|
|
# run: |
|
|
# ls -alh .
|
|
# rm -rf ${{ github.workspace }}/* || true
|
|
# rm -rf ${{ github.workspace }}/.* || true
|
|
# ls -alh .
|
|
# - name: Checkout
|
|
# uses: actions/checkout@v3
|
|
# - name: Git workaround
|
|
# uses: ./.github/actions/git-workaround
|
|
# - name: Create conda env
|
|
# uses: ./.github/actions/create-conda-env
|
|
# - name: Run tests
|
|
# uses: ./.github/actions/run-tests
|
|
# with:
|
|
# group-key: "group-accels"
|
|
# project-key: "chipyard-nvdla"
|
|
|
|
testchipip-run-tests:
|
|
name: testchipip-run-tests
|
|
needs: prepare-chipyard-other
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
- name: Run tests
|
|
uses: ./.github/actions/run-tests
|
|
with:
|
|
group-key: "group-other"
|
|
project-key: "testchipip"
|
|
|
|
rocketchip-run-tests:
|
|
name: rocketchip-run-tests
|
|
needs: prepare-chipyard-other
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Delete old checkout
|
|
run: |
|
|
ls -alh .
|
|
rm -rf ${{ github.workspace }}/* || true
|
|
rm -rf ${{ github.workspace }}/.* || true
|
|
ls -alh .
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Git workaround
|
|
uses: ./.github/actions/git-workaround
|
|
- name: Create conda env
|
|
uses: ./.github/actions/create-conda-env
|
|
- name: Run amba tests
|
|
uses: ./.github/actions/run-tests
|
|
with:
|
|
group-key: "group-other"
|
|
project-key: "rocketchip-amba"
|
|
# Below tests segfault with verilator, work fine in VCS
|
|
# - name: Run tlsimple tests
|
|
# uses: ./.github/actions/run-tests
|
|
# with:
|
|
# group-key: "group-other"
|
|
# project-key: "rocketchip-tlsimple"
|
|
# - name: Run tlwidth tests
|
|
# uses: ./.github/actions/run-tests
|
|
# with:
|
|
# group-key: "group-other"
|
|
# project-key: "rocketchip-tlwidth"
|
|
# - name: Run tlxbar tests
|
|
# uses: ./.github/actions/run-tests
|
|
# with:
|
|
# group-key: "group-other"
|
|
# project-key: "rocketchip-tlxbar"
|
|
|
|
# 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: [chipyard-rocket-run-tests,
|
|
chipyard-boom-run-tests,
|
|
chipyard-vortex-run-tests,
|
|
coalescer-run-tests,
|
|
# chipyard-gemmini-run-tests,
|
|
testchipip-run-tests,
|
|
rocketchip-run-tests,
|
|
]
|
|
runs-on: self-hosted
|
|
steps:
|
|
- run: echo Success!
|