diff --git a/.github/README.md b/.github/README.md index e864d705..4af1e9d9 100644 --- a/.github/README.md +++ b/.github/README.md @@ -6,11 +6,11 @@ Website: https://gihub.com/gh/ucb-bar/chipyard/actions GitHub Actions Brief Explanation --------------------------- -CI is executed by Github Actions (GA). GA is controlled by `.yml` files in the `.github/workflows/` directory. +CI is executed by Github Actions (GA). GA is controlled by `.yml` files in the `.github/workflows/` directory. In our case we have just one workflow named `chipyard-rocket-run-tests.yml`. It defines a number of `jobs` within it that do particular tasks. All jobs in the workflow must pass for the CI run to be successful. -In general, a job is run in parallel with others unless it depends on some other job. +In general, a job is run in parallel with others unless it depends on some other job. The dependency of one job on the completion of another is specified via the `needs` field. For example: @@ -36,7 +36,7 @@ we specify things over and over like docker image tag and checkout commands. One use of CA: our process relies on caching to avoid running time-consuming and intensive tasks more often than necessary. The following is an example of using the cache@v2 composite action. A step `uses: actions/cache@v2` which take as parameters the -path that contains the data to be cached and a key. Paths can have multiple targets. +path that contains the data to be cached and a key. Paths can have multiple targets. The following step can look at the result of the cache operation, if there was cache miss, then we run the command that will generate the data to be cached. The caching of the generated data is implicit. >Note: GA cache documentation suggests using the yml level `if: steps.cache-primes.outputs.cache-hit != 'true'` to @@ -73,14 +73,14 @@ The following is included in `.github/scripts/: directory `build-toolchains.sh` # build either riscv-tools or esp-tools `create-hash.sh` # create hashes of riscv-tools/esp-tools to use as hash keys - `do-rtl-build.sh` # use verilator to build a sim executable (remotely) + `remote-do-rtl-build.sh` # use verilator to build a sim executable (remotely) `defaults.sh` # default variables used `check-commit.sh` # check that submodule commits are valid `build-extra-tests.sh` # build default chipyard tests located in tests/ `clean-old-files.sh` # clean up build server files `do-fpga-rtl-build.sh` # similar to `do-rtl-build` but using fpga/ - `install-verilator.sh` # install verilator on build server - `run-firesim-scala-tests.sh` # run firesim scala tests + `remote-install-verilator.sh` # install verilator on build server + `remote-run-firesim-scala-tests.sh` # run firesim scala tests `run-tests.sh # run tests for a specific set of designs How things are set up for Chipyard @@ -117,11 +117,6 @@ After adding a private key, it will show a fingerprint that should be added unde Note: On the remote server you need to have the `*.pub` key file added to the `authorized_keys` file. -Additional Work ---------------- -- It would be nice to add the ability to re-run just parts of the workflow. [See Workflows Hacks](https://github.com/jaredpalmer/razzle/blob/f8305c26997bae8ef0f5dfa52540d842451b4090/.github/workflows/examples.yml) - - Notes on CIRCLE CI ------------------ This code is heavily based on the origin [CircleCI]() work. There a quite a few differences diff --git a/.github/actions/job-end/action.yml b/.github/actions/job-end/action.yml new file mode 100644 index 00000000..51b4f4d7 --- /dev/null +++ b/.github/actions/job-end/action.yml @@ -0,0 +1,8 @@ +name: job-end +description: "Save a job status" + +runs: + using: "composite" + steps: + - run: echo "success" > run_result + shell: bash diff --git a/.github/actions/job-start/action.yml b/.github/actions/job-start/action.yml new file mode 100644 index 00000000..dc4d0642 --- /dev/null +++ b/.github/actions/job-start/action.yml @@ -0,0 +1,19 @@ +name: job-start +description: "Setup a job status" +outputs: + run_result: + value: ${{ steps.run_result.outputs.run_result }} + +runs: + using: "composite" + steps: + - name: Restore the previous run result + uses: actions/cache@v2 + with: + path: run_result + key: ${{ github.run_id }}-${{ github.job }} + restore-keys: ${{ github.run_id }}-${{ github.job }} + - name: Set run_result to default or use cached value + id: run_result + run: echo "::set-output name=run_result::$(cat run_result 2>/dev/null || echo 'default')" + shell: bash diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index fd9e9759..25098bfc 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -2,17 +2,13 @@ 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" + default: "remote-do-rtl-build.sh" build-type: description: type of build required: false @@ -21,6 +17,9 @@ inputs: runs: using: "composite" steps: + - name: Build RISC-V toolchains + uses: ./.github/actions/toolchain-build + - uses: actions/cache@v2 id: rtl-build-id with: @@ -29,13 +28,13 @@ runs: 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 + + - 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 prepare rtl" + echo "Cache hit do not rebuild RTL for ${{ inputs.group-key }}" fi shell: bash - diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index a7cdebcb..d74b18af 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -2,6 +2,9 @@ name: run-tests description: 'Runs tests according to input parameters' inputs: + group-key: + description: group key + required: true project-key: description: project key required: true @@ -13,11 +16,16 @@ inputs: runs: using: "composite" steps: - - name: run rtl build script cache of chipyard root should have been loaded by prepare-rtl - run: | - export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" - export LD_LIBRARY_PATH="$RISCV/lib" - export PATH="$RISCV/bin:$PATH" - ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} + - name: Init submodules (since only the RTL is cached) + run: ./scripts/init-submodules-no-riscv-tools.sh shell: bash + # Note: You shouldn't need the other inputs since it shouldn't build RTL from scratch + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: ${{ inputs.group-key }} + + - name: Run RTL tests + run: ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} + shell: bash diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index cd883c61..c3492054 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -1,29 +1,51 @@ name: toolchain-build -description: 'Builds or retrieves cache of the selected toolchain' +description: 'Build/cache both toolchains' -inputs: - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' - cache-key: - description: Use this for caching - required: true runs: using: "composite" steps: - - uses: actions/cache@v2 - id: toolchain-build-id - with: - path: ${{ inputs.tools-version }}-install - key: ${{ inputs.cache-key }} - - name: run build toolchain if not cached - run: | - if [[ "${{ steps.toolchain-build-id.outputs.cache-hit }}" != 'true' ]]; then - echo "Cache miss on ${{ inputs.tools-version }}-install" - ./.github/scripts/build-toolchains.sh ${{ inputs.tools-version }} - else - echo "cache hit do not generate build ${{ inputs.tools-version }}" - fi + - name: Generate hashes + run: .github/scripts/create-hash.sh shell: bash + # since "hashFiles" function differs on self-hosted vs GH-A machines + # make sure to cache the GH-A hashFiles result so that self-hosted can use it + - run: | + echo "${{ hashFiles('**/riscv-tools.hash') }}" > riscv-tools.hashFilesOutput + echo "${{ hashFiles('**/esp-tools.hash') }}" > esp-tools.hashFilesOutput + shell: bash + + - name: Cache hashFiles outputs + uses: actions/cache@v2 + with: + path: | + riscv-tools.hashFilesOutput + esp-tools.hashFilesOutput + key: hashFiles-${{ github.sha }} + + - name: Generate cache keys based off hashFiles output + id: genkey + run: | + echo "::set-output name=riscv-tools-cache-key::$(cat riscv-tools.hashFilesOutput)" + echo "::set-output name=esp-tools-cache-key::$(cat esp-tools.hashFilesOutput)" + shell: bash + + - name: Cache riscv-tools + uses: actions/cache@v2 + with: + path: riscv-tools-install + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.riscv-tools-cache-key }} + + - name: Cache esp-tools + uses: actions/cache@v2 + with: + path: esp-tools-install + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.esp-tools-cache-key }} + + - name: Build RISC-V toolchain if not cached + run: ./.github/scripts/build-toolchains.sh riscv-tools + shell: bash + + - name: Build ESP RISC-V toolchain if not cached + run: ./.github/scripts/build-toolchains.sh esp-tools + shell: bash diff --git a/.github/scripts/build-extra-tests.sh b/.github/scripts/build-extra-tests.sh index 68bf7fe6..a77f5482 100755 --- a/.github/scripts/build-extra-tests.sh +++ b/.github/scripts/build-extra-tests.sh @@ -3,13 +3,13 @@ # turn echo on and error on earliest command set -ex -export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" -export LD_LIBRARY_PATH="$RISCV/lib" -export PATH="$RISCV/bin:$PATH" - # get shared variables SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh +export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +export LD_LIBRARY_PATH="$RISCV/lib" +export PATH="$RISCV/bin:$PATH" + make -C $LOCAL_CHIPYARD_DIR/tests clean make -C $LOCAL_CHIPYARD_DIR/tests diff --git a/.github/scripts/build-toolchains.sh b/.github/scripts/build-toolchains.sh index 160b6f5a..cd1abb1d 100755 --- a/.github/scripts/build-toolchains.sh +++ b/.github/scripts/build-toolchains.sh @@ -15,4 +15,7 @@ if [ ! -d "$HOME/$1-install" ]; then # init all submodules including the tools CHIPYARD_DIR="$LOCAL_CHIPYARD_DIR" NPROC=$CI_MAKE_NPROC $LOCAL_CHIPYARD_DIR/scripts/build-toolchains.sh $1 + + # de-init the toolchain area to save on space + git submodule deinit $LOCAL_CHIPYARD_DIR/toolchains/$1 fi diff --git a/.github/scripts/create-hash.sh b/.github/scripts/create-hash.sh index dae9f25d..f64c0696 100755 --- a/.github/scripts/create-hash.sh +++ b/.github/scripts/create-hash.sh @@ -17,4 +17,4 @@ for tools in 'riscv-tools' 'esp-tools' ; do echo "${line#[!0-9a-f]}" done > "${tools}.hash" done -echo "Hashfile for riscv-tools and esp-tools created in $HOME" +echo "Hashfile for riscv-tools and esp-tools created in $PWD" diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 3d08e74b..04ccd331 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -1,22 +1,5 @@ #!/bin/bash -copy () { - rsync -azp -e 'ssh' --exclude '.git' $1 $2 -} - -run () { - ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER $@ -} - -run_script () { - ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" -} - -clean () { - # remove remote work dir - run "rm -rf $REMOTE_WORK_DIR" -} - # make parallelism CI_MAKE_NPROC=8 # chosen based on a 24c system shared with 1 other project @@ -25,18 +8,17 @@ REMOTE_MAKE_NPROC=4 # verilator version VERILATOR_VERSION=v4.034 -# remote variables - +HOME=$GITHUB_WORKSPACE CURRENT_BRANCH=$(git branch --show-current) +# remote variables # CI_DIR is defined externally based on the GH repository secret BUILDDIR -HOME=`pwd` REMOTE_PREFIX=$CI_DIR/${GITHUB_REPOSITORY#*/}-$CURRENT_BRANCH -REMOTE_WORK_DIR=$REMOTE_PREFIX-$GITHUB_SHA-$GITHUB_JOB -REMOTE_RISCV_DIR=$REMOTE_WORK_DIR/riscv-tools-install -REMOTE_ESP_DIR=$REMOTE_WORK_DIR/esp-tools-install -REMOTE_CHIPYARD_DIR=$REMOTE_WORK_DIR/chipyard +REMOTE_WORK_DIR=$GITHUB_WORKSPACE +REMOTE_RISCV_DIR=$GITHUB_WORKSPACE/riscv-tools-install +REMOTE_ESP_DIR=$GITHUB_WORKSPACE/esp-tools-install +REMOTE_CHIPYARD_DIR=$GITHUB_WORKSPACE REMOTE_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/verilator REMOTE_FIRESIM_DIR=$REMOTE_CHIPYARD_DIR/sims/firesim/sim REMOTE_FPGA_DIR=$REMOTE_CHIPYARD_DIR/fpga diff --git a/.github/scripts/do-rtl-build.sh b/.github/scripts/do-rtl-build.sh deleted file mode 100755 index 3a5d56ca..00000000 --- a/.github/scripts/do-rtl-build.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash - -# create the different verilator builds -# usage: -# do-rtl-build.sh sim -# run rtl build for simulations and copy back results -# do-rtl-build.sh fpga -# run rtl build for fpga and don't copy back results - -# turn echo on and error on earliest command -set -ex - -# get shared variables -SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -source $SCRIPT_DIR/defaults.sh - -# call clean on exit -trap clean EXIT - -cd $LOCAL_CHIPYARD_DIR -./scripts/init-submodules-no-riscv-tools.sh -./scripts/init-fpga.sh - -# replace the workspace dir with a local dir so you can copy around -sed -i -E 's/(workspace=).*(\/tools)/\1$PWD\2/g' .sbtopts - -# set stricthostkeychecking to no (must happen before rsync) -run "echo \"Ping $SERVER\"" - -clean - -# copy over riscv/esp-tools, and chipyard to remote -run "mkdir -p $REMOTE_CHIPYARD_DIR" -copy $LOCAL_CHIPYARD_DIR/ $SERVER:$REMOTE_CHIPYARD_DIR - -run "cp -r ~/.ivy2 $REMOTE_WORK_DIR" -run "cp -r ~/.sbt $REMOTE_WORK_DIR" - -TOOLS_DIR=$REMOTE_RISCV_DIR -LD_LIB_DIR=$REMOTE_RISCV_DIR/lib - -if [ $1 = "group-accels" ]; then - export RISCV=$LOCAL_ESP_DIR - export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib - export PATH=$RISCV/bin:$PATH - GEMMINI_SOFTWARE_DIR=$LOCAL_SIM_DIR/../../generators/gemmini/software/gemmini-rocc-tests - cd $LOCAL_SIM_DIR/../../generators/gemmini/software - git submodule update --init --recursive gemmini-rocc-tests - cd gemmini-rocc-tests - ./build.sh - - TOOLS_DIR=$REMOTE_ESP_DIR - LD_LIB_DIR=$REMOTE_ESP_DIR/lib - run "mkdir -p $REMOTE_ESP_DIR" - copy $LOCAL_ESP_DIR/ $SERVER:$REMOTE_ESP_DIR -else - run "mkdir -p $REMOTE_RISCV_DIR" - copy $LOCAL_RISCV_DIR/ $SERVER:$REMOTE_RISCV_DIR -fi - -# choose what make dir to use -case $2 in - "sim") - REMOTE_MAKE_DIR=$REMOTE_SIM_DIR - ;; - "fpga") - REMOTE_MAKE_DIR=$REMOTE_FPGA_DIR - ;; -esac - -# enter the verilator directory and build the specific config on remote server -run "export RISCV=\"$TOOLS_DIR\"; \ - make -C $REMOTE_MAKE_DIR clean;" - -read -a keys <<< ${grouping[$1]} - -# need to set the PATH to use the new verilator (with the new verilator root) -for key in "${keys[@]}" -do - run "export RISCV=\"$TOOLS_DIR\"; \ - export LD_LIBRARY_PATH=\"$LD_LIB_DIR\"; \ - export PATH=\"$REMOTE_VERILATOR_DIR/bin:\$PATH\"; \ - export VERILATOR_ROOT=\"$REMOTE_VERILATOR_DIR\"; \ - 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 - -run "rm -rf $REMOTE_CHIPYARD_DIR/project" - -# choose to copy back results -if [ $2 = "sim" ]; then - # copy back the final build - mkdir -p $LOCAL_CHIPYARD_DIR - copy $SERVER:$REMOTE_CHIPYARD_DIR/ $LOCAL_CHIPYARD_DIR -fi diff --git a/.github/scripts/install-verilator.sh b/.github/scripts/install-verilator.sh deleted file mode 100755 index f667b365..00000000 --- a/.github/scripts/install-verilator.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# move verilator to the remote server - -# turn echo on and error on earliest command -set -ex - -# get shared variables -SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -source $SCRIPT_DIR/defaults.sh - -# clean older directories (delete prior directories related to this branch also) -run_script $LOCAL_CHIPYARD_DIR/.github/scripts/clean-old-files.sh $CI_DIR -run "rm -rf $REMOTE_PREFIX*" - -# set stricthostkeychecking to no (must happen before rsync) -run "echo \"Ping $SERVER\"" - -run "git clone http://git.veripool.org/git/verilator $REMOTE_VERILATOR_DIR; \ - cd $REMOTE_VERILATOR_DIR; \ - git checkout $VERILATOR_VERSION; \ - autoconf; \ - export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR; \ - ./configure; \ - make -j$REMOTE_MAKE_NPROC;" diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh new file mode 100755 index 00000000..a5268288 --- /dev/null +++ b/.github/scripts/remote-do-rtl-build.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +# create the different verilator builds +# usage: +# do-rtl-build.sh sim +# run rtl build for simulations and copy back results +# do-rtl-build.sh fpga +# run rtl build for fpga and don't copy back results + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +cd $REMOTE_CHIPYARD_DIR +./scripts/init-submodules-no-riscv-tools.sh +./scripts/init-fpga.sh + +TOOLS_DIR=$REMOTE_RISCV_DIR +LD_LIB_DIR=$REMOTE_RISCV_DIR/lib + +if [ $1 = "group-accels" ]; then + export RISCV=$REMOTE_ESP_DIR + export LD_LIBRARY_PATH=$REMOTE_ESP_DIR/lib + export PATH=$RISCV/bin:$PATH + pushd $REMOTE_CHIPYARD_DIR/generators/gemmini/software + git submodule update --init --recursive gemmini-rocc-tests + pushd gemmini-rocc-tests + ./build.sh + popd + popd +fi + +# choose what make dir to use +case $2 in + "sim") + REMOTE_MAKE_DIR=$REMOTE_SIM_DIR + ;; + "fpga") + REMOTE_MAKE_DIR=$REMOTE_FPGA_DIR + ;; +esac + +# enter the verilator directory and build the specific config on remote server +export RISCV=$TOOLS_DIR +make -C $REMOTE_MAKE_DIR clean + +read -a keys <<< ${grouping[$1]} + +# need to set the PATH to use the new verilator (with the new verilator root) +for key in "${keys[@]}" +do + export RISCV=$TOOLS_DIR + export LD_LIBRARY_PATH=$LD_LIB_DIR + export PATH=$REMOTE_VERILATOR_DIR/bin:$PATH + export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR + 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 diff --git a/.github/scripts/remote-install-verilator.sh b/.github/scripts/remote-install-verilator.sh new file mode 100755 index 00000000..b244614e --- /dev/null +++ b/.github/scripts/remote-install-verilator.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# install verilator + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +# clean older directories (delete prior directories related to this branch also) +$SCRIPT_DIR/clean-old-files.sh $CI_DIR +rm -rf $REMOTE_PREFIX* + +git clone http://git.veripool.org/git/verilator $REMOTE_VERILATOR_DIR +cd $REMOTE_VERILATOR_DIR +git checkout $VERILATOR_VERSION +autoconf +export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR +./configure +make -j$REMOTE_MAKE_NPROC diff --git a/.github/scripts/remote-run-firesim-scala-tests.sh b/.github/scripts/remote-run-firesim-scala-tests.sh new file mode 100755 index 00000000..732cb59d --- /dev/null +++ b/.github/scripts/remote-run-firesim-scala-tests.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# create the different verilator builds +# argument is the make command string + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +export RISCV="$REMOTE_RISCV_DIR" +export LD_LIBRARY_PATH="$RISCV/lib" +export PATH="$RISCV/bin:$PATH" + +# Directory locations for handling firesim-local installations of libelf/libdwarf +# This would generally be handled by build-setup.sh/firesim-setup.sh +REMOTE_FIRESIM_SYSROOT=$REMOTE_FIRESIM_DIR/lib-install + +./scripts/init-submodules-no-riscv-tools.sh +cd $REMOTE_CHIPYARD_DIR/sims/firesim/sim/firesim-lib/src/main/cc/lib +git submodule update --init elfutils libdwarf +cd $REMOTE_CHIPYARD_DIR/sims/firesim +mkdir -p $REMOTE_FIRESIM_SYSROOT +./scripts/build-libelf.sh $REMOTE_FIRESIM_SYSROOT +./scripts/build-libdwarf.sh $REMOTE_FIRESIM_SYSROOT +cd $REMOTE_CHIPYARD_DIR + +make -C $REMOTE_CHIPYARD_DIR/tools/dromajo/dromajo-src/src + +TOOLS_DIR=$REMOTE_RISCV_DIR + +LD_LIB_DIR=$REMOTE_FIRESIM_SYSROOT/lib:$REMOTE_RISCV_DIR/lib + +# Run Firesim Scala Tests +export RISCV=$TOOLS_DIR +export LD_LIBRARY_PATH=$LD_LIB_DIR +export FIRESIM_ENV_SOURCED=1; +export PATH=$REMOTE_VERILATOR_DIR/bin:$PATH +export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR +export COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache +make -C $REMOTE_FIRESIM_DIR JAVA_OPTS="$REMOTE_JAVA_OPTS" SBT_OPTS="$REMOTE_SBT_OPTS" testOnly ${mapping[$1]} diff --git a/.github/scripts/run-firesim-scala-tests.sh b/.github/scripts/run-firesim-scala-tests.sh deleted file mode 100755 index a848df62..00000000 --- a/.github/scripts/run-firesim-scala-tests.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash - -# create the different verilator builds -# argument is the make command string - -# turn echo on and error on earliest command -set -ex - -# get shared variables -SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -source $SCRIPT_DIR/defaults.sh - -# call clean on exit -trap clean EXIT - -# Directory locations for handling firesim-local installations of libelf/libdwarf -# This would generally be handled by build-setup.sh/firesim-setup.sh -firesim_sysroot=lib-install -local_firesim_sysroot=$LOCAL_FIRESIM_DIR/$firesim_sysroot -remote_firesim_sysroot=$REMOTE_FIRESIM_DIR/$firesim_sysroot - -cd $LOCAL_CHIPYARD_DIR -./scripts/init-submodules-no-riscv-tools.sh -cd $LOCAL_CHIPYARD_DIR/sims/firesim/sim/firesim-lib/src/main/cc/lib -git submodule update --init elfutils libdwarf -cd $LOCAL_CHIPYARD_DIR/sims/firesim -mkdir -p $local_firesim_sysroot -./scripts/build-libelf.sh $local_firesim_sysroot -./scripts/build-libdwarf.sh $local_firesim_sysroot -cd $LOCAL_CHIPYARD_DIR - -# replace the workspace dir with a local dir so you can copy around -sed -i -E 's/(workspace=).*(\/tools)/\1$PWD\2/g' .sbtopts - -make -C $LOCAL_CHIPYARD_DIR/tools/dromajo/dromajo-src/src - -# set stricthostkeychecking to no (must happen before rsync) -run "echo \"Ping $SERVER\"" - -clean - -# copy over riscv/esp-tools, and chipyard to remote -run "mkdir -p $REMOTE_CHIPYARD_DIR" -run "mkdir -p $REMOTE_RISCV_DIR" -copy $LOCAL_CHIPYARD_DIR/ $SERVER:$REMOTE_CHIPYARD_DIR -copy $LOCAL_RISCV_DIR/ $SERVER:$REMOTE_RISCV_DIR - -run "cp -r ~/.ivy2 $REMOTE_WORK_DIR" -run "cp -r ~/.sbt $REMOTE_WORK_DIR" - -TOOLS_DIR=$REMOTE_RISCV_DIR - -LD_LIB_DIR=$remote_firesim_sysroot/lib:$REMOTE_RISCV_DIR/lib - -# Run Firesim Scala Tests -run "export RISCV=\"$TOOLS_DIR\"; \ - export LD_LIBRARY_PATH=\"$LD_LIB_DIR\"; \ - export FIRESIM_ENV_SOURCED=1; \ - export PATH=\"$REMOTE_VERILATOR_DIR/bin:\$PATH\"; \ - export VERILATOR_ROOT=\"$REMOTE_VERILATOR_DIR\"; \ - export COURSIER_CACHE=\"$REMOTE_WORK_DIR/.coursier-cache\"; \ - make -C $REMOTE_FIRESIM_DIR JAVA_OPTS=\"$REMOTE_JAVA_OPTS\" SBT_OPTS=\"$REMOTE_SBT_OPTS\" testOnly ${mapping[$1]}" diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index ab3cf5cc..93475a19 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -9,6 +9,10 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh +export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +export LD_LIBRARY_PATH="$RISCV/lib" +export PATH="$RISCV/bin:$PATH" + run_bmark () { make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ } @@ -26,8 +30,6 @@ run_tracegen () { make tracegen -C $LOCAL_SIM_DIR $@ } -# TODO BUG: the run-binary command forces a rebuild of the simulator in CI -# instead, directly run the simulator binary case $1 in chipyard-rocket) run_bmark ${mapping[$1]} @@ -60,32 +62,32 @@ case $1 in GEMMINI_SOFTWARE_DIR=$LOCAL_SIM_DIR/../../generators/gemmini/software/gemmini-rocc-tests rm -rf $GEMMINI_SOFTWARE_DIR/riscv-tests cd $LOCAL_SIM_DIR - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/mvin_mvout-baremetal + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/mvin_mvout-baremetal ;; chipyard-sha3) export RISCV=$LOCAL_ESP_DIR export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib export PATH=$RISCV/bin:$PATH (cd $LOCAL_CHIPYARD_DIR/generators/sha3/software && ./build.sh) - $LOCAL_SIM_DIR/simulator-chipyard-Sha3RocketConfig $LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv ;; chipyard-streaming-passthrough) make -C $LOCAL_CHIPYARD_DIR/tests - $LOCAL_SIM_DIR/simulator-chipyard-StreamingPassthroughRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv ;; chipyard-streaming-fir) make -C $LOCAL_CHIPYARD_DIR/tests - $LOCAL_SIM_DIR/simulator-chipyard-StreamingFIRRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv ;; chipyard-spiflashread) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashread.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashread.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary-fast ;; chipyard-spiflashwrite) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary-fast [[ "`xxd $LOCAL_CHIPYARD_DIR/tests/spiflash.img | grep 1337\ 00ff\ aa55\ face | wc -l`" == "6" ]] || false ;; tracegen) @@ -102,7 +104,7 @@ case $1 in ;; chipyard-nvdla) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary-fast ;; icenet) make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index aa5c438e..c932d3e6 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -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 }} @@ -11,6 +11,15 @@ env: JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit jobs: + cancel-prior-workflows: + name: cancel-prior-workflows + runs-on: ubuntu-latest + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + commit-on-master-check: name: commit-on-master-check runs-on: ubuntu-latest @@ -20,8 +29,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Check commits of each submodule + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh + - uses: ./.github/actions/job-end tutorial-setup-check: name: tutorial-setup-check @@ -32,8 +45,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Check that the tutorial-setup patches apply + if: steps.job-start.outputs.run_result != 'success' run: scripts/tutorial-setup.sh + - uses: ./.github/actions/job-end documentation-check: name: documentation-check @@ -44,45 +61,22 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Check that documentation builds with no warnings/errors + if: steps.job-start.outputs.run_result != 'success' run: | sudo apt-get update -y sudo apt-get install -y python3-pip sudo pip3 install -r docs/requirements.txt make -C docs html - name: Show error log from sphinx if failed - if: ${{ failure() }} + if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} run: cat /tmp/sphinx-err*.log + - uses: ./.github/actions/job-end - make-keys: - name: make-keys - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - name: Checkout - uses: actions/checkout@v2 - - name: Generate hashes - run: .github/scripts/create-hash.sh - - name: Generate keys - id: genkey - run: | - echo "::set-output name=riscvtools-cache-key::riscv-tools-installed-${{ env.tools-cache-version }}-$(shasum riscv-tools.hash | cut -d' ' -f1)" - echo "::set-output name=esptools-cache-key::esp-tools-installed-${{ env.tools-cache-version }}-$(shasum esp-tools.hash | cut -d' ' -f1)" - echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - outputs: - riscvtools-cache-key: ${{ steps.genkey.outputs.riscvtools-cache-key }} - esptools-cache-key: ${{ steps.genkey.outputs.esptools-cache-key }} - extra-tests-cache-key: ${{ steps.genkey.outputs.extra-tests-cache-key }} - - install-riscv-toolchain: - needs: make-keys - name: install-riscv-toolchain + install-toolchains: + name: install-toolchains runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -90,35 +84,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Build default RISC-V toolchain + - uses: ./.github/actions/job-start + id: job-start + - name: Build RISC-V toolchains + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - install-esp-toolchain: - needs: make-keys - 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 - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Build ESP RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} + - uses: ./.github/actions/job-end build-extra-tests: name: build-extra-tests - needs: [make-keys, install-riscv-toolchain] + needs: install-toolchains runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -126,47 +101,48 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Build default RISC-V toolchain + - uses: ./.github/actions/job-start + id: job-start + - name: Build RISC-V toolchains + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Generate keys + if: steps.job-start.outputs.run_result != 'success' + id: genkey + run: | + echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - uses: actions/cache@v2 + if: steps.job-start.outputs.run_result != 'success' id: build-extra-tools-cache with: path: extra-tests-install - key: ${{ needs.make-keys.outputs.extra-tests-cache-key }} - restore-keys: ${{ needs.make-keys.outputs.extra-tests-cache-key }} - - name: Build extra tests if not cached + key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} + - name: Build extra tests + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/build-extra-tests.sh + - uses: ./.github/actions/job-end install-verilator: name: install-verilator - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + runs-on: self-hosted + needs: cancel-prior-workflows steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Build verilator on remote - run: .github/scripts/install-verilator.sh + - uses: ./.github/actions/job-start + id: job-start + - name: Build verilator on self-hosted + if: steps.job-start.outputs.run_result != 'success' + run: .github/scripts/remote-install-verilator.sh + - uses: ./.github/actions/job-end # Sentinel job to simplify how we specify which that basic setup is complete # # When adding new prep jobs, please add them to `needs` below setup-complete: - name: "setup complete" - needs: [commit-on-master-check, tutorial-setup-check, documentation-check, - install-riscv-toolchain, install-esp-toolchain, install-verilator, - build-extra-tests] + name: setup-complete + needs: [install-toolchains, install-verilator, build-extra-tests] runs-on: ubuntu-latest steps: - name: Set up complete @@ -176,184 +152,106 @@ jobs: prepare-chipyard-cores: name: prepare-chipyard-cores - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + needs: setup-complete + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" + - uses: ./.github/actions/job-end prepare-chipyard-peripherals: name: prepare-chipyard-peripherals - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + needs: setup-complete + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" + - uses: ./.github/actions/job-end prepare-chipyard-accels: name: prepare-chipyard-accels - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + needs: setup-complete + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" + - uses: ./.github/actions/job-end prepare-chipyard-tracegen: name: prepare-chipyard-tracegen - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + needs: setup-complete + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-tracegen" + - uses: ./.github/actions/job-end prepare-chipyard-other: name: prepare-chipyard-other - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + needs: setup-complete + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-other" + - uses: ./.github/actions/job-end prepare-chipyard-fpga: name: prepare-chipyard-fpga - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + needs: setup-complete + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-fpga" build-type: "fpga" + - uses: ./.github/actions/job-end ########################################################################## chipyard-rocket-run-tests: name: chipyard-rocket-run-tests - needs: [make-keys, prepare-chipyard-cores] + needs: prepare-chipyard-cores runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -361,32 +259,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-rocket" + - uses: ./.github/actions/job-end chipyard-hetero-run-tests: name: chipyard-hetero-run-tests - needs: [make-keys, prepare-chipyard-cores] + needs: prepare-chipyard-cores runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -394,32 +279,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-hetero" + - uses: ./.github/actions/job-end chipyard-boom-run-tests: name: chipyard-boom-run-tests - needs: [make-keys, prepare-chipyard-cores] + needs: prepare-chipyard-cores runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -427,32 +299,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-boom" + - uses: ./.github/actions/job-end chipyard-cva6-run-tests: name: chipyard-cva6-run-tests - needs: [make-keys, prepare-chipyard-cores] + needs: prepare-chipyard-cores runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -460,32 +319,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-cva6" + - uses: ./.github/actions/job-end chipyard-sodor-run-tests: name: chipyard-sodor-run-tests - needs: [make-keys, prepare-chipyard-cores] + needs: prepare-chipyard-cores runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -493,32 +339,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-sodor" + - uses: ./.github/actions/job-end chipyard-dmirocket-run-tests: name: chipyard-dmirocket-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -526,32 +359,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-dmirocket" + - uses: ./.github/actions/job-end chipyard-spiflashwrite-run-tests: name: chipyard-spiflashwrite-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -559,32 +379,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-spiflashwrite" + - uses: ./.github/actions/job-end chipyard-spiflashread-run-tests: name: chipyard-spiflashread-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -592,32 +399,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-spiflashread" + - uses: ./.github/actions/job-end chipyard-lbwif-run-tests: name: chipyard-lbwif-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -625,32 +419,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-lbwif" + - uses: ./.github/actions/job-end chipyard-sha3-run-tests: name: chipyard-sha3-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -658,32 +439,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-sha3" + - uses: ./.github/actions/job-end chipyard-streaming-fir-run-tests: name: chipyard-streaming-fir-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -691,32 +459,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-streaming-fir" + - uses: ./.github/actions/job-end chipyard-streaming-passthrough-run-tests: name: chipyard-streaming-passthrough-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -724,32 +479,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-streaming-passthrough" + - uses: ./.github/actions/job-end chipyard-hwacha-run-tests: name: chipyard-hwacha-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -757,32 +499,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-hwacha" + - uses: ./.github/actions/job-end chipyard-gemmini-run-tests: name: chipyard-gemmini-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -790,32 +519,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-gemmini" + - uses: ./.github/actions/job-end chipyard-nvdla-run-tests: name: chipyard-nvdla-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -823,32 +539,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-nvdla" + - uses: ./.github/actions/job-end tracegen-boom-run-tests: name: tracegen-boom-run-tests - needs: [make-keys, prepare-chipyard-tracegen] + needs: prepare-chipyard-tracegen runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -856,32 +559,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-tracegen" project-key: "tracegen-boom" + - uses: ./.github/actions/job-end tracegen-run-tests: name: tracegen-run-tests - needs: [make-keys, prepare-chipyard-tracegen] + needs: prepare-chipyard-tracegen runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -889,32 +579,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-tracegen" project-key: "tracegen" + - uses: ./.github/actions/job-end icenet-run-tests: name: icenet-run-tests - needs: [make-keys, prepare-chipyard-other] + needs: prepare-chipyard-other runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -922,32 +599,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-other" project-key: "icenet" + - uses: ./.github/actions/job-end testchipip-run-tests: name: testchipip-run-tests - needs: [make-keys, prepare-chipyard-other] + needs: prepare-chipyard-other runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -955,130 +619,69 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" + - uses: ./.github/actions/job-start + id: job-start - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-other" project-key: "testchipip" + - uses: ./.github/actions/job-end firesim-run-tests: name: firesim-run-tests - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + needs: setup-complete + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - - name: Run tests + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests on self-hosted + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "extra-tests" project-key: "firesim" - run-script: "run-firesim-scala-tests.sh" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end fireboom-run-tests: name: fireboom-run-tests - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + needs: setup-complete + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - - name: Run tests + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests on self-hosted + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "extra-tests" project-key: "fireboom" - run-script: "run-firesim-scala-tests.sh" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end firesim-multiclock-run-tests: name: firesim-multiclock-run-tests - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + needs: setup-complete + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - - name: Run tests + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests on self-hosted + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "extra-tests" project-key: "firesim-multiclock" - run-script: "run-firesim-scala-tests.sh" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end # Sentinel job to simplify how we specify which checks need to pass in branch # protection and in Mergify @@ -1086,7 +689,8 @@ jobs: # When adding new top level jobs, please add them to `needs` below all_tests_passed: name: "all tests passed" - needs: [chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, + needs: [commit-on-master-check, tutorial-setup-check, documentation-check, + chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, @@ -1097,4 +701,4 @@ jobs: firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] runs-on: ubuntu-latest steps: - - run: echo Success! \ No newline at end of file + - run: echo Success!