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'
|
description: 'Builds RTL based on parameters, caches the entire chipyard root dir when done'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
tools-version:
|
|
||||||
description: Which toolchain to build
|
|
||||||
required: false
|
|
||||||
default: 'riscv-tools'
|
|
||||||
group-key:
|
group-key:
|
||||||
description: group key
|
description: group key
|
||||||
required: true
|
required: true
|
||||||
@@ -21,10 +17,8 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Build toolchain
|
- name: Build RISC-V toolchains
|
||||||
uses: ./.github/actions/toolchain-build
|
uses: ./.github/actions/toolchain-build
|
||||||
with:
|
|
||||||
tools-version: ${{ inputs.tools-version }}
|
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
id: rtl-build-id
|
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'
|
description: 'Runs tests according to input parameters'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
tools-version:
|
|
||||||
description: Which toolchain to build
|
|
||||||
required: false
|
|
||||||
default: 'riscv-tools'
|
|
||||||
group-key:
|
group-key:
|
||||||
description: group key
|
description: group key
|
||||||
required: true
|
required: true
|
||||||
@@ -28,7 +24,6 @@ runs:
|
|||||||
- name: Build RTL
|
- name: Build RTL
|
||||||
uses: ./.github/actions/prepare-rtl
|
uses: ./.github/actions/prepare-rtl
|
||||||
with:
|
with:
|
||||||
tools-version: ${{ inputs.tools-version }}
|
|
||||||
group-key: ${{ inputs.group-key }}
|
group-key: ${{ inputs.group-key }}
|
||||||
|
|
||||||
- name: Run RTL tests
|
- 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
|
name: toolchain-build
|
||||||
description: 'Builds or retrieves cache of the all toolchains'
|
description: 'Build/cache both toolchains'
|
||||||
|
|
||||||
inputs:
|
|
||||||
tools-version:
|
|
||||||
description: Which toolchain to build
|
|
||||||
required: false
|
|
||||||
default: 'riscv-tools'
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
@@ -14,28 +8,22 @@ runs:
|
|||||||
run: .github/scripts/create-hash.sh
|
run: .github/scripts/create-hash.sh
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# brute force way to swap between riscv/esp-tools caches
|
|
||||||
- name: Cache riscv-tools
|
- name: Cache riscv-tools
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
id: toolchain-build-riscv-tools
|
|
||||||
with:
|
with:
|
||||||
path: ${{ inputs.tools-version }}-install
|
path: riscv-tools-install
|
||||||
key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/riscv-tools.hash') }}
|
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
|
- name: Cache esp-tools
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
id: toolchain-build-esp-tools
|
|
||||||
with:
|
with:
|
||||||
path: ${{ inputs.tools-version }}-install
|
path: esp-tools-install
|
||||||
key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/esp-tools.hash') }}
|
key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/esp-tools.hash') }}
|
||||||
|
|
||||||
- name: Build toolchain if not cached
|
- name: Build ESP RISC-V toolchain if not cached
|
||||||
run: |
|
run: ./.github/scripts/build-toolchains.sh esp-tools
|
||||||
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
|
|
||||||
shell: bash
|
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
|
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]}
|
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
|
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]
|
on: [push]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
tools-cache-version: v8
|
tools-cache-version: v13
|
||||||
BUILDSERVER: ${{ secrets.BUILDSERVER }}
|
BUILDSERVER: ${{ secrets.BUILDSERVER }}
|
||||||
BUILDUSER: ${{ secrets.BUILDUSER }}
|
BUILDUSER: ${{ secrets.BUILDUSER }}
|
||||||
SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }}
|
SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }}
|
||||||
@@ -75,8 +75,8 @@ jobs:
|
|||||||
run: cat /tmp/sphinx-err*.log
|
run: cat /tmp/sphinx-err*.log
|
||||||
- uses: ./.github/actions/job-end
|
- uses: ./.github/actions/job-end
|
||||||
|
|
||||||
install-riscv-toolchain:
|
install-toolchains:
|
||||||
name: install-riscv-toolchain
|
name: install-toolchains
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ucbbar/chipyard-ci-image:554b436
|
image: ucbbar/chipyard-ci-image:554b436
|
||||||
@@ -86,34 +86,14 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- uses: ./.github/actions/job-start
|
- uses: ./.github/actions/job-start
|
||||||
id: job-start
|
id: job-start
|
||||||
- name: Build default RISC-V toolchain
|
- name: Build RISC-V toolchains
|
||||||
if: steps.job-start.outputs.run_result != 'success'
|
if: steps.job-start.outputs.run_result != 'success'
|
||||||
uses: ./.github/actions/toolchain-build
|
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
|
- uses: ./.github/actions/job-end
|
||||||
|
|
||||||
build-extra-tests:
|
build-extra-tests:
|
||||||
name: build-extra-tests
|
name: build-extra-tests
|
||||||
needs: install-riscv-toolchain
|
needs: install-toolchains
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ucbbar/chipyard-ci-image:554b436
|
image: ucbbar/chipyard-ci-image:554b436
|
||||||
@@ -123,11 +103,9 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- uses: ./.github/actions/job-start
|
- uses: ./.github/actions/job-start
|
||||||
id: job-start
|
id: job-start
|
||||||
- name: Build default RISC-V toolchain
|
- name: Build RISC-V toolchains
|
||||||
if: steps.job-start.outputs.run_result != 'success'
|
if: steps.job-start.outputs.run_result != 'success'
|
||||||
uses: ./.github/actions/toolchain-build
|
uses: ./.github/actions/toolchain-build
|
||||||
with:
|
|
||||||
tools-version: 'riscv-tools'
|
|
||||||
- name: Generate keys
|
- name: Generate keys
|
||||||
if: steps.job-start.outputs.run_result != 'success'
|
if: steps.job-start.outputs.run_result != 'success'
|
||||||
id: genkey
|
id: genkey
|
||||||
@@ -164,8 +142,7 @@ jobs:
|
|||||||
# When adding new prep jobs, please add them to `needs` below
|
# When adding new prep jobs, please add them to `needs` below
|
||||||
setup-complete:
|
setup-complete:
|
||||||
name: setup-complete
|
name: setup-complete
|
||||||
needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator,
|
needs: [install-toolchains, install-verilator, build-extra-tests]
|
||||||
build-extra-tests]
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up complete
|
- name: Set up complete
|
||||||
@@ -218,7 +195,6 @@ jobs:
|
|||||||
if: steps.job-start.outputs.run_result != 'success'
|
if: steps.job-start.outputs.run_result != 'success'
|
||||||
uses: ./.github/actions/prepare-rtl
|
uses: ./.github/actions/prepare-rtl
|
||||||
with:
|
with:
|
||||||
tools-version: "esp-tools"
|
|
||||||
group-key: "group-accels"
|
group-key: "group-accels"
|
||||||
- uses: ./.github/actions/job-end
|
- uses: ./.github/actions/job-end
|
||||||
|
|
||||||
@@ -469,7 +445,6 @@ jobs:
|
|||||||
if: steps.job-start.outputs.run_result != 'success'
|
if: steps.job-start.outputs.run_result != 'success'
|
||||||
uses: ./.github/actions/run-tests
|
uses: ./.github/actions/run-tests
|
||||||
with:
|
with:
|
||||||
tools-version: "esp-tools"
|
|
||||||
group-key: "group-accels"
|
group-key: "group-accels"
|
||||||
project-key: "chipyard-sha3"
|
project-key: "chipyard-sha3"
|
||||||
- uses: ./.github/actions/job-end
|
- uses: ./.github/actions/job-end
|
||||||
@@ -530,7 +505,6 @@ jobs:
|
|||||||
if: steps.job-start.outputs.run_result != 'success'
|
if: steps.job-start.outputs.run_result != 'success'
|
||||||
uses: ./.github/actions/run-tests
|
uses: ./.github/actions/run-tests
|
||||||
with:
|
with:
|
||||||
tools-version: "esp-tools"
|
|
||||||
group-key: "group-accels"
|
group-key: "group-accels"
|
||||||
project-key: "chipyard-hwacha"
|
project-key: "chipyard-hwacha"
|
||||||
- uses: ./.github/actions/job-end
|
- uses: ./.github/actions/job-end
|
||||||
@@ -551,7 +525,6 @@ jobs:
|
|||||||
if: steps.job-start.outputs.run_result != 'success'
|
if: steps.job-start.outputs.run_result != 'success'
|
||||||
uses: ./.github/actions/run-tests
|
uses: ./.github/actions/run-tests
|
||||||
with:
|
with:
|
||||||
tools-version: "esp-tools"
|
|
||||||
group-key: "group-accels"
|
group-key: "group-accels"
|
||||||
project-key: "chipyard-gemmini"
|
project-key: "chipyard-gemmini"
|
||||||
- uses: ./.github/actions/job-end
|
- uses: ./.github/actions/job-end
|
||||||
|
|||||||
Reference in New Issue
Block a user