Build both toolchains in 1 job + Rename toolchain build job
This commit is contained in:
8
.github/actions/prepare-rtl/action.yml
vendored
8
.github/actions/prepare-rtl/action.yml
vendored
@@ -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
|
||||
|
||||
5
.github/actions/run-tests/action.yml
vendored
5
.github/actions/run-tests/action.yml
vendored
@@ -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
|
||||
|
||||
30
.github/actions/toolchain-build/action.yml
vendored
30
.github/actions/toolchain-build/action.yml
vendored
@@ -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
|
||||
|
||||
2
.github/scripts/remote-do-rtl-build.sh
vendored
2
.github/scripts/remote-do-rtl-build.sh
vendored
@@ -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
|
||||
|
||||
41
.github/workflows/chipyard-run-tests.yml
vendored
41
.github/workflows/chipyard-run-tests.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user