Build both toolchains in 1 job + Rename toolchain build job

This commit is contained in:
abejgonzalez
2021-10-09 11:59:24 -07:00
parent 20ebcc9f1b
commit 78e733b992
5 changed files with 17 additions and 69 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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