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: - name: Build toolchain uses: ./.github/actions/toolchain-build with: tools-version: ${{ inputs.tools-version }} - 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 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 rebuild RTL for ${{ inputs.group-key }}" fi shell: bash