Move Chipyard CI to Github Actions
- As similar as possible to the circle ci code. - The `.github/README.md` file has a fair amount of documentation for this. - Creates a worfklow file - re-uses most of the circleci/scipts unchanged - defines a number of *Composite Actions* which are like YML subroutines - Removes the circle-ci code - Points the CI badge in the top level README to use the GA test result
This commit is contained in:
41
.github/actions/prepare-rtl/action.yml
vendored
Normal file
41
.github/actions/prepare-rtl/action.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
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
|
||||
build-script:
|
||||
description: rtl build script to use
|
||||
required: false
|
||||
default: "do-rtl-build.sh"
|
||||
build-type:
|
||||
description: type of build
|
||||
required: false
|
||||
default: "sim"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
id: rtl-build-id
|
||||
with:
|
||||
path: |
|
||||
sims/verilator
|
||||
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
|
||||
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"
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user