From 1a631e22ff3be6001951f2db4a35d449405bd995 Mon Sep 17 00:00:00 2001 From: chick Date: Fri, 1 Oct 2021 14:31:02 -0700 Subject: [PATCH 01/51] Move Chipyard CI to Github Actions - As similar as possible to the circle ci code. - The `.github/README.md` file has a fair amount of documentation for this. - Creates a worfklow file - re-uses most of the circleci/scipts unchanged - defines a number of *Composite Actions* which are like YML subroutines - Removes the circle-ci code - Points the CI badge in the top level README to use the GA test result --- .circleci/README.md | 75 - .circleci/config.yml | 524 ------- .github/README.md | 137 ++ .github/actions/build-extra-tests/action.yml | 28 + .github/actions/prepare-rtl/action.yml | 41 + .github/actions/run-tests/action.yml | 30 + .github/actions/toolchain-build/action.yml | 29 + .../scripts}/build-extra-tests.sh | 0 .../scripts}/build-toolchains.sh | 0 .../scripts}/check-commit.sh | 0 .../scripts}/clean-old-files.sh | 0 {.circleci => .github/scripts}/create-hash.sh | 5 +- {.circleci => .github/scripts}/defaults.sh | 22 +- .../scripts}/do-rtl-build.sh | 1 + .../scripts}/install-verilator.sh | 2 +- .../scripts}/run-firesim-scala-tests.sh | 0 {.circleci => .github/scripts}/run-tests.sh | 0 .../workflows/chipyard-rocket-run-tests.yml | 1285 +++++++++++++++++ README.md | 3 +- 19 files changed, 1568 insertions(+), 614 deletions(-) delete mode 100644 .circleci/README.md delete mode 100644 .circleci/config.yml create mode 100644 .github/README.md create mode 100644 .github/actions/build-extra-tests/action.yml create mode 100644 .github/actions/prepare-rtl/action.yml create mode 100644 .github/actions/run-tests/action.yml create mode 100644 .github/actions/toolchain-build/action.yml rename {.circleci => .github/scripts}/build-extra-tests.sh (100%) rename {.circleci => .github/scripts}/build-toolchains.sh (100%) rename {.circleci => .github/scripts}/check-commit.sh (100%) rename {.circleci => .github/scripts}/clean-old-files.sh (100%) rename {.circleci => .github/scripts}/create-hash.sh (87%) rename {.circleci => .github/scripts}/defaults.sh (85%) rename {.circleci => .github/scripts}/do-rtl-build.sh (99%) rename {.circleci => .github/scripts}/install-verilator.sh (90%) rename {.circleci => .github/scripts}/run-firesim-scala-tests.sh (100%) rename {.circleci => .github/scripts}/run-tests.sh (100%) create mode 100644 .github/workflows/chipyard-rocket-run-tests.yml diff --git a/.circleci/README.md b/.circleci/README.md deleted file mode 100644 index 0c53405d..00000000 --- a/.circleci/README.md +++ /dev/null @@ -1,75 +0,0 @@ -Chipyard CI -=========== - -Website: https://circleci.com/gh/ucb-bar/chipyard - -CircleCI Brief Explanation ---------------------------- - -CircleCI is controlled by the `config.yml` script. -It consists of a *workflow* which has a series of *jobs* within it that do particular tasks. -All jobs in the workflow must pass for the CI run to be successful. - -At the bottom of the `config.yml` there is a `workflows:` section that specifies the order in which the jobs of the workflow should run. -For example: - - - prepare-rocketchip: - requires: - - install-riscv-toolchain - -This specifies that the `prepare-rocketchip` job needs the `install-riscv-toolchain` steps to run before it can run. - -All jobs in the CI workflow are specified at the top of `config.yml` -They specify a docker image to use (in this case a riscv-boom image since that is already available and works nicely) and an environment. -Finally, in the `steps:` section, the steps are run sequentially and state persists throughout a job. -So when you run something like `checkout` the next step has the checked out code. -Caching in the job is done by giving a file to cache on. -`restore_cache:` loads the cache into the environment if the key matches while `save_cache:` writes to the cache with the key IF IT IS NOT PRESENT. -Note, if the cache is already present for that key, the write to it is ignored. -Here the key is built from a string where the `checksum` portion converts the file given into a hash. - -.circleci directory -------------------- - -This directory contains all the collateral for the Chipyard CI to work. -The following is included: - - `build-toolchains.sh` # build either riscv-tools or esp-tools - `create-hash.sh` # create hashes of riscv-tools/esp-tools so circleci caching can work - `do-rtl-build.sh` # use verilator to build a sim executable (remotely) - `config.yml` # main circleci config script to enumerate jobs/workflows - `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 - `run-tests.sh # run tests for a specific set of designs - `images/` # docker image used in CI - -How things are setup for Chipyard ---------------------------------- - -The steps for CI to run are as follows. -1st, build the toolchains in parallel (note: `esp-tools` is currently not used in the run). -The docker image sets up the `PATH` and `RISCV` variable so that `riscv-tools` is the default (currently the `env.sh` script that is created at tool build is unused). -2nd, create the simulator binary. -This requires the `riscv-tools` for `fesvr` and `verilator` to be able to build the binary. -This stores all collateral for the tests (srcs, generated-srcs, sim binary, etc) to run "out of the gate" in the next job (make needs everything or else it will run again). -3rd, finally run the desired tests. - -Other CI Setup --------------- - -To get the CI to work correctly you need to setup CircleCI environment variables to point to the remote directory to build files and the server user/ip. -In the project settings, you can find this under "Build Settings" "Environment Variables". -You need to add two variables like the following: - -CI\_DIR = /path/to/where/you/want/to/store/remote/files -SERVER = username@myserver.coolmachine.berkeley.edu - -Additionally, you need to add under the "PERMISSIONS" "SSH Permissions" section a private key that is on the build server that you are using. -After adding a private key, it will show a fingerprint that should be added under the jobs that need to be run. - -Note: On the remote server you need to have the `*.pub` key file added to the `authorized_keys` file. diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 30f0395c..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,524 +0,0 @@ -# CircleCI Configuration File - -# version of circleci -version: 2.1 - -parameters: - tools-cache-version: - type: string - default: "v12" - -# default execution env.s -executors: - main-env: - docker: - - image: ucbbar/chipyard-ci-image:554b436 - environment: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - -# re-usable commands -commands: - toolchain-build: - description: "Build a toolchain" - parameters: - tools-version: - type: string - default: "riscv-tools" - steps: - - checkout - - run: - name: Create hash of toolchains - command: | - .circleci/create-hash.sh - - restore_cache: - keys: - - << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} - - run: - name: Building << parameters.tools-version >> - command: | - .circleci/build-toolchains.sh << parameters.tools-version >> - no_output_timeout: 120m - - save_cache: - key: << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} - paths: - - "/root/<< parameters.tools-version >>-install" - - ssh-checkout: - description: "Add SSH key and checkout code" - steps: - - add_ssh_keys: - fingerprints: - - "3e:c3:02:5b:ed:64:8c:b7:b0:04:43:bc:83:43:73:1e" - - "32:d6:89:d2:97:fa:db:de:a8:2d:2a:f2:70:dd:80:89" - - checkout - - setup-tools: - description: "Get toolchain" - parameters: - tools-version: - type: string - default: "riscv-tools" - steps: - - ssh-checkout - - run: - name: Create hash of toolchains - command: | - .circleci/create-hash.sh - - restore_cache: - keys: - - << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} - - prepare-rtl: - description: "Run the prepare step of RTL" - parameters: - tools-version: - type: string - default: "riscv-tools" - group-key: - type: string - timeout: - type: string - default: "120m" - build-script: - type: string - default: "do-rtl-build.sh" - build-type: - type: string - default: "sim" - steps: - - setup-tools: - tools-version: "<< parameters.tools-version >>" - - run: - name: Building << parameters.group-key >> subproject using Verilator - command: .circleci/<< parameters.build-script >> << parameters.group-key >> << parameters.build-type >> - no_output_timeout: << parameters.timeout >> - - save_cache: - key: << parameters.group-key >>-{{ .Branch }}-{{ .Revision }} - paths: - - "/root/project" - - run-tests: - description: "Run a set of tests" - parameters: - tools-version: - type: string - default: "riscv-tools" - group-key: - type: string - project-key: - type: string - run-script: - type: string - default: "run-tests.sh" - timeout: - type: string - default: "25m" - steps: - - setup-tools: - tools-version: "<< parameters.tools-version >>" - - restore_cache: - keys: - - << parameters.group-key >>-{{ .Branch }}-{{ .Revision }} - - run: - name: Run << parameters.project-key >> subproject tests - command: .circleci/<< parameters.run-script >> << parameters.project-key >> - no_output_timeout: << parameters.timeout >> - -# set of jobs to run -jobs: - commit-on-master-check: - executor: main-env - steps: - - checkout - - run: - name: Check commits of each submodule - command: | - .circleci/check-commit.sh - tutorial-setup-check: - executor: main-env - steps: - - checkout - - run: - name: Check that the tutorial-setup patches apply - command: | - scripts/tutorial-setup.sh - documentation-check: - executor: main-env - steps: - - checkout - - run: - name: Check that documentation builds with no warnings/errors - command: | - sudo apt-get update -y - sudo apt-get install -y python3-pip - sudo pip3 install -r docs/requirements.txt - make -C docs html - - install-riscv-toolchain: - executor: main-env - steps: - - toolchain-build: - tools-version: "riscv-tools" - install-esp-toolchain: - executor: main-env - steps: - - toolchain-build: - tools-version: "esp-tools" - install-verilator: - executor: main-env - steps: - - ssh-checkout - - run: - name: Install Verilator to remote - command: | - .circleci/install-verilator.sh - build-extra-tests: - executor: main-env - steps: - - ssh-checkout - - run: - name: Create hash of toolchains - command: | - .circleci/create-hash.sh - - restore_cache: - keys: - - riscv-tools-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../riscv-tools.hash" }} - - run: - name: Build extra tests - command: .circleci/build-extra-tests.sh - no_output_timeout: 120m - - save_cache: - key: extra-tests-{{ .Branch }}-{{ .Revision }} - paths: - - "/root/project/tests" - - prepare-chipyard-cores: - executor: main-env - steps: - - prepare-rtl: - group-key: "group-cores" - prepare-chipyard-peripherals: - executor: main-env - steps: - - prepare-rtl: - group-key: "group-peripherals" - prepare-chipyard-accels: - executor: main-env - steps: - - prepare-rtl: - tools-version: "esp-tools" - group-key: "group-accels" - prepare-chipyard-tracegen: - executor: main-env - steps: - - prepare-rtl: - group-key: "group-tracegen" - prepare-chipyard-other: - executor: main-env - steps: - - prepare-rtl: - group-key: "group-other" - - chipyard-rocket-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-rocket" - chipyard-hetero-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-hetero" - timeout: "20m" - chipyard-boom-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-boom" - chipyard-cva6-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-cva6" - timeout: "30m" - chipyard-sodor-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-sodor" - timeout: "30m" - chipyard-multiclock-rocket-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-multiclock-rocket" - chipyard-dmirocket-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-peripherals" - project-key: "chipyard-dmirocket" - chipyard-spiflashwrite-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-peripherals" - project-key: "chipyard-spiflashwrite" - chipyard-spiflashread-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-peripherals" - project-key: "chipyard-spiflashread" - chipyard-lbwif-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-peripherals" - project-key: "chipyard-lbwif" - - chipyard-sha3-run-tests: - executor: main-env - steps: - - run-tests: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-sha3" - chipyard-streaming-fir-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-accels" - project-key: "chipyard-streaming-fir" - chipyard-streaming-passthrough-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-accels" - project-key: "chipyard-streaming-passthrough" - chipyard-hwacha-run-tests: - executor: main-env - steps: - - run-tests: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-hwacha" - timeout: "30m" - chipyard-gemmini-run-tests: - executor: main-env - steps: - - run-tests: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-gemmini" - chipyard-nvdla-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-accels" - project-key: "chipyard-nvdla" - tracegen-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-tracegen" - project-key: "tracegen" - tracegen-boom-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-tracegen" - project-key: "tracegen-boom" - icenet-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-other" - project-key: "icenet" - timeout: "30m" - testchipip-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-other" - project-key: "testchipip" - timeout: "30m" - firesim-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "extra-tests" - project-key: "firesim" - run-script: "run-firesim-scala-tests.sh" - timeout: "20m" - fireboom-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "extra-tests" - project-key: "fireboom" - run-script: "run-firesim-scala-tests.sh" - timeout: "45m" - firesim-multiclock-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "extra-tests" - project-key: "firesim-multiclock" - run-script: "run-firesim-scala-tests.sh" - timeout: "20m" - prepare-chipyard-fpga: - executor: main-env - steps: - - prepare-rtl: - group-key: "group-fpga" - build-type: "fpga" - -# Order and dependencies of jobs to run -workflows: - version: 2 - submodules-on-master: - jobs: - # Check to make sure submodule commits are on master branches - - commit-on-master-check - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - master - - build-and-test-chipyard-integration: - jobs: - # Make the toolchains - - install-riscv-toolchain - - - install-esp-toolchain - - - install-verilator - - - commit-on-master-check - - # Attempt to apply the tutorial patches - - tutorial-setup-check - - # Check that documentation builds - - documentation-check - - # Build extra tests - - build-extra-tests: - requires: - - install-riscv-toolchain - - # Prepare the verilator builds - - prepare-chipyard-cores: - requires: - - install-riscv-toolchain - - install-verilator - - prepare-chipyard-peripherals: - requires: - - install-riscv-toolchain - - install-verilator - - prepare-chipyard-accels: - requires: - - install-esp-toolchain - - install-verilator - - prepare-chipyard-tracegen: - requires: - - install-riscv-toolchain - - install-verilator - - prepare-chipyard-other: - requires: - - install-riscv-toolchain - - install-verilator - - # Run the example tests - - chipyard-rocket-run-tests: - requires: - - prepare-chipyard-cores - - chipyard-hetero-run-tests: - requires: - - prepare-chipyard-cores - - chipyard-boom-run-tests: - requires: - - prepare-chipyard-cores - - chipyard-cva6-run-tests: - requires: - - prepare-chipyard-cores - - chipyard-sodor-run-tests: - requires: - - prepare-chipyard-cores - - chipyard-dmirocket-run-tests: - requires: - - prepare-chipyard-peripherals - - chipyard-spiflashwrite-run-tests: - requires: - - prepare-chipyard-peripherals - - chipyard-spiflashread-run-tests: - requires: - - prepare-chipyard-peripherals - - chipyard-lbwif-run-tests: - requires: - - prepare-chipyard-peripherals - - - chipyard-sha3-run-tests: - requires: - - prepare-chipyard-accels - - chipyard-streaming-fir-run-tests: - requires: - - prepare-chipyard-accels - - chipyard-streaming-passthrough-run-tests: - requires: - - prepare-chipyard-accels - - chipyard-hwacha-run-tests: - requires: - - prepare-chipyard-accels - - chipyard-gemmini-run-tests: - requires: - - prepare-chipyard-accels - - chipyard-nvdla-run-tests: - requires: - - prepare-chipyard-accels - - - tracegen-run-tests: - requires: - - prepare-chipyard-tracegen - - tracegen-boom-run-tests: - requires: - - prepare-chipyard-tracegen - - - icenet-run-tests: - requires: - - prepare-chipyard-other - - testchipip-run-tests: - requires: - - prepare-chipyard-other - - # Run the firesim tests - - firesim-run-tests: - requires: - - install-riscv-toolchain - - install-verilator - - build-extra-tests - - firesim-multiclock-run-tests: - requires: - - install-riscv-toolchain - - install-verilator - - build-extra-tests - - fireboom-run-tests: - requires: - - install-riscv-toolchain - - install-verilator - - build-extra-tests - - # Prepare the fpga builds (just Verilog) - - prepare-chipyard-fpga: - requires: - - install-riscv-toolchain diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 00000000..89fcc3f6 --- /dev/null +++ b/.github/README.md @@ -0,0 +1,137 @@ +Chipyard Continuous Integration (CI) +=========== + +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. +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. +The dependency of one job on the completion of another is specified via the `needs` field. + +For example: +```yaml + prepare-chipyard-cores: + name: prepare-chipyard-cores + needs: [make-keys, setup-complete] +``` +This specifies that the `prepare-chipyard-cores` job needs the both the `make-keys` and the `setup-complete` steps to +be completed before it can run. + +Chipyard runs its CI using a docker image created from `dockerfiles/Dockerfile`. +See its [README](../dockerfiles/README.md) for more details. + +Finally, within each job's `steps:` section, the steps are run sequentially and state persists throughout a job. +So when you run something like `checkout` the next step has the checked out code. + +[Composite Actions](https://docs.github.com/en/actions/creating-actions) (CA) allow for limited subroutine like code re-use within GA. +We use both community created and our own Composite Actions in our CI process. CA capabilities are changing rapidly. +Nesting of composite actions was only recently unveiled. There is a lot of room for more code reuse, in particular +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. +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 +> determine whether to run the data generation command. +> At the time of this writing the if construct has a bug and will not run correctly within a composite action. The use +> of a bash based if is a hack found on stackoverflow +```yaml + - 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 script 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" + fi + shell: bash +``` + +Our own composite actions are defined in the `.github/actions//action.yml` + +.github/scripts directory +------------------- + +This directory contains most the collateral for the Chipyard CI to work. +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) + `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 + `run-tests.sh # run tests for a specific set of designs + +How things are set up for Chipyard +--------------------------------- + +The steps for CI to run are as follows. +1. Build the toolchains in parallel (note: `esp-tools` is currently not used in the run). +The docker image sets up the `PATH` and `RISCV` variable so that `riscv-tools` is the default (currently the `env.sh` script that is created at tool build is unused). +2. Create the simulator binary. +This requires the `riscv-tools` for `fesvr` and `verilator` to be able to build the binary. +This stores all collateral for the tests (srcs, generated-srcs, sim binary, etc) to run "out of the gate" in the next job (make needs everything or else it will run again). +3. Finally, run the desired tests. + +Other CI Setup +-------------- + +To get the CI to work correctly you need to create the following GH Repository Secrets + +| Secret | Value | +| -------| ------------- | +| BUILDSERVER | the hostname of the remote build server (likely be a millennium machine) | +| BUILDUSER | the login to use on the build server | +| BUILDDIR | the directory to use on the build server | +| SERVERKEY | a private key to access the build server | + +The default.sh script defines the following, +```bash +CI_DIR = /path/to/where/you/want/to/store/remote/files +```` +but in the future this should likely be a GH Secret too. + +The scripts also construct (repeatedly) a SERVER env using the above secrets +```bash +SERVER = ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} +``` + +Additionally, you need to add under the "PERMISSIONS" "SSH Permissions" section a private key that is on the build server that you are using. +After adding a private key, it will show a fingerprint that should be added under the jobs that need to be run. + +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 +- CCI supports workflow level variables, in GA we must define thiing like `BUILDSERVER: ${{ secrets.BUILDSERVER }}` in every job +- CCI allows a much larger cache. The entire CY directory with toolchains and RTL could be cached, with GA there is a 5Gb total cache limit +- GA support more parallel jobs 20 vs 4 +- GA seems to allow much longer run times +- \ No newline at end of file diff --git a/.github/actions/build-extra-tests/action.yml b/.github/actions/build-extra-tests/action.yml new file mode 100644 index 00000000..80ae8fdf --- /dev/null +++ b/.github/actions/build-extra-tests/action.yml @@ -0,0 +1,28 @@ +name: build-extra-tests +description: 'Builds extra test required for some flows' + +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: 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 + run: | + export RISCV="/__w/chipyard/chipyard/riscv-tools-install" + export LD_LIBRARY_PATH="$RISCV/lib" + export PATH="$RISCV/bin:$PATH" + .github/scripts/build-extra-tests.sh + shell: bash + diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml new file mode 100644 index 00000000..fd9e9759 --- /dev/null +++ b/.github/actions/prepare-rtl/action.yml @@ -0,0 +1,41 @@ +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: + - 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 script 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" + fi + shell: bash + diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml new file mode 100644 index 00000000..ea320615 --- /dev/null +++ b/.github/actions/run-tests/action.yml @@ -0,0 +1,30 @@ +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 + project-key: + description: project key + required: true + run-script: + description: rtl build script to use + required: false + default: "run-tests.sh" + +runs: + using: "composite" + steps: + - name: run rtl build script cache of chipyard root should have been loaded by prepare-rtl + run: | + export RISCV="/__w/chipyard/chipyard/riscv-tools-install" + export LD_LIBRARY_PATH="$RISCV/lib" + export PATH="$RISCV/bin:$PATH" + ./.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 new file mode 100644 index 00000000..de2b66ce --- /dev/null +++ b/.github/actions/toolchain-build/action.yml @@ -0,0 +1,29 @@ +name: toolchain-build +description: 'Builds the selected toolchain' + +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 + shell: bash + diff --git a/.circleci/build-extra-tests.sh b/.github/scripts/build-extra-tests.sh similarity index 100% rename from .circleci/build-extra-tests.sh rename to .github/scripts/build-extra-tests.sh diff --git a/.circleci/build-toolchains.sh b/.github/scripts/build-toolchains.sh similarity index 100% rename from .circleci/build-toolchains.sh rename to .github/scripts/build-toolchains.sh diff --git a/.circleci/check-commit.sh b/.github/scripts/check-commit.sh similarity index 100% rename from .circleci/check-commit.sh rename to .github/scripts/check-commit.sh diff --git a/.circleci/clean-old-files.sh b/.github/scripts/clean-old-files.sh similarity index 100% rename from .circleci/clean-old-files.sh rename to .github/scripts/clean-old-files.sh diff --git a/.circleci/create-hash.sh b/.github/scripts/create-hash.sh similarity index 87% rename from .circleci/create-hash.sh rename to .github/scripts/create-hash.sh index 7a8915a5..dae9f25d 100755 --- a/.circleci/create-hash.sh +++ b/.github/scripts/create-hash.sh @@ -10,14 +10,11 @@ set -o pipefail SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh -# enter bhd repo -cd $LOCAL_CHIPYARD_DIR - # Use normalized output of git-submodule status as hashfile for tools in 'riscv-tools' 'esp-tools' ; do git submodule status "toolchains/${tools}" 'toolchains/libgloss' 'toolchains/qemu' | while read -r line ; do echo "${line#[!0-9a-f]}" - done > "${HOME}/${tools}.hash" + done > "${tools}.hash" done echo "Hashfile for riscv-tools and esp-tools created in $HOME" diff --git a/.circleci/defaults.sh b/.github/scripts/defaults.sh similarity index 85% rename from .circleci/defaults.sh rename to .github/scripts/defaults.sh index a9a56b74..0123fa88 100755 --- a/.circleci/defaults.sh +++ b/.github/scripts/defaults.sh @@ -1,15 +1,15 @@ #!/bin/bash copy () { - rsync -avzp -e 'ssh' --exclude '.git' $1 $2 + rsync -azp -e 'ssh' --exclude '.git' $1 $2 } run () { - ssh -o "StrictHostKeyChecking no" -t $SERVER $@ + ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER $@ } run_script () { - ssh -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" + ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" } clean () { @@ -18,7 +18,7 @@ clean () { } # make parallelism -CI_MAKE_NPROC=8 +CI_MAKE_NPROC=4 # chosen based on a 24c system shared with 1 other project REMOTE_MAKE_NPROC=4 @@ -26,8 +26,14 @@ REMOTE_MAKE_NPROC=4 VERILATOR_VERSION=v4.034 # remote variables -REMOTE_PREFIX=$CI_DIR/$CIRCLE_PROJECT_REPONAME-$CIRCLE_BRANCH -REMOTE_WORK_DIR=$REMOTE_PREFIX-$CIRCLE_SHA1-$CIRCLE_JOB + +CURRENT_BRANCH=$(git branch --show-current) + +# 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 @@ -37,13 +43,13 @@ REMOTE_FPGA_DIR=$REMOTE_CHIPYARD_DIR/fpga REMOTE_JAVA_OPTS="-Xmx10G -Xss8M" # Disable the supershell to greatly improve the readability of SBT output when captured by Circle CI REMOTE_SBT_OPTS="-Dsbt.ivy.home=$REMOTE_WORK_DIR/.ivy2 -Dsbt.supershell=false -Dsbt.global.base=$REMOTE_WORK_DIR/.sbt -Dsbt.boot.directory=$REMOTE_WORK_DIR/.sbt/boot" -REMOTE_VERILATOR_DIR=$REMOTE_PREFIX-$CIRCLE_SHA1-verilator-install +REMOTE_VERILATOR_DIR=$REMOTE_PREFIX-$GITHUB_SHA-verilator-install # local variables (aka within the docker container) LOCAL_CHECKOUT_DIR=$HOME/project LOCAL_RISCV_DIR=$HOME/riscv-tools-install LOCAL_ESP_DIR=$HOME/esp-tools-install -LOCAL_CHIPYARD_DIR=$LOCAL_CHECKOUT_DIR +LOCAL_CHIPYARD_DIR=$HOME LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verilator LOCAL_FIRESIM_DIR=$LOCAL_CHIPYARD_DIR/sims/firesim/sim diff --git a/.circleci/do-rtl-build.sh b/.github/scripts/do-rtl-build.sh similarity index 99% rename from .circleci/do-rtl-build.sh rename to .github/scripts/do-rtl-build.sh index 3a5d56ca..442b10fb 100755 --- a/.circleci/do-rtl-build.sh +++ b/.github/scripts/do-rtl-build.sh @@ -59,6 +59,7 @@ else fi # choose what make dir to use + case $2 in "sim") REMOTE_MAKE_DIR=$REMOTE_SIM_DIR diff --git a/.circleci/install-verilator.sh b/.github/scripts/install-verilator.sh similarity index 90% rename from .circleci/install-verilator.sh rename to .github/scripts/install-verilator.sh index 2170768a..f667b365 100755 --- a/.circleci/install-verilator.sh +++ b/.github/scripts/install-verilator.sh @@ -10,7 +10,7 @@ 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/.circleci/clean-old-files.sh $CI_DIR +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) diff --git a/.circleci/run-firesim-scala-tests.sh b/.github/scripts/run-firesim-scala-tests.sh similarity index 100% rename from .circleci/run-firesim-scala-tests.sh rename to .github/scripts/run-firesim-scala-tests.sh diff --git a/.circleci/run-tests.sh b/.github/scripts/run-tests.sh similarity index 100% rename from .circleci/run-tests.sh rename to .github/scripts/run-tests.sh diff --git a/.github/workflows/chipyard-rocket-run-tests.yml b/.github/workflows/chipyard-rocket-run-tests.yml new file mode 100644 index 00000000..74dd262c --- /dev/null +++ b/.github/workflows/chipyard-rocket-run-tests.yml @@ -0,0 +1,1285 @@ +name: chipyard-ci-process + +on: [push] + +env: + tools-cache-version: v7 + CI_DIR: ${{ secrets.BUILDDIR }} + +jobs: + commit-on-master-check: + name: commit-on-master-check + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Check commits of each submodule + run: .github/scripts/check-commit.sh + + tutorial-setup-check: + name: tutorial-setup-check + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Check that the tutorial-setup patches apply + run: scripts/tutorial-setup.sh + + documentation-check: + name: documentation-check + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Check that documentation builds with no warnings/errors + 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() }} + run: cat /tmp/sphinx-err*.log + + make-keys: + name: make-keys + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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 }}" + - name: Show key + run: | + echo "riscvtools key is " ${{ steps.genkey.outputs.riscvtools-cache-key }} + echo "esptools key is " ${{ steps.genkey.outputs.esptools-cache-key }} + echo "extra-tests key is " ${{ steps.genkey.outputs.extra-tests-cache-key }} + 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 + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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/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 + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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 }} + + build-extra-tests: + name: build-extra-tests + needs: [make-keys, install-riscv-toolchain] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - uses: actions/cache@v2 + 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 + run: | + export RISCV="/__w/chipyard/chipyard/riscv-tools-install" + export LD_LIBRARY_PATH="$RISCV/lib" + export PATH="$RISCV/bin:$PATH" + .github/scripts/build-extra-tests.sh + + install-verilator: + name: install-verilator + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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 + + # 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] + runs-on: ubuntu-latest + steps: + - name: Set up complete + run: echo Set up is complete! + + ########################################################################## + + 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 + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + + 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 + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + + 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 + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + + 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 + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + + 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 + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + + 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 + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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-fpga" + build-type: "fpga" + + ########################################################################## + + chipyard-rocket-run-tests: + name: chipyard-rocket-run-tests + needs: [make-keys, prepare-chipyard-cores] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-rocket" + + chipyard-hetero-run-tests: + name: chipyard-hetero-run-tests + needs: [make-keys, prepare-chipyard-cores] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-hetero" + + chipyard-boom-run-tests: + name: chipyard-boom-run-tests + needs: [make-keys, prepare-chipyard-cores] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-boom" + + chipyard-cva6-run-tests: + name: chipyard-cva6-run-tests + needs: [make-keys, prepare-chipyard-cores] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-cva6" + + chipyard-sodor-run-tests: + name: chipyard-sodor-run-tests + needs: [make-keys, prepare-chipyard-cores] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-sodor" + + chipyard-dmirocket-run-tests: + name: chipyard-dmirocket-run-tests + needs: [make-keys, prepare-chipyard-peripherals] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-dmirocket" + + chipyard-spiflashwrite-run-tests: + name: chipyard-spiflashwrite-run-tests + needs: [make-keys, prepare-chipyard-peripherals] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-spiflashwrite" + + chipyard-spiflashread-run-tests: + name: chipyard-spiflashread-run-tests + needs: [make-keys, prepare-chipyard-peripherals] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-spiflashread" + + chipyard-lbwif-run-tests: + name: chipyard-lbwif-run-tests + needs: [make-keys, prepare-chipyard-peripherals] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-lbwif" + + chipyard-sha3-run-tests: + name: chipyard-sha3-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-sha3" + + chipyard-streaming-fir-run-tests: + name: chipyard-streaming-fir-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-streaming-fir" + + chipyard-streaming-passthrough-run-tests: + name: chipyard-streaming-passthrough-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-streaming-passthrough" + + chipyard-hwacha-run-tests: + name: chipyard-hwacha-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-hwacha" + + chipyard-gemmini-run-tests: + name: chipyard-gemmini-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-gemmini" + + chipyard-nvdla-run-tests: + name: chipyard-nvdla-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-nvdla" + + tracegen-boom-run-tests: + name: tracegen-boom-run-tests + needs: [make-keys, prepare-chipyard-tracegen] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-tracegen" + project-key: "tracegen-boom" + + tracegen-run-tests: + name: tracegen-run-tests + needs: [make-keys, prepare-chipyard-tracegen] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-tracegen" + project-key: "tracegen" + + icenet-run-tests: + name: icenet-run-tests + needs: [make-keys, prepare-chipyard-other] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "icenet" + + testchipip-run-tests: + name: testchipip-run-tests + needs: [make-keys, prepare-chipyard-other] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "testchipip" + + 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 + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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/run-tests + with: + group-key: "extra-tests" + project-key: "firesim" + run-script: "run-firesim-scala-tests.sh" + + 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 + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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/run-tests + with: + group-key: "extra-tests" + project-key: "fireboom" + run-script: "run-firesim-scala-tests.sh" + + 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 + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + 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/run-tests + with: + group-key: "extra-tests" + project-key: "firesim-multiclock" + run-script: "run-firesim-scala-tests.sh" + + # Sentinel job to simplify how we specify which checks need to pass in branch + # protection and in Mergify + # + # 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, + 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, + chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, + tracegen-boom-run-tests, tracegen-run-tests, + icenet-run-tests, testchipip-run-tests, + firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + runs-on: ubuntu-latest + steps: + - run: echo Success! \ No newline at end of file diff --git a/README.md b/README.md index d364a742..d231a73c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ ![CHIPYARD](https://github.com/ucb-bar/chipyard/raw/master/docs/_static/images/chipyard-logo-full.png) -# Chipyard Framework [![CircleCI](https://circleci.com/gh/ucb-bar/chipyard/tree/master.svg?style=svg)](https://circleci.com/gh/ucb-bar/chipyard/tree/master) - +# Chipyard Framework [![Test](https://github.com/ucb-bar/chipyard/workflows/chipyard-ci-process/badge.svg?style=svg)](https://github.com/ucb-bar/chipyard/actions) ## Using Chipyard To get started using Chipyard, see the documentation on the Chipyard documentation site: https://chipyard.readthedocs.io/ From f3f4b19fdeb3ebf45ae20bab756d66827907294e Mon Sep 17 00:00:00 2001 From: chick Date: Mon, 4 Oct 2021 13:18:02 -0700 Subject: [PATCH 02/51] Per changes requested - build-extra-tests composite-action comment changed to Builds extra test required for FireSim tests - removed unneeded inputs tools-version and group-key from run-tests composite action - Added better comment to toolchain-build composite action - Change CI_MAKE_NPROC back to 8 in defaults.sh - Moved all the duplicated enviroment setting stuff in workflow file to the top - BUILDSERVER, BUILDUSER, CI_DIR, SERVER, and JVM_OPTS - Romoved all the not needed passed parameters in the calls to run-script - A bit of cleanup to .github/README.md - added link to SO `if` hack - cleaned up comments on CI_DIR - removed bad empty final bullet line --- .github/README.md | 12 +- .github/actions/build-extra-tests/action.yml | 2 +- .github/actions/run-tests/action.yml | 7 - .github/actions/toolchain-build/action.yml | 2 +- .github/scripts/defaults.sh | 2 +- .github/scripts/do-rtl-build.sh | 1 - ...t-run-tests.yml => chipyard-run-tests.yml} | 185 +----------------- 7 files changed, 10 insertions(+), 201 deletions(-) rename .github/workflows/{chipyard-rocket-run-tests.yml => chipyard-run-tests.yml} (82%) diff --git a/.github/README.md b/.github/README.md index 89fcc3f6..e864d705 100644 --- a/.github/README.md +++ b/.github/README.md @@ -42,7 +42,7 @@ will generate the data to be cached. The caching of the generated data is implic >Note: GA cache documentation suggests using the yml level `if: steps.cache-primes.outputs.cache-hit != 'true'` to > determine whether to run the data generation command. > At the time of this writing the if construct has a bug and will not run correctly within a composite action. The use -> of a bash based if is a hack found on stackoverflow +> of a bash based if is a [hack found on stackoverflow](https://stackoverflow.com/questions/65473359/github-action-unable-to-add-if-condition-in-steps) ```yaml - uses: actions/cache@v2 id: rtl-build-id @@ -106,13 +106,8 @@ To get the CI to work correctly you need to create the following GH Repository S | BUILDDIR | the directory to use on the build server | | SERVERKEY | a private key to access the build server | -The default.sh script defines the following, -```bash -CI_DIR = /path/to/where/you/want/to/store/remote/files -```` -but in the future this should likely be a GH Secret too. - -The scripts also construct (repeatedly) a SERVER env using the above secrets +The main workflow also constructs and places in the environment a SERVER and a work directyory on that server env using the above secrets. +The SERVER is constructed like this: ```bash SERVER = ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} ``` @@ -134,4 +129,3 @@ This code is heavily based on the origin [CircleCI]() work. There a quite a few - CCI allows a much larger cache. The entire CY directory with toolchains and RTL could be cached, with GA there is a 5Gb total cache limit - GA support more parallel jobs 20 vs 4 - GA seems to allow much longer run times -- \ No newline at end of file diff --git a/.github/actions/build-extra-tests/action.yml b/.github/actions/build-extra-tests/action.yml index 80ae8fdf..cb751998 100644 --- a/.github/actions/build-extra-tests/action.yml +++ b/.github/actions/build-extra-tests/action.yml @@ -1,5 +1,5 @@ name: build-extra-tests -description: 'Builds extra test required for some flows' +description: 'Builds extra test required for FireSim tests' inputs: tools-version: diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index ea320615..103d8f8c 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -2,13 +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 project-key: description: project key required: true diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index de2b66ce..cd883c61 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -1,5 +1,5 @@ name: toolchain-build -description: 'Builds the selected toolchain' +description: 'Builds or retrieves cache of the selected toolchain' inputs: tools-version: diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 0123fa88..3d08e74b 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -18,7 +18,7 @@ clean () { } # make parallelism -CI_MAKE_NPROC=4 +CI_MAKE_NPROC=8 # chosen based on a 24c system shared with 1 other project REMOTE_MAKE_NPROC=4 diff --git a/.github/scripts/do-rtl-build.sh b/.github/scripts/do-rtl-build.sh index 442b10fb..3a5d56ca 100755 --- a/.github/scripts/do-rtl-build.sh +++ b/.github/scripts/do-rtl-build.sh @@ -59,7 +59,6 @@ else fi # choose what make dir to use - case $2 in "sim") REMOTE_MAKE_DIR=$REMOTE_SIM_DIR diff --git a/.github/workflows/chipyard-rocket-run-tests.yml b/.github/workflows/chipyard-run-tests.yml similarity index 82% rename from .github/workflows/chipyard-rocket-run-tests.yml rename to .github/workflows/chipyard-run-tests.yml index 74dd262c..44ce27fc 100644 --- a/.github/workflows/chipyard-rocket-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -4,7 +4,11 @@ on: [push] env: tools-cache-version: v7 + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} CI_DIR: ${{ secrets.BUILDDIR }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit jobs: commit-on-master-check: @@ -13,8 +17,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -27,8 +29,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -41,8 +41,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -62,8 +60,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.9.1 @@ -96,8 +92,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -116,8 +110,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -136,8 +128,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -167,11 +157,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -205,11 +190,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -239,11 +219,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -273,11 +248,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -307,11 +277,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -341,11 +306,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -375,11 +335,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -412,11 +367,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -441,7 +391,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" project-key: "chipyard-rocket" chipyard-hetero-run-tests: @@ -451,11 +400,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -480,7 +424,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" project-key: "chipyard-hetero" chipyard-boom-run-tests: @@ -490,11 +433,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -519,7 +457,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" project-key: "chipyard-boom" chipyard-cva6-run-tests: @@ -529,11 +466,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -558,7 +490,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" project-key: "chipyard-cva6" chipyard-sodor-run-tests: @@ -568,11 +499,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -597,7 +523,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" project-key: "chipyard-sodor" chipyard-dmirocket-run-tests: @@ -607,11 +532,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -636,7 +556,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-peripherals" project-key: "chipyard-dmirocket" chipyard-spiflashwrite-run-tests: @@ -646,11 +565,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -675,7 +589,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-peripherals" project-key: "chipyard-spiflashwrite" chipyard-spiflashread-run-tests: @@ -685,11 +598,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -714,7 +622,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-peripherals" project-key: "chipyard-spiflashread" chipyard-lbwif-run-tests: @@ -724,11 +631,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -753,7 +655,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-peripherals" project-key: "chipyard-lbwif" chipyard-sha3-run-tests: @@ -763,11 +664,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -792,7 +688,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-sha3" chipyard-streaming-fir-run-tests: @@ -802,11 +697,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -831,7 +721,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-streaming-fir" chipyard-streaming-passthrough-run-tests: @@ -841,11 +730,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -870,7 +754,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-streaming-passthrough" chipyard-hwacha-run-tests: @@ -880,11 +763,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -909,7 +787,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-hwacha" chipyard-gemmini-run-tests: @@ -919,11 +796,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -948,7 +820,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-gemmini" chipyard-nvdla-run-tests: @@ -958,11 +829,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -987,7 +853,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-nvdla" tracegen-boom-run-tests: @@ -997,11 +862,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -1026,7 +886,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-tracegen" project-key: "tracegen-boom" tracegen-run-tests: @@ -1036,11 +895,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -1065,7 +919,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-tracegen" project-key: "tracegen" icenet-run-tests: @@ -1075,11 +928,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -1104,7 +952,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-other" project-key: "icenet" testchipip-run-tests: @@ -1114,11 +961,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -1143,7 +985,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-other" project-key: "testchipip" firesim-run-tests: @@ -1153,11 +994,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -1182,7 +1018,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "extra-tests" project-key: "firesim" run-script: "run-firesim-scala-tests.sh" @@ -1193,11 +1028,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -1222,7 +1052,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "extra-tests" project-key: "fireboom" run-script: "run-firesim-scala-tests.sh" @@ -1233,11 +1062,6 @@ jobs: container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit steps: - name: Checkout uses: actions/checkout@v2 @@ -1262,7 +1086,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "extra-tests" project-key: "firesim-multiclock" run-script: "run-firesim-scala-tests.sh" From bbb0cd70e2add16a7147f670cd0fe38a84f2ef7a Mon Sep 17 00:00:00 2001 From: chick Date: Mon, 4 Oct 2021 14:28:22 -0700 Subject: [PATCH 03/51] Per changes requested round 2 - In main workflow chipyard-run-tests.yml - Remove debug output in `make-keys` - remove export intializers in `build-extra-tests` - Add prepare-chipyard-fpga to `needs` in `all_tests_passed` --- .github/workflows/chipyard-run-tests.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 44ce27fc..2efac52d 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -75,11 +75,6 @@ jobs: 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 }}" - - name: Show key - run: | - echo "riscvtools key is " ${{ steps.genkey.outputs.riscvtools-cache-key }} - echo "esptools key is " ${{ steps.genkey.outputs.esptools-cache-key }} - echo "extra-tests key is " ${{ steps.genkey.outputs.extra-tests-cache-key }} outputs: riscvtools-cache-key: ${{ steps.genkey.outputs.riscvtools-cache-key }} esptools-cache-key: ${{ steps.genkey.outputs.esptools-cache-key }} @@ -145,11 +140,7 @@ jobs: 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 - run: | - export RISCV="/__w/chipyard/chipyard/riscv-tools-install" - export LD_LIBRARY_PATH="$RISCV/lib" - export PATH="$RISCV/bin:$PATH" - .github/scripts/build-extra-tests.sh + run: .github/scripts/build-extra-tests.sh install-verilator: name: install-verilator @@ -1102,6 +1093,7 @@ jobs: chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, tracegen-boom-run-tests, tracegen-run-tests, icenet-run-tests, testchipip-run-tests, + prepare-chipyard-fpga, firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] runs-on: ubuntu-latest steps: From b905ea540019a9b2625fa65cf96456fc8d7d6025 Mon Sep 17 00:00:00 2001 From: chick Date: Mon, 4 Oct 2021 14:43:57 -0700 Subject: [PATCH 04/51] Per changes requested round 2.1 - export intializers in `build-extra-tests` --- .github/workflows/chipyard-run-tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 2efac52d..28dee8b2 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -140,7 +140,11 @@ jobs: 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 - run: .github/scripts/build-extra-tests.sh + run: | + export RISCV="/__w/chipyard/chipyard/riscv-tools-install" + export LD_LIBRARY_PATH="$RISCV/lib" + export PATH="$RISCV/bin:$PATH" + .github/scripts/build-extra-tests.sh install-verilator: name: install-verilator From 36fa1efcb61196f58d4a8b22e335b4e3565e809d Mon Sep 17 00:00:00 2001 From: chick Date: Mon, 4 Oct 2021 20:34:44 -0700 Subject: [PATCH 05/51] Remove $(sim) targets in order to facilitate caching with GA The simulations binaries have been built and all we want is the cached binaries. We don't need all the files building the sim depended on --- common.mk | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/common.mk b/common.mk index 1fa626cf..efa36a0f 100644 --- a/common.mk +++ b/common.mk @@ -192,11 +192,15 @@ ifeq (,$(BINARY)) endif # run normal binary with hardware-logged insn dissassembly -run-binary: $(output_dir) $(sim) check-binary +#TODO: maybe put this back, this is a test of minimum caching in CI +#run-binary: $(output_dir) $(sim) check-binary +run-binary: $(output_dir) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $(BINARY) >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log) # run simulator as fast as possible (no insn disassembly) -run-binary-fast: $(output_dir) $(sim) check-binary +#TODO: maybe put this back, this is a test of minimum caching in CI +#run-binary-fast: $(output_dir) $(sim) check-binary +run-binary-fast: $(output_dir) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $(BINARY) $(binary_hex) run-binary-hex: check-binary +#TODO: Restore this or figure out a better caching run-binary-hex: $(output_dir) $(sim) $(binary_hex) run-binary-hex: $(output_dir) $(sim) $(binary_hex) run-binary-hex: run-binary run-binary-hex: override LOADMEM_ADDR = 80000000 run-binary-hex: override LOADMEM = $(binary_hex) run-binary-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-debug-hex: check-binary +#TODO: Restore this or figure out a better caching run-binary-debug-hex: $(output_dir) $(sim) $(binary_hex) run-binary-debug-hex: $(output_dir) $(sim) $(binary_hex) run-binary-debug-hex: run-binary-debug run-binary-debug-hex: override LOADMEM_ADDR = 80000000 run-binary-debug-hex: override LOADMEM = $(binary_hex) run-binary-debug-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-fast-hex: check-binary -run-binary-fast-hex: $(output_dir) $(sim) $(binary_hex) +#TODO: put this back run-binary-fast-hex: $(output_dir) $(sim) $(binary_hex) +run-binary-fast-hex: $(output_dir) $(binary_hex) run-binary-fast-hex: run-binary-fast run-binary-fast-hex: override LOADMEM_ADDR = 80000000 run-binary-fast-hex: override LOADMEM = $(binary_hex) @@ -239,10 +246,12 @@ $(output_dir): $(output_dir)/%: $(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa/% $(output_dir) ln -sf $< $@ -$(output_dir)/%.run: $(output_dir)/% $(sim) +#$(output_dir)/%.run: $(output_dir)/% $(sim) +$(output_dir)/%.run: $(output_dir)/% (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $< >(spike-dasm > $@) | tee $<.log) ######################################################################################### From 93b0c97da18c0c2641c94a75cd382994376d7c20 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Mon, 4 Oct 2021 21:02:34 -0700 Subject: [PATCH 06/51] Missed removing a sim dependency --- generators/tracegen/tracegen.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/tracegen/tracegen.mk b/generators/tracegen/tracegen.mk index fec62288..1766059f 100644 --- a/generators/tracegen/tracegen.mk +++ b/generators/tracegen/tracegen.mk @@ -8,7 +8,7 @@ AXE=$(AXE_DIR)/axe $(AXE): $(wildcard $(AXE_DIR)/*.[ch]) $(AXE_DIR)/make.sh cd $(AXE_DIR) && ./make.sh -$(output_dir)/tracegen.out: $(sim) +$(output_dir)/tracegen.out: mkdir -p $(output_dir) && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) none $@ $(output_dir)/tracegen.result: $(output_dir)/tracegen.out $(AXE) From dee18ad73b4678f86cf6cd990e4795009ee96409 Mon Sep 17 00:00:00 2001 From: chick Date: Tue, 5 Oct 2021 14:14:30 -0700 Subject: [PATCH 07/51] Remove export statements from build-extra-tests --- .github/workflows/chipyard-run-tests.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 28dee8b2..2efac52d 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -140,11 +140,7 @@ jobs: 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 - run: | - export RISCV="/__w/chipyard/chipyard/riscv-tools-install" - export LD_LIBRARY_PATH="$RISCV/lib" - export PATH="$RISCV/bin:$PATH" - .github/scripts/build-extra-tests.sh + run: .github/scripts/build-extra-tests.sh install-verilator: name: install-verilator From bd39e0ad1edf8377c57d9761979bb6968d6ea81a Mon Sep 17 00:00:00 2001 From: chick Date: Tue, 5 Oct 2021 15:23:44 -0700 Subject: [PATCH 08/51] Putting export statements back in to build-extra-tests, build failed without them --- .github/workflows/chipyard-run-tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 2efac52d..a171b2a6 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -140,7 +140,11 @@ jobs: 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 - run: .github/scripts/build-extra-tests.sh + run: | + export RISCV="/__w/chipyard/chipyard/riscv-tools-install" + export LD_LIBRARY_PATH="$RISCV/lib" + export PATH="$RISCV/bin:$PATH" + .github/scripts/build-extra-tests.sh.github/scripts/build-extra-tests.sh install-verilator: name: install-verilator From c7293d507c3810adfbd7b93af3af4d5231b8b816 Mon Sep 17 00:00:00 2001 From: chick Date: Tue, 5 Oct 2021 15:42:51 -0700 Subject: [PATCH 09/51] Remove export statements from build-extra-tests --- .github/workflows/chipyard-run-tests.yml | 2 +- script1.sh | 51 ++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 script1.sh diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index a171b2a6..a5204332 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -144,7 +144,7 @@ jobs: export RISCV="/__w/chipyard/chipyard/riscv-tools-install" export LD_LIBRARY_PATH="$RISCV/lib" export PATH="$RISCV/bin:$PATH" - .github/scripts/build-extra-tests.sh.github/scripts/build-extra-tests.sh + .github/scripts/build-extra-tests.sh install-verilator: name: install-verilator diff --git a/script1.sh b/script1.sh new file mode 100644 index 00000000..94fec76d --- /dev/null +++ b/script1.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +cd /scratch/chick/chipyard && java \ + -Xmx8G \ + -Xss8M \ + -XX:MaxPermSize=256M \ + -Djava.io.tmpdir=/scratch/chick/chipyard/.java_tmp \ + -jar \ + /scratch/chick/chipyard/generators/rocket-chip/sbt-launch.jar \ + -Dsbt.sourcemode=true \ + -Dsbt.workspace=/scratch/chick/chipyard/tools \ + \ + ";project \ + tapeout; \ + runMain \ + barstools.tapeout.transforms.GenerateTopAndHarness \ + --output-file \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.v \ + --harness-o \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.v \ + --input-file \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.fir \ + --syn-top \ + ChipTop \ + --harness-top \ + TestHarness \ + --annotation-file \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.anno.json \ + --top-anno-out \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.anno.json \ + --top-dotf-out \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/firrtl_black_box_resource_files.top.f \ + --top-fir \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.fir \ + --harness-anno-out \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.anno.json \ + --harness-dotf-out \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/firrtl_black_box_resource_files.harness.f \ + --harness-fir \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.fir \ + --infer-rw \ + --repl-seq-mem \ + -c:TestHarness:-o:/scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.mems.conf \ + -thconf \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.mems.conf \ + --target-dir \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig \ + --log-level \ + error \ + " + From 52e8aa1957b67c6e793647238eb33d04ab5f805b Mon Sep 17 00:00:00 2001 From: chick Date: Tue, 5 Oct 2021 21:15:25 -0700 Subject: [PATCH 10/51] This is branch with the new GA CI It has the .circleci CI stuff as well for comparison purposes. --- .circleci/README.md | 75 ++++ .circleci/build-extra-tests.sh | 11 + .circleci/build-toolchains.sh | 18 + .circleci/check-commit.sh | 152 +++++++ .circleci/clean-old-files.sh | 29 ++ .circleci/config.yml | 524 +++++++++++++++++++++++ .circleci/create-hash.sh | 23 + .circleci/defaults.sh | 90 ++++ .circleci/do-rtl-build.sh | 95 ++++ .circleci/install-verilator.sh | 25 ++ .circleci/run-firesim-scala-tests.sh | 62 +++ .circleci/run-tests.sh | 117 +++++ .github/workflows/chipyard-run-tests.yml | 2 +- 13 files changed, 1222 insertions(+), 1 deletion(-) create mode 100644 .circleci/README.md create mode 100755 .circleci/build-extra-tests.sh create mode 100755 .circleci/build-toolchains.sh create mode 100755 .circleci/check-commit.sh create mode 100755 .circleci/clean-old-files.sh create mode 100644 .circleci/config.yml create mode 100755 .circleci/create-hash.sh create mode 100755 .circleci/defaults.sh create mode 100755 .circleci/do-rtl-build.sh create mode 100755 .circleci/install-verilator.sh create mode 100755 .circleci/run-firesim-scala-tests.sh create mode 100755 .circleci/run-tests.sh diff --git a/.circleci/README.md b/.circleci/README.md new file mode 100644 index 00000000..0c53405d --- /dev/null +++ b/.circleci/README.md @@ -0,0 +1,75 @@ +Chipyard CI +=========== + +Website: https://circleci.com/gh/ucb-bar/chipyard + +CircleCI Brief Explanation +--------------------------- + +CircleCI is controlled by the `config.yml` script. +It consists of a *workflow* which has a series of *jobs* within it that do particular tasks. +All jobs in the workflow must pass for the CI run to be successful. + +At the bottom of the `config.yml` there is a `workflows:` section that specifies the order in which the jobs of the workflow should run. +For example: + + - prepare-rocketchip: + requires: + - install-riscv-toolchain + +This specifies that the `prepare-rocketchip` job needs the `install-riscv-toolchain` steps to run before it can run. + +All jobs in the CI workflow are specified at the top of `config.yml` +They specify a docker image to use (in this case a riscv-boom image since that is already available and works nicely) and an environment. +Finally, in the `steps:` section, the steps are run sequentially and state persists throughout a job. +So when you run something like `checkout` the next step has the checked out code. +Caching in the job is done by giving a file to cache on. +`restore_cache:` loads the cache into the environment if the key matches while `save_cache:` writes to the cache with the key IF IT IS NOT PRESENT. +Note, if the cache is already present for that key, the write to it is ignored. +Here the key is built from a string where the `checksum` portion converts the file given into a hash. + +.circleci directory +------------------- + +This directory contains all the collateral for the Chipyard CI to work. +The following is included: + + `build-toolchains.sh` # build either riscv-tools or esp-tools + `create-hash.sh` # create hashes of riscv-tools/esp-tools so circleci caching can work + `do-rtl-build.sh` # use verilator to build a sim executable (remotely) + `config.yml` # main circleci config script to enumerate jobs/workflows + `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 + `run-tests.sh # run tests for a specific set of designs + `images/` # docker image used in CI + +How things are setup for Chipyard +--------------------------------- + +The steps for CI to run are as follows. +1st, build the toolchains in parallel (note: `esp-tools` is currently not used in the run). +The docker image sets up the `PATH` and `RISCV` variable so that `riscv-tools` is the default (currently the `env.sh` script that is created at tool build is unused). +2nd, create the simulator binary. +This requires the `riscv-tools` for `fesvr` and `verilator` to be able to build the binary. +This stores all collateral for the tests (srcs, generated-srcs, sim binary, etc) to run "out of the gate" in the next job (make needs everything or else it will run again). +3rd, finally run the desired tests. + +Other CI Setup +-------------- + +To get the CI to work correctly you need to setup CircleCI environment variables to point to the remote directory to build files and the server user/ip. +In the project settings, you can find this under "Build Settings" "Environment Variables". +You need to add two variables like the following: + +CI\_DIR = /path/to/where/you/want/to/store/remote/files +SERVER = username@myserver.coolmachine.berkeley.edu + +Additionally, you need to add under the "PERMISSIONS" "SSH Permissions" section a private key that is on the build server that you are using. +After adding a private key, it will show a fingerprint that should be added under the jobs that need to be run. + +Note: On the remote server you need to have the `*.pub` key file added to the `authorized_keys` file. diff --git a/.circleci/build-extra-tests.sh b/.circleci/build-extra-tests.sh new file mode 100755 index 00000000..e38b50fe --- /dev/null +++ b/.circleci/build-extra-tests.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +make -C $LOCAL_CHIPYARD_DIR/tests clean +make -C $LOCAL_CHIPYARD_DIR/tests diff --git a/.circleci/build-toolchains.sh b/.circleci/build-toolchains.sh new file mode 100755 index 00000000..160b6f5a --- /dev/null +++ b/.circleci/build-toolchains.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# create the riscv tools/esp tools binaries +# passed in as + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +if [ ! -d "$HOME/$1-install" ]; then + cd $HOME + + # init all submodules including the tools + CHIPYARD_DIR="$LOCAL_CHIPYARD_DIR" NPROC=$CI_MAKE_NPROC $LOCAL_CHIPYARD_DIR/scripts/build-toolchains.sh $1 +fi diff --git a/.circleci/check-commit.sh b/.circleci/check-commit.sh new file mode 100755 index 00000000..1b59191e --- /dev/null +++ b/.circleci/check-commit.sh @@ -0,0 +1,152 @@ +#!/bin/bash + +# check to see that submodule commits are present on the master branch + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +# enter bhd repo +cd $LOCAL_CHIPYARD_DIR + +# ignore the private vlsi submodules +git config submodule.vlsi/hammer-cadence-plugins.update none +git config submodule.vlsi/hammer-mentor-plugins.update none +git config submodule.vlsi/hammer-synopsys-plugins.update none + +# initialize submodules and get the hashes +git submodule update --init +status=$(git submodule status) + +all_names=() + + +search_submodule() { + echo "Running check on submodule $submodule in $dir" + hash=$(echo "$status" | grep "$dir.*$submodule " | awk '{print$1}' | grep -o "[[:alnum:]]*") + for branch in "${branches[@]}" + do + echo "Searching for $hash in origin/$branch of $submodule" + (git -C $dir/$submodule branch -r --contains "$hash" | grep "origin/$branch") && true # needs init'ed submodules + if [ $? -eq 0 ] + then + all_names+=("$dir/$submodule $hash 0") + return + fi + done + all_names+=("$dir/$submodule $hash 1") + return +} + +search () { + for submodule in "${submodules[@]}" + do + search_submodule + done +} + +submodules=("cva6" "boom" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chip" "sha3" "sifive-blocks" "sifive-cache" "testchipip" "riscv-sodor") +dir="generators" +if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] +then + branches=("master") +else + branches=("master" "dev") +fi +search + +submodules=("riscv-gnu-toolchain" "riscv-isa-sim" "riscv-pk" "riscv-tests") +dir="toolchains/esp-tools" +branches=("master") +search + + +submodules=("riscv-gnu-toolchain" "riscv-isa-sim" "riscv-pk" "riscv-tests") +dir="toolchains/riscv-tools" +branches=("master") +search + +# riscv-openocd doesn't use its master branch +submodules=("riscv-openocd") +dir="toolchains/riscv-tools" +branches=("riscv") +search + +submodules=("qemu" "libgloss") +dir="toolchains" +branches=("master") +search + +submodules=("coremark" "firemarshal" "nvdla-workload" "spec2017") +dir="software" +if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] +then + branches=("master") +else + branches=("master" "dev") +fi +search + +submodules=("DRAMSim2" "axe" "barstools" "chisel-testers" "dsptools" "rocket-dsp-utils" "firrtl-interpreter" "torture" "treadle") +dir="tools" +if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] +then + branches=("master") +else + branches=("master" "dev") +fi +search + +submodules=("dromajo-src") +dir="tools/dromajo" +branches=("master") +search + +submodules=("firesim") +dir="sims" +if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] +then + branches=("master") +else + branches=("master" "dev") +fi +search + +submodules=("hammer") +dir="vlsi" +branches=("master") +search + +submodules=("fpga-shells") +dir="fpga" +branches=("master") +search + +# turn off verbose printing to make this easier to read +set +x + +# print 0's +for str in "${all_names[@]}"; +do + if [ 0 = $(echo "$str" | awk '{print$3}') ]; then + echo "$str" + fi +done + +echo "" + +# check if there was a non-zero return code and print 1's +EXIT=0 +for str in "${all_names[@]}"; +do + if [ ! 0 = $(echo "$str" | awk '{print$3}') ]; then + echo "$str" + EXIT=1 + fi +done + +echo "Done checking all submodules" +exit $EXIT diff --git a/.circleci/clean-old-files.sh b/.circleci/clean-old-files.sh new file mode 100755 index 00000000..5824c4b7 --- /dev/null +++ b/.circleci/clean-old-files.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# clean directories that are older than 14 days +# argument is used as the directory to look in + +age () { + local AGE_SEC + local CUR_SEC + local DIFF_SEC + local SEC_PER_DAY + + SEC_PER_DAY=86400 + + CUR_SEC=$(date +%s) + AGE_SEC=$(stat -c %Y -- "$1") + DIFF_SEC=$(expr $CUR_SEC - $AGE_SEC) + + echo $(expr $DIFF_SEC / $SEC_PER_DAY) +} + +for d in $1/*/ ; do + DIR_AGE="$(age $d)" + if [ $DIR_AGE -ge 14 ]; then + echo "Deleting $d since is it $DIR_AGE old" + rm -rf $d + else + echo "Keep $d since it is $DIR_AGE old" + fi +done diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..e207db9d --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,524 @@ +# CircleCI Configuration File + +# version of circleci +version: 2.1 + +parameters: + tools-cache-version: + type: string + default: "v13" + +# default execution env.s +executors: + main-env: + docker: + - image: ucbbar/chipyard-ci-image:554b436 + environment: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + +# re-usable commands +commands: + toolchain-build: + description: "Build a toolchain" + parameters: + tools-version: + type: string + default: "riscv-tools" + steps: + - checkout + - run: + name: Create hash of toolchains + command: | + .circleci/create-hash.sh + - restore_cache: + keys: + - << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} + - run: + name: Building << parameters.tools-version >> + command: | + .circleci/build-toolchains.sh << parameters.tools-version >> + no_output_timeout: 120m + - save_cache: + key: << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} + paths: + - "/root/<< parameters.tools-version >>-install" + + ssh-checkout: + description: "Add SSH key and checkout code" + steps: + - add_ssh_keys: + fingerprints: + - "3e:c3:02:5b:ed:64:8c:b7:b0:04:43:bc:83:43:73:1e" + - "32:d6:89:d2:97:fa:db:de:a8:2d:2a:f2:70:dd:80:89" + - checkout + + setup-tools: + description: "Get toolchain" + parameters: + tools-version: + type: string + default: "riscv-tools" + steps: + - ssh-checkout + - run: + name: Create hash of toolchains + command: | + .circleci/create-hash.sh + - restore_cache: + keys: + - << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} + + prepare-rtl: + description: "Run the prepare step of RTL" + parameters: + tools-version: + type: string + default: "riscv-tools" + group-key: + type: string + timeout: + type: string + default: "120m" + build-script: + type: string + default: "do-rtl-build.sh" + build-type: + type: string + default: "sim" + steps: + - setup-tools: + tools-version: "<< parameters.tools-version >>" + - run: + name: Building << parameters.group-key >> subproject using Verilator + command: .circleci/<< parameters.build-script >> << parameters.group-key >> << parameters.build-type >> + no_output_timeout: << parameters.timeout >> + - save_cache: + key: << parameters.group-key >>-{{ .Branch }}-{{ .Revision }} + paths: + - "/root/project" + + run-tests: + description: "Run a set of tests" + parameters: + tools-version: + type: string + default: "riscv-tools" + group-key: + type: string + project-key: + type: string + run-script: + type: string + default: "run-tests.sh" + timeout: + type: string + default: "25m" + steps: + - setup-tools: + tools-version: "<< parameters.tools-version >>" + - restore_cache: + keys: + - << parameters.group-key >>-{{ .Branch }}-{{ .Revision }} + - run: + name: Run << parameters.project-key >> subproject tests + command: .circleci/<< parameters.run-script >> << parameters.project-key >> + no_output_timeout: << parameters.timeout >> + +# set of jobs to run +jobs: + commit-on-master-check: + executor: main-env + steps: + - checkout + - run: + name: Check commits of each submodule + command: | + .circleci/check-commit.sh + tutorial-setup-check: + executor: main-env + steps: + - checkout + - run: + name: Check that the tutorial-setup patches apply + command: | + scripts/tutorial-setup.sh + documentation-check: + executor: main-env + steps: + - checkout + - run: + name: Check that documentation builds with no warnings/errors + command: | + sudo apt-get update -y + sudo apt-get install -y python3-pip + sudo pip3 install -r docs/requirements.txt + make -C docs html + + install-riscv-toolchain: + executor: main-env + steps: + - toolchain-build: + tools-version: "riscv-tools" + install-esp-toolchain: + executor: main-env + steps: + - toolchain-build: + tools-version: "esp-tools" + install-verilator: + executor: main-env + steps: + - ssh-checkout + - run: + name: Install Verilator to remote + command: | + .circleci/install-verilator.sh + build-extra-tests: + executor: main-env + steps: + - ssh-checkout + - run: + name: Create hash of toolchains + command: | + .circleci/create-hash.sh + - restore_cache: + keys: + - riscv-tools-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../riscv-tools.hash" }} + - run: + name: Build extra tests + command: .circleci/build-extra-tests.sh + no_output_timeout: 120m + - save_cache: + key: extra-tests-{{ .Branch }}-{{ .Revision }} + paths: + - "/root/project/tests" + + prepare-chipyard-cores: + executor: main-env + steps: + - prepare-rtl: + group-key: "group-cores" + prepare-chipyard-peripherals: + executor: main-env + steps: + - prepare-rtl: + group-key: "group-peripherals" + prepare-chipyard-accels: + executor: main-env + steps: + - prepare-rtl: + tools-version: "esp-tools" + group-key: "group-accels" + prepare-chipyard-tracegen: + executor: main-env + steps: + - prepare-rtl: + group-key: "group-tracegen" + prepare-chipyard-other: + executor: main-env + steps: + - prepare-rtl: + group-key: "group-other" + + chipyard-rocket-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-rocket" + chipyard-hetero-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-hetero" + timeout: "20m" + chipyard-boom-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-boom" + chipyard-cva6-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-cva6" + timeout: "30m" + chipyard-sodor-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-sodor" + timeout: "30m" + chipyard-multiclock-rocket-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-multiclock-rocket" + chipyard-dmirocket-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-peripherals" + project-key: "chipyard-dmirocket" + chipyard-spiflashwrite-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-peripherals" + project-key: "chipyard-spiflashwrite" + chipyard-spiflashread-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-peripherals" + project-key: "chipyard-spiflashread" + chipyard-lbwif-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-peripherals" + project-key: "chipyard-lbwif" + + chipyard-sha3-run-tests: + executor: main-env + steps: + - run-tests: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-sha3" + chipyard-streaming-fir-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-accels" + project-key: "chipyard-streaming-fir" + chipyard-streaming-passthrough-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-accels" + project-key: "chipyard-streaming-passthrough" + chipyard-hwacha-run-tests: + executor: main-env + steps: + - run-tests: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-hwacha" + timeout: "30m" + chipyard-gemmini-run-tests: + executor: main-env + steps: + - run-tests: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-gemmini" + chipyard-nvdla-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-accels" + project-key: "chipyard-nvdla" + tracegen-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-tracegen" + project-key: "tracegen" + tracegen-boom-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-tracegen" + project-key: "tracegen-boom" + icenet-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-other" + project-key: "icenet" + timeout: "30m" + testchipip-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-other" + project-key: "testchipip" + timeout: "30m" + firesim-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "extra-tests" + project-key: "firesim" + run-script: "run-firesim-scala-tests.sh" + timeout: "20m" + fireboom-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "extra-tests" + project-key: "fireboom" + run-script: "run-firesim-scala-tests.sh" + timeout: "45m" + firesim-multiclock-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "extra-tests" + project-key: "firesim-multiclock" + run-script: "run-firesim-scala-tests.sh" + timeout: "20m" + prepare-chipyard-fpga: + executor: main-env + steps: + - prepare-rtl: + group-key: "group-fpga" + build-type: "fpga" + +# Order and dependencies of jobs to run +workflows: + version: 2 + submodules-on-master: + jobs: + # Check to make sure submodule commits are on master branches + - commit-on-master-check + triggers: + - schedule: + cron: "0 0 * * *" + filters: + branches: + only: + - master + + build-and-test-chipyard-integration: + jobs: + # Make the toolchains + - install-riscv-toolchain + + - install-esp-toolchain + + - install-verilator + + - commit-on-master-check + + # Attempt to apply the tutorial patches + - tutorial-setup-check + + # Check that documentation builds + - documentation-check + + # Build extra tests + - build-extra-tests: + requires: + - install-riscv-toolchain + + # Prepare the verilator builds + - prepare-chipyard-cores: + requires: + - install-riscv-toolchain + - install-verilator + - prepare-chipyard-peripherals: + requires: + - install-riscv-toolchain + - install-verilator + - prepare-chipyard-accels: + requires: + - install-esp-toolchain + - install-verilator + - prepare-chipyard-tracegen: + requires: + - install-riscv-toolchain + - install-verilator + - prepare-chipyard-other: + requires: + - install-riscv-toolchain + - install-verilator + + # Run the example tests + - chipyard-rocket-run-tests: + requires: + - prepare-chipyard-cores + - chipyard-hetero-run-tests: + requires: + - prepare-chipyard-cores + - chipyard-boom-run-tests: + requires: + - prepare-chipyard-cores + - chipyard-cva6-run-tests: + requires: + - prepare-chipyard-cores + - chipyard-sodor-run-tests: + requires: + - prepare-chipyard-cores + - chipyard-dmirocket-run-tests: + requires: + - prepare-chipyard-peripherals + - chipyard-spiflashwrite-run-tests: + requires: + - prepare-chipyard-peripherals + - chipyard-spiflashread-run-tests: + requires: + - prepare-chipyard-peripherals + - chipyard-lbwif-run-tests: + requires: + - prepare-chipyard-peripherals + + - chipyard-sha3-run-tests: + requires: + - prepare-chipyard-accels + - chipyard-streaming-fir-run-tests: + requires: + - prepare-chipyard-accels + - chipyard-streaming-passthrough-run-tests: + requires: + - prepare-chipyard-accels + - chipyard-hwacha-run-tests: + requires: + - prepare-chipyard-accels + - chipyard-gemmini-run-tests: + requires: + - prepare-chipyard-accels + - chipyard-nvdla-run-tests: + requires: + - prepare-chipyard-accels + + - tracegen-run-tests: + requires: + - prepare-chipyard-tracegen + - tracegen-boom-run-tests: + requires: + - prepare-chipyard-tracegen + + - icenet-run-tests: + requires: + - prepare-chipyard-other + - testchipip-run-tests: + requires: + - prepare-chipyard-other + + # Run the firesim tests + - firesim-run-tests: + requires: + - install-riscv-toolchain + - install-verilator + - build-extra-tests + - firesim-multiclock-run-tests: + requires: + - install-riscv-toolchain + - install-verilator + - build-extra-tests + - fireboom-run-tests: + requires: + - install-riscv-toolchain + - install-verilator + - build-extra-tests + + # Prepare the fpga builds (just Verilog) + - prepare-chipyard-fpga: + requires: + - install-riscv-toolchain diff --git a/.circleci/create-hash.sh b/.circleci/create-hash.sh new file mode 100755 index 00000000..7a8915a5 --- /dev/null +++ b/.circleci/create-hash.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# get the hash of riscv-tools + +# turn echo on and error on earliest command +set -ex +set -o pipefail + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +# enter bhd repo +cd $LOCAL_CHIPYARD_DIR + +# Use normalized output of git-submodule status as hashfile +for tools in 'riscv-tools' 'esp-tools' ; do + git submodule status "toolchains/${tools}" 'toolchains/libgloss' 'toolchains/qemu' | + while read -r line ; do + echo "${line#[!0-9a-f]}" + done > "${HOME}/${tools}.hash" +done +echo "Hashfile for riscv-tools and esp-tools created in $HOME" diff --git a/.circleci/defaults.sh b/.circleci/defaults.sh new file mode 100755 index 00000000..a9a56b74 --- /dev/null +++ b/.circleci/defaults.sh @@ -0,0 +1,90 @@ +#!/bin/bash + +copy () { + rsync -avzp -e 'ssh' --exclude '.git' $1 $2 +} + +run () { + ssh -o "StrictHostKeyChecking no" -t $SERVER $@ +} + +run_script () { + ssh -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 +REMOTE_MAKE_NPROC=4 + +# verilator version +VERILATOR_VERSION=v4.034 + +# remote variables +REMOTE_PREFIX=$CI_DIR/$CIRCLE_PROJECT_REPONAME-$CIRCLE_BRANCH +REMOTE_WORK_DIR=$REMOTE_PREFIX-$CIRCLE_SHA1-$CIRCLE_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_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/verilator +REMOTE_FIRESIM_DIR=$REMOTE_CHIPYARD_DIR/sims/firesim/sim +REMOTE_FPGA_DIR=$REMOTE_CHIPYARD_DIR/fpga +REMOTE_JAVA_OPTS="-Xmx10G -Xss8M" +# Disable the supershell to greatly improve the readability of SBT output when captured by Circle CI +REMOTE_SBT_OPTS="-Dsbt.ivy.home=$REMOTE_WORK_DIR/.ivy2 -Dsbt.supershell=false -Dsbt.global.base=$REMOTE_WORK_DIR/.sbt -Dsbt.boot.directory=$REMOTE_WORK_DIR/.sbt/boot" +REMOTE_VERILATOR_DIR=$REMOTE_PREFIX-$CIRCLE_SHA1-verilator-install + +# local variables (aka within the docker container) +LOCAL_CHECKOUT_DIR=$HOME/project +LOCAL_RISCV_DIR=$HOME/riscv-tools-install +LOCAL_ESP_DIR=$HOME/esp-tools-install +LOCAL_CHIPYARD_DIR=$LOCAL_CHECKOUT_DIR +LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verilator +LOCAL_FIRESIM_DIR=$LOCAL_CHIPYARD_DIR/sims/firesim/sim + +# key value store to get the build groups +declare -A grouping +grouping["group-cores"]="chipyard-cva6 chipyard-rocket chipyard-hetero chipyard-boom chipyard-sodor chipyard-digitaltop chipyard-multiclock-rocket" +grouping["group-peripherals"]="chipyard-dmirocket chipyard-blkdev chipyard-spiflashread chipyard-spiflashwrite chipyard-mmios chipyard-lbwif" +grouping["group-accels"]="chipyard-nvdla chipyard-sha3 chipyard-hwacha chipyard-gemmini chipyard-streaming-fir chipyard-streaming-passthrough" +grouping["group-tracegen"]="tracegen tracegen-boom" +grouping["group-other"]="icenet testchipip" +grouping["group-fpga"]="arty vcu118" + +# key value store to get the build strings +declare -A mapping +mapping["chipyard-rocket"]="" +mapping["chipyard-dmirocket"]=" CONFIG=dmiRocketConfig" +mapping["chipyard-lbwif"]=" CONFIG=LBWIFRocketConfig" +mapping["chipyard-sha3"]=" CONFIG=Sha3RocketConfig" +mapping["chipyard-digitaltop"]=" TOP=DigitalTop" +mapping["chipyard-streaming-fir"]=" CONFIG=StreamingFIRRocketConfig" +mapping["chipyard-streaming-passthrough"]=" CONFIG=StreamingPassthroughRocketConfig" +mapping["chipyard-hetero"]=" CONFIG=LargeBoomAndRocketConfig" +mapping["chipyard-boom"]=" CONFIG=SmallBoomConfig" +mapping["chipyard-blkdev"]=" CONFIG=SimBlockDeviceRocketConfig" +mapping["chipyard-hwacha"]=" CONFIG=HwachaRocketConfig" +mapping["chipyard-gemmini"]=" CONFIG=GemminiRocketConfig" +mapping["chipyard-cva6"]=" CONFIG=CVA6Config" +mapping["chipyard-spiflashread"]=" CONFIG=LargeSPIFlashROMRocketConfig" +mapping["chipyard-spiflashwrite"]=" CONFIG=SmallSPIFlashRocketConfig" +mapping["chipyard-mmios"]=" CONFIG=MMIORocketConfig verilog" +mapping["tracegen"]=" CONFIG=NonBlockingTraceGenL2Config" +mapping["tracegen-boom"]=" CONFIG=BoomTraceGenConfig" +mapping["chipyard-nvdla"]=" CONFIG=SmallNVDLARocketConfig" +mapping["chipyard-sodor"]=" CONFIG=Sodor5StageConfig" +mapping["chipyard-multiclock-rocket"]=" CONFIG=MulticlockRocketConfig" + +mapping["firesim"]="SCALA_TEST=firesim.firesim.RocketNICF1Tests" +mapping["firesim-multiclock"]="SCALA_TEST=firesim.firesim.RocketMulticlockF1Tests" +mapping["fireboom"]="SCALA_TEST=firesim.firesim.BoomF1Tests" +mapping["icenet"]="SUB_PROJECT=icenet" +mapping["testchipip"]="SUB_PROJECT=testchipip" + +mapping["arty"]="SUB_PROJECT=arty verilog" +mapping["vcu118"]="SUB_PROJECT=vcu118 verilog" diff --git a/.circleci/do-rtl-build.sh b/.circleci/do-rtl-build.sh new file mode 100755 index 00000000..3a5d56ca --- /dev/null +++ b/.circleci/do-rtl-build.sh @@ -0,0 +1,95 @@ +#!/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/.circleci/install-verilator.sh b/.circleci/install-verilator.sh new file mode 100755 index 00000000..2170768a --- /dev/null +++ b/.circleci/install-verilator.sh @@ -0,0 +1,25 @@ +#!/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/.circleci/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/.circleci/run-firesim-scala-tests.sh b/.circleci/run-firesim-scala-tests.sh new file mode 100755 index 00000000..a848df62 --- /dev/null +++ b/.circleci/run-firesim-scala-tests.sh @@ -0,0 +1,62 @@ +#!/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/.circleci/run-tests.sh b/.circleci/run-tests.sh new file mode 100755 index 00000000..ab3cf5cc --- /dev/null +++ b/.circleci/run-tests.sh @@ -0,0 +1,117 @@ +#!/bin/bash + +# run the different tests + +# turn echo on and error on earliest command +set -ex + +# get remote exec variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +run_bmark () { + make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ +} + +run_asm () { + make run-asm-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ +} + +run_both () { + run_bmark $@ + run_asm $@ +} + +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]} + ;; + chipyard-dmirocket) + run_bmark ${mapping[$1]} + ;; + chipyard-lbwif) + run_bmark ${mapping[$1]} + ;; + chipyard-boom) + run_bmark ${mapping[$1]} + ;; + chipyard-hetero) + run_bmark ${mapping[$1]} + ;; + rocketchip) + run_bmark ${mapping[$1]} + ;; + chipyard-hwacha) + export RISCV=$LOCAL_ESP_DIR + export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib + export PATH=$RISCV/bin:$PATH + make run-rv64uv-p-asm-tests -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR ${mapping[$1]} + ;; + chipyard-gemmini) + 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 + 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 + ;; + 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 + ;; + chipyard-streaming-passthrough) + make -C $LOCAL_CHIPYARD_DIR/tests + $LOCAL_SIM_DIR/simulator-chipyard-StreamingPassthroughRocketConfig $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 + ;; + 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 + ;; + 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 + [[ "`xxd $LOCAL_CHIPYARD_DIR/tests/spiflash.img | grep 1337\ 00ff\ aa55\ face | wc -l`" == "6" ]] || false + ;; + tracegen) + run_tracegen ${mapping[$1]} + ;; + tracegen-boom) + run_tracegen ${mapping[$1]} + ;; + chipyard-cva6) + make run-binary-fast -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv + ;; + chipyard-sodor) + run_asm ${mapping[$1]} + ;; + chipyard-nvdla) + make -C $LOCAL_CHIPYARD_DIR/tests + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary + ;; + icenet) + make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} + ;; + testchipip) + make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} + ;; + *) + echo "No set of tests for $1. Did you spell it right?" + exit 1 + ;; +esac diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index a5204332..686ccd8d 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: v7 + tools-cache-version: v8 BUILDSERVER: ${{ secrets.BUILDSERVER }} BUILDUSER: ${{ secrets.BUILDUSER }} SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} From f61410c95793a74a3efda631ace0399ecc59cb97 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 5 Oct 2021 21:54:13 -0700 Subject: [PATCH 11/51] Update docs --- docs/Advanced-Concepts/Debugging-RTL.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Advanced-Concepts/Debugging-RTL.rst b/docs/Advanced-Concepts/Debugging-RTL.rst index 6831cc4a..678ab33a 100644 --- a/docs/Advanced-Concepts/Debugging-RTL.rst +++ b/docs/Advanced-Concepts/Debugging-RTL.rst @@ -22,8 +22,8 @@ make target. For example: make CONFIG=CustomConfig debug -The ``run-binary-debug`` rule will also automatically build a simulator, -run it on a custom binary, and generate a waveform. For example, to run a +The ``run-binary-debug`` rule uses the prebuilt simulator to run a custom binary +and generate a waveform. For example, to run a test on ``helloworld.riscv``, use .. code-block:: shell From c0a60f50f974ff774b19a74b2a0d013c151a827f Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 5 Oct 2021 21:54:52 -0700 Subject: [PATCH 12/51] Update docs --- docs/Customization/MMIO-Peripherals.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Customization/MMIO-Peripherals.rst b/docs/Customization/MMIO-Peripherals.rst index 15ed5a00..bffe6f26 100644 --- a/docs/Customization/MMIO-Peripherals.rst +++ b/docs/Customization/MMIO-Peripherals.rst @@ -137,6 +137,7 @@ Now with all of that done, we can go ahead and run our simulation. .. code-block:: shell cd sims/verilator + make CONFIG=GCDTLRocketConfig make CONFIG=GCDTLRocketConfig BINARY=../../tests/gcd.riscv run-binary From e9642f5eba8fd6847aa34dd328f11d5b4e3bdfb3 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 5 Oct 2021 21:55:21 -0700 Subject: [PATCH 13/51] Update docs --- docs/Customization/Dsptools-Blocks.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Customization/Dsptools-Blocks.rst b/docs/Customization/Dsptools-Blocks.rst index bdf68fc1..52109a75 100644 --- a/docs/Customization/Dsptools-Blocks.rst +++ b/docs/Customization/Dsptools-Blocks.rst @@ -120,6 +120,7 @@ Now we can run our simulation. .. code-block:: shell cd sims/verilator + make CONFIG=StreamingFIRRocketConfig make CONFIG=StreamingFIRRocketConfig BINARY=../../tests/streaming-fir.riscv run-binary .. [#] ``ReadQueue`` and ``WriteQueue`` are good illustrations of how to write a ``DspBlock`` and how they can be integrated into rocket, but in a real design a DMA engine would be preferred. ``ReadQueue`` will stall the processor if you try to read an empty queue, and ``WriteQueue`` will stall if you try to write to a full queue, which a DMA engine can more elegantly avoid. Furthermore, a DMA engine can do the work of moving data, freeing the processor to do other useful work (or sleep). From 4cbdd9bb2647fd1b09b9c99e41780fd9b737d4d0 Mon Sep 17 00:00:00 2001 From: chick Date: Wed, 6 Oct 2021 11:57:58 -0700 Subject: [PATCH 14/51] - remove unused GA build-extra-tests/action.yml - cleanup exports in CA - remove exports from build-extra-tests CA - put exports in build-extra-tests.sh - based it on $GITHUB_WORKSPACE - changed exports in run-tests CA to use $GITHUB_WORKSPACE - in common.mk - removed TODO comment lines where `$(sim)` had been removed - removed commented out lines that used `$(sim)` - removed unused debugging script1.sh --- .github/actions/build-extra-tests/action.yml | 28 ----------- .github/actions/run-tests/action.yml | 2 +- .github/scripts/build-extra-tests.sh | 4 ++ .github/workflows/chipyard-run-tests.yml | 6 +-- common.mk | 9 ---- script1.sh | 51 -------------------- 6 files changed, 6 insertions(+), 94 deletions(-) delete mode 100644 .github/actions/build-extra-tests/action.yml delete mode 100644 script1.sh diff --git a/.github/actions/build-extra-tests/action.yml b/.github/actions/build-extra-tests/action.yml deleted file mode 100644 index cb751998..00000000 --- a/.github/actions/build-extra-tests/action.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: build-extra-tests -description: 'Builds extra test required for FireSim tests' - -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: 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 - run: | - export RISCV="/__w/chipyard/chipyard/riscv-tools-install" - export LD_LIBRARY_PATH="$RISCV/lib" - export PATH="$RISCV/bin:$PATH" - .github/scripts/build-extra-tests.sh - shell: bash - diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 103d8f8c..a7cdebcb 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -15,7 +15,7 @@ runs: steps: - name: run rtl build script cache of chipyard root should have been loaded by prepare-rtl run: | - export RISCV="/__w/chipyard/chipyard/riscv-tools-install" + 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 }} diff --git a/.github/scripts/build-extra-tests.sh b/.github/scripts/build-extra-tests.sh index e38b50fe..68bf7fe6 100755 --- a/.github/scripts/build-extra-tests.sh +++ b/.github/scripts/build-extra-tests.sh @@ -3,6 +3,10 @@ # 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 diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 686ccd8d..aa5c438e 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -140,11 +140,7 @@ jobs: 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 - run: | - export RISCV="/__w/chipyard/chipyard/riscv-tools-install" - export LD_LIBRARY_PATH="$RISCV/lib" - export PATH="$RISCV/bin:$PATH" - .github/scripts/build-extra-tests.sh + run: .github/scripts/build-extra-tests.sh install-verilator: name: install-verilator diff --git a/common.mk b/common.mk index efa36a0f..634f7767 100644 --- a/common.mk +++ b/common.mk @@ -192,14 +192,10 @@ ifeq (,$(BINARY)) endif # run normal binary with hardware-logged insn dissassembly -#TODO: maybe put this back, this is a test of minimum caching in CI -#run-binary: $(output_dir) $(sim) check-binary run-binary: $(output_dir) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $(BINARY) >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log) # run simulator as fast as possible (no insn disassembly) -#TODO: maybe put this back, this is a test of minimum caching in CI -#run-binary-fast: $(output_dir) $(sim) check-binary run-binary-fast: $(output_dir) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $(BINARY) $(binary_hex) run-binary-hex: check-binary -#TODO: Restore this or figure out a better caching run-binary-hex: $(output_dir) $(sim) $(binary_hex) run-binary-hex: $(output_dir) $(sim) $(binary_hex) run-binary-hex: run-binary run-binary-hex: override LOADMEM_ADDR = 80000000 run-binary-hex: override LOADMEM = $(binary_hex) run-binary-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-debug-hex: check-binary -#TODO: Restore this or figure out a better caching run-binary-debug-hex: $(output_dir) $(sim) $(binary_hex) run-binary-debug-hex: $(output_dir) $(sim) $(binary_hex) run-binary-debug-hex: run-binary-debug run-binary-debug-hex: override LOADMEM_ADDR = 80000000 run-binary-debug-hex: override LOADMEM = $(binary_hex) run-binary-debug-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-fast-hex: check-binary -#TODO: put this back run-binary-fast-hex: $(output_dir) $(sim) $(binary_hex) run-binary-fast-hex: $(output_dir) $(binary_hex) run-binary-fast-hex: run-binary-fast run-binary-fast-hex: override LOADMEM_ADDR = 80000000 @@ -246,11 +239,9 @@ $(output_dir): $(output_dir)/%: $(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa/% $(output_dir) ln -sf $< $@ -#$(output_dir)/%.run: $(output_dir)/% $(sim) $(output_dir)/%.run: $(output_dir)/% (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $< >(spike-dasm > $@) | tee $<.log) diff --git a/script1.sh b/script1.sh deleted file mode 100644 index 94fec76d..00000000 --- a/script1.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -cd /scratch/chick/chipyard && java \ - -Xmx8G \ - -Xss8M \ - -XX:MaxPermSize=256M \ - -Djava.io.tmpdir=/scratch/chick/chipyard/.java_tmp \ - -jar \ - /scratch/chick/chipyard/generators/rocket-chip/sbt-launch.jar \ - -Dsbt.sourcemode=true \ - -Dsbt.workspace=/scratch/chick/chipyard/tools \ - \ - ";project \ - tapeout; \ - runMain \ - barstools.tapeout.transforms.GenerateTopAndHarness \ - --output-file \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.v \ - --harness-o \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.v \ - --input-file \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.fir \ - --syn-top \ - ChipTop \ - --harness-top \ - TestHarness \ - --annotation-file \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.anno.json \ - --top-anno-out \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.anno.json \ - --top-dotf-out \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/firrtl_black_box_resource_files.top.f \ - --top-fir \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.fir \ - --harness-anno-out \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.anno.json \ - --harness-dotf-out \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/firrtl_black_box_resource_files.harness.f \ - --harness-fir \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.fir \ - --infer-rw \ - --repl-seq-mem \ - -c:TestHarness:-o:/scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.mems.conf \ - -thconf \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.mems.conf \ - --target-dir \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig \ - --log-level \ - error \ - " - From 26d1731bd9a061688574938567a8f6923eca2059 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 19:42:50 -0700 Subject: [PATCH 15/51] Move RISCV env. var. setting interal to scripts --- .github/actions/run-tests/action.yml | 3 --- .github/scripts/build-extra-tests.sh | 8 ++++---- .github/scripts/run-firesim-scala-tests.sh | 4 ++++ .github/scripts/run-tests.sh | 4 ++++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index a7cdebcb..33bcad77 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -15,9 +15,6 @@ runs: 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 }} 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/run-firesim-scala-tests.sh b/.github/scripts/run-firesim-scala-tests.sh index a848df62..55a22365 100755 --- a/.github/scripts/run-firesim-scala-tests.sh +++ b/.github/scripts/run-firesim-scala-tests.sh @@ -13,6 +13,10 @@ source $SCRIPT_DIR/defaults.sh # call clean on exit trap clean EXIT +export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +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 firesim_sysroot=lib-install diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index ab3cf5cc..7729579c 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 $@ } From f117f7a0fe723ddd7e1437175fac5383150c1e10 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 20:05:43 -0700 Subject: [PATCH 16/51] Try to skip successful jobs on rerun workflow --- .github/actions/job-end/action.yml | 8 + .github/actions/job-start/action.yml | 19 ++ .github/workflows/chipyard-run-tests.yml | 294 ++++++++++++++++++++++- 3 files changed, 319 insertions(+), 2 deletions(-) create mode 100644 .github/actions/job-end/action.yml create mode 100644 .github/actions/job-start/action.yml 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/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index aa5c438e..0167d455 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -20,8 +20,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 +36,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,15 +52,19 @@ 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 @@ -67,14 +79,19 @@ jobs: access_token: ${{ github.token }} - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Generate hashes + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/create-hash.sh - name: Generate keys + if: steps.job-start.outputs.run_result != 'success' 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 }}" + - uses: ./.github/actions/job-end outputs: riscvtools-cache-key: ${{ steps.genkey.outputs.riscvtools-cache-key }} esptools-cache-key: ${{ steps.genkey.outputs.esptools-cache-key }} @@ -90,13 +107,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain + 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 }} + - uses: ./.github/actions/job-end install-esp-toolchain: needs: make-keys @@ -108,13 +130,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' 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 @@ -126,21 +153,28 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain + 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 }} - 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 + 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 @@ -151,13 +185,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Build verilator on remote + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/install-verilator.sh + - uses: ./.github/actions/job-end # Sentinel job to simplify how we specify which that basic setup is complete # @@ -169,8 +208,12 @@ jobs: build-extra-tests] runs-on: ubuntu-latest steps: + - uses: ./.github/actions/job-start + id: job-start - name: Set up complete + if: steps.job-start.outputs.run_result != 'success' run: echo Set up is complete! + - uses: ./.github/actions/job-end ########################################################################## @@ -184,24 +227,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + 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 @@ -213,24 +264,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + 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 @@ -242,24 +301,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + 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 @@ -271,24 +338,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + 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 @@ -300,24 +375,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + 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 @@ -329,25 +412,33 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + 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 ########################################################################## @@ -361,28 +452,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-rocket" + - uses: ./.github/actions/job-end chipyard-hetero-run-tests: name: chipyard-hetero-run-tests @@ -394,28 +494,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-hetero" + - uses: ./.github/actions/job-end chipyard-boom-run-tests: name: chipyard-boom-run-tests @@ -427,28 +536,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-boom" + - uses: ./.github/actions/job-end chipyard-cva6-run-tests: name: chipyard-cva6-run-tests @@ -460,28 +578,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-cva6" + - uses: ./.github/actions/job-end chipyard-sodor-run-tests: name: chipyard-sodor-run-tests @@ -493,28 +620,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-sodor" + - uses: ./.github/actions/job-end chipyard-dmirocket-run-tests: name: chipyard-dmirocket-run-tests @@ -526,28 +662,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-dmirocket" + - uses: ./.github/actions/job-end chipyard-spiflashwrite-run-tests: name: chipyard-spiflashwrite-run-tests @@ -559,28 +704,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-spiflashwrite" + - uses: ./.github/actions/job-end chipyard-spiflashread-run-tests: name: chipyard-spiflashread-run-tests @@ -592,28 +746,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-spiflashread" + - uses: ./.github/actions/job-end chipyard-lbwif-run-tests: name: chipyard-lbwif-run-tests @@ -625,28 +788,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-lbwif" + - uses: ./.github/actions/job-end chipyard-sha3-run-tests: name: chipyard-sha3-run-tests @@ -658,28 +830,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-sha3" + - uses: ./.github/actions/job-end chipyard-streaming-fir-run-tests: name: chipyard-streaming-fir-run-tests @@ -691,28 +872,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-streaming-fir" + - uses: ./.github/actions/job-end chipyard-streaming-passthrough-run-tests: name: chipyard-streaming-passthrough-run-tests @@ -724,28 +914,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-streaming-passthrough" + - uses: ./.github/actions/job-end chipyard-hwacha-run-tests: name: chipyard-hwacha-run-tests @@ -757,28 +956,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-hwacha" + - uses: ./.github/actions/job-end chipyard-gemmini-run-tests: name: chipyard-gemmini-run-tests @@ -790,28 +998,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-gemmini" + - uses: ./.github/actions/job-end chipyard-nvdla-run-tests: name: chipyard-nvdla-run-tests @@ -823,28 +1040,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-nvdla" + - uses: ./.github/actions/job-end tracegen-boom-run-tests: name: tracegen-boom-run-tests @@ -856,28 +1082,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-tracegen" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "tracegen-boom" + - uses: ./.github/actions/job-end tracegen-run-tests: name: tracegen-run-tests @@ -889,28 +1124,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-tracegen" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "tracegen" + - uses: ./.github/actions/job-end icenet-run-tests: name: icenet-run-tests @@ -922,28 +1166,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + if: steps.job-start.outputs.run_result != 'success' + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-other" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "icenet" + - uses: ./.github/actions/job-end testchipip-run-tests: name: testchipip-run-tests @@ -955,28 +1209,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-other" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "testchipip" + - uses: ./.github/actions/job-end firesim-run-tests: name: firesim-run-tests @@ -988,29 +1251,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "extra-tests" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "firesim" run-script: "run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end fireboom-run-tests: name: fireboom-run-tests @@ -1022,29 +1294,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "extra-tests" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "fireboom" run-script: "run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end firesim-multiclock-run-tests: name: firesim-multiclock-run-tests @@ -1056,29 +1337,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + 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: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "extra-tests" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "firesim-multiclock" run-script: "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 @@ -1097,4 +1387,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! From ff41808df4536eaaa9928eeeed7e1e14c2abf4df Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 22:57:29 -0700 Subject: [PATCH 17/51] Try abstracting more away into composite actions --- .github/actions/prepare-rtl/action.yml | 11 +- .github/actions/run-tests/action.yml | 25 +- .github/actions/ssh-checkout/action.yml | 14 + .github/actions/toolchain-build/action.yml | 50 +- .github/workflows/chipyard-run-tests.yml | 851 +++------------------ 5 files changed, 170 insertions(+), 781 deletions(-) create mode 100644 .github/actions/ssh-checkout/action.yml diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index fd9e9759..89dbb431 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -21,6 +21,11 @@ inputs: 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: @@ -29,13 +34,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 33bcad77..f0aa9d25 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -2,6 +2,13 @@ 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 project-key: description: project key required: true @@ -13,8 +20,18 @@ inputs: runs: using: "composite" steps: - - name: run rtl build script cache of chipyard root should have been loaded by prepare-rtl - run: | - ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} - shell: bash + - name: Build toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: ${{ inputs.tools-version }} + # Note: You shouldn't need the other inputs since it shouldn't build RTL from scratch + - name: Build RTL + uses: ./.github/actions/toolchain-build + with: + tools-version: ${{ inputs.tools-version }} + 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/ssh-checkout/action.yml b/.github/actions/ssh-checkout/action.yml new file mode 100644 index 00000000..bed48cf6 --- /dev/null +++ b/.github/actions/ssh-checkout/action.yml @@ -0,0 +1,14 @@ +name: ssh-checkout +description: "Checkout code and add SSH keys to access remote build server" + +runs: + using: "composite" + 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 }} diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index cd883c61..f6afb68c 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -6,24 +6,42 @@ inputs: 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 + - 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)" + shell: bash + + # brute force way to swap between riscv/esp-tools caches + - uses: actions/cache@v2 + id: toolchain-build-riscv-tools + if: ${{ inputs.tools-version == "riscv-tools" }} + with: + path: ${{ inputs.tools-version }}-install + key: ${{ steps.genkey.outputs.riscvtools-cache-key }} + + - uses: actions/cache@v2 + id: toolchain-build-esp-tools + if: ${{ inputs.tools-version == "esp-tools" }} + with: + path: ${{ inputs.tools-version }}-install + key: ${{ steps.genkey.outputs.esptools-cache-key }} + + - 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 + shell: bash diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 0167d455..d908014a 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -66,39 +66,7 @@ jobs: 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 - - uses: ./.github/actions/job-start - id: job-start - - name: Generate hashes - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/create-hash.sh - - name: Generate keys - if: steps.job-start.outputs.run_result != 'success' - 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 }}" - - uses: ./.github/actions/job-end - 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 runs-on: ubuntu-latest container: @@ -109,19 +77,14 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain 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 }} - uses: ./.github/actions/job-end install-esp-toolchain: - needs: make-keys name: install-esp-toolchain runs-on: ubuntu-latest container: @@ -132,20 +95,16 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build ESP RISC-V toolchain if: steps.job-start.outputs.run_result != 'success' 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-riscv-toolchain runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -155,23 +114,24 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain 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 @@ -183,16 +143,9 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - name: Build verilator on remote if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/install-verilator.sh @@ -203,8 +156,7 @@ jobs: # 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, + needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, build-extra-tests] runs-on: ubuntu-latest steps: @@ -219,34 +171,15 @@ jobs: prepare-chipyard-cores: name: prepare-chipyard-cores - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -256,34 +189,15 @@ jobs: prepare-chipyard-peripherals: name: prepare-chipyard-peripherals - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -293,71 +207,34 @@ jobs: prepare-chipyard-accels: name: prepare-chipyard-accels - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL 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 prepare-chipyard-tracegen: name: prepare-chipyard-tracegen - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -367,34 +244,15 @@ jobs: prepare-chipyard-other: name: prepare-chipyard-other - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -404,34 +262,15 @@ jobs: prepare-chipyard-fpga: name: prepare-chipyard-fpga - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -444,928 +283,424 @@ jobs: 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests 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 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests 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 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests 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 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start - if: steps.job-start.outputs.run_result != 'success' id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - 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 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - 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] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - name: Run tests 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" - uses: ./.github/actions/job-end fireboom-run-tests: name: fireboom-run-tests - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - name: Run tests 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" - uses: ./.github/actions/job-end firesim-multiclock-run-tests: name: firesim-multiclock-run-tests - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - 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: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - name: Run tests 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" - uses: ./.github/actions/job-end From 4584a37951267f2d8f252390ab566f465e8cb3ee Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:10:53 -0700 Subject: [PATCH 18/51] Unnest ssh-checkout action | Remove unnecessary SSH key additions --- .github/actions/ssh-checkout/action.yml | 14 --- .github/actions/toolchain-build/action.yml | 10 +- .github/workflows/chipyard-run-tests.yml | 137 ++++++++++++++++----- 3 files changed, 114 insertions(+), 47 deletions(-) delete mode 100644 .github/actions/ssh-checkout/action.yml diff --git a/.github/actions/ssh-checkout/action.yml b/.github/actions/ssh-checkout/action.yml deleted file mode 100644 index bed48cf6..00000000 --- a/.github/actions/ssh-checkout/action.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: ssh-checkout -description: "Checkout code and add SSH keys to access remote build server" - -runs: - using: "composite" - 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 }} diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index f6afb68c..5994546b 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -22,16 +22,18 @@ runs: shell: bash # brute force way to swap between riscv/esp-tools caches - - uses: actions/cache@v2 - id: toolchain-build-riscv-tools + - name: Cache riscv-tools if: ${{ inputs.tools-version == "riscv-tools" }} + uses: actions/cache@v2 + id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-install key: ${{ steps.genkey.outputs.riscvtools-cache-key }} - - uses: actions/cache@v2 - id: toolchain-build-esp-tools + - name: Cache esp-tools if: ${{ inputs.tools-version == "esp-tools" }} + uses: actions/cache@v2 + id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-install key: ${{ steps.genkey.outputs.esptools-cache-key }} diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index d908014a..aec5d8d3 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -143,7 +143,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build verilator on remote @@ -177,7 +183,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -195,7 +207,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -213,7 +231,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -232,7 +256,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -250,7 +280,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -268,7 +304,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -289,7 +331,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -308,7 +351,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -327,7 +371,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -346,7 +391,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -365,7 +411,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -384,7 +431,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -403,7 +451,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -422,7 +471,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -441,7 +491,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -460,7 +511,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -480,7 +532,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -499,7 +552,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -518,7 +572,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -538,7 +593,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -558,7 +614,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -577,7 +634,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -596,7 +654,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -615,7 +674,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -634,7 +694,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -653,7 +714,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -673,7 +740,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -693,7 +766,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Run tests From f4b88ac9135ad776adf3782041a500dc464d7a3f Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:12:05 -0700 Subject: [PATCH 19/51] Slightly more robust run_script function --- .github/scripts/defaults.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 3d08e74b..f250023b 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -9,7 +9,9 @@ run () { } run_script () { - ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" + SCRIPT=$1 + shift + ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $SCRIPT "$@" } clean () { From 897156ad5b5f7ccdfc0b4419fd8473bb054a89ec Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:25:42 -0700 Subject: [PATCH 20/51] Workaround not allowing if: within composite actions --- .github/actions/toolchain-build/action.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 5994546b..f05b5be8 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -14,29 +14,21 @@ runs: run: .github/scripts/create-hash.sh shell: bash - - 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)" - shell: bash - # brute force way to swap between riscv/esp-tools caches - name: Cache riscv-tools - if: ${{ inputs.tools-version == "riscv-tools" }} uses: actions/cache@v2 id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-install - key: ${{ steps.genkey.outputs.riscvtools-cache-key }} + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(riscv-tools.hash) }} + # brute force way to swap between riscv/esp-tools caches - name: Cache esp-tools - if: ${{ inputs.tools-version == "esp-tools" }} uses: actions/cache@v2 id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-install - key: ${{ steps.genkey.outputs.esptools-cache-key }} + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(esp-tools.hash) }} - name: Build toolchain if not cached run: | From c776ebf970a79eeb40a4ef20337231ab3ce85c98 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:33:18 -0700 Subject: [PATCH 21/51] Try to search/add hash files into GH-workspace --- .github/actions/toolchain-build/action.yml | 4 ++-- .github/scripts/create-hash.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index f05b5be8..bbaf6513 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -20,7 +20,7 @@ runs: id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-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: Cache esp-tools @@ -28,7 +28,7 @@ runs: id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-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 run: | diff --git a/.github/scripts/create-hash.sh b/.github/scripts/create-hash.sh index dae9f25d..0fa95628 100755 --- a/.github/scripts/create-hash.sh +++ b/.github/scripts/create-hash.sh @@ -15,6 +15,6 @@ for tools in 'riscv-tools' 'esp-tools' ; do git submodule status "toolchains/${tools}" 'toolchains/libgloss' 'toolchains/qemu' | while read -r line ; do echo "${line#[!0-9a-f]}" - done > "${tools}.hash" + done > "$GITHUB_WORKSPACE/${tools}.hash" done echo "Hashfile for riscv-tools and esp-tools created in $HOME" From 7064c469bc3b6133ef55b68a52a6d0193c9ebf65 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:35:05 -0700 Subject: [PATCH 22/51] Forgot quotes --- .github/actions/toolchain-build/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index bbaf6513..6e5329a7 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -20,7 +20,7 @@ runs: id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-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: Cache esp-tools @@ -28,7 +28,7 @@ runs: id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-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 run: | From 9c6f4bc2ac5e50ccb11dbb66308a40c4b5146d87 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:44:04 -0700 Subject: [PATCH 23/51] Try fixing docs + Add non-rtl checks to final pass --- .github/workflows/chipyard-run-tests.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index aec5d8d3..7a50ce25 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -11,6 +11,18 @@ env: JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit jobs: + cancel-prior-workflows: + name: cancel-prior-workflows + 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 }} + commit-on-master-check: name: commit-on-master-check runs-on: ubuntu-latest @@ -62,7 +74,7 @@ jobs: sudo pip3 install -r docs/requirements.txt make -C docs html - name: Show error log from sphinx if failed - if: (steps.job-start.outputs.run_result != 'success') && ${{ failure() }} + if: steps.job-start.outputs.run_result != 'success' && ${{ failure() }} run: cat /tmp/sphinx-err*.log - uses: ./.github/actions/job-end @@ -790,7 +802,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, From c2647e333a67093a268e1bc5fc8962bc5a3c07b3 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 10:17:58 -0700 Subject: [PATCH 24/51] Fix doc build error | Don't skip setup-complete --- .github/workflows/chipyard-run-tests.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 7a50ce25..ffe3e95a 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -73,9 +73,7 @@ jobs: 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: steps.job-start.outputs.run_result != 'success' && ${{ failure() }} - run: cat /tmp/sphinx-err*.log + cat /tmp/sphinx-err*.log 2>/dev/null - uses: ./.github/actions/job-end install-riscv-toolchain: @@ -173,17 +171,13 @@ jobs: # # When adding new prep jobs, please add them to `needs` below setup-complete: - name: "setup complete" + name: setup-complete needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, build-extra-tests] runs-on: ubuntu-latest steps: - - uses: ./.github/actions/job-start - id: job-start - name: Set up complete - if: steps.job-start.outputs.run_result != 'success' run: echo Set up is complete! - - uses: ./.github/actions/job-end ########################################################################## From d7f7d071ed4b5c78061d60ffe9cb228ae40bfacb Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 10:24:23 -0700 Subject: [PATCH 25/51] Retry fixing doc build error --- .github/workflows/chipyard-run-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index ffe3e95a..74f46aa1 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -73,7 +73,9 @@ jobs: sudo apt-get install -y python3-pip sudo pip3 install -r docs/requirements.txt make -C docs html - cat /tmp/sphinx-err*.log 2>/dev/null + - name: Show error log from sphinx if failed + if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + run: cat /tmp/sphinx-err*.log - uses: ./.github/actions/job-end install-riscv-toolchain: From b9401dbc4b2bb19f879c335a601d4dfd8b836c2c Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 13:43:27 -0700 Subject: [PATCH 26/51] Mockup self-hosted runners + Bugfix run-tests by init-submods --- .github/actions/run-tests/action.yml | 4 + .github/scripts/defaults.sh | 27 +- .github/scripts/do-rtl-build.sh | 58 +- .github/scripts/install-verilator.sh | 20 +- .github/scripts/run-firesim-scala-tests.sh | 50 +- .github/workflows/chipyard-run-tests.yml | 1544 ++++++++++---------- 6 files changed, 815 insertions(+), 888 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index f0aa9d25..892ea699 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -20,6 +20,10 @@ inputs: runs: using: "composite" steps: + - name: Init submodules (since only the RTL is cached) + run: ./scripts/init-submodules-no-riscv-tools.sh + shell: bash + - name: Build toolchain uses: ./.github/actions/toolchain-build with: diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index f250023b..22307531 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -1,24 +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 () { - SCRIPT=$1 - shift - ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $SCRIPT "$@" -} - -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 @@ -35,10 +16,10 @@ CURRENT_BRANCH=$(git branch --show-current) 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 index 3a5d56ca..e37cc863 100755 --- a/.github/scripts/do-rtl-build.sh +++ b/.github/scripts/do-rtl-build.sh @@ -17,45 +17,22 @@ source $SCRIPT_DIR/defaults.sh # call clean on exit trap clean EXIT -cd $LOCAL_CHIPYARD_DIR +cd $REMOTE_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 RISCV=$REMOTE_ESP_DIR + export LD_LIBRARY_PATH=$REMOTE_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 + GEMMINI_SOFTWARE_DIR=$REMOTE_CHIPYARD_DIR/generators/gemmini/software/gemmini-rocc-tests + cd $GEMMINI_SOFTWARE_DIR 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 @@ -69,27 +46,20 @@ case $2 in esac # enter the verilator directory and build the specific config on remote server -run "export RISCV=\"$TOOLS_DIR\"; \ - make -C $REMOTE_MAKE_DIR clean;" +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]}" + 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 +rm -rf $REMOTE_CHIPYARD_DIR/project diff --git a/.github/scripts/install-verilator.sh b/.github/scripts/install-verilator.sh index f667b365..1159fc47 100755 --- a/.github/scripts/install-verilator.sh +++ b/.github/scripts/install-verilator.sh @@ -10,16 +10,14 @@ 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\"" +$SCRIPT_DIR/clean-old-files.sh $CI_DIR +rm -rf $REMOTE_PREFIX* -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;" +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/run-firesim-scala-tests.sh b/.github/scripts/run-firesim-scala-tests.sh index 55a22365..9b329fa7 100755 --- a/.github/scripts/run-firesim-scala-tests.sh +++ b/.github/scripts/run-firesim-scala-tests.sh @@ -13,54 +13,36 @@ source $SCRIPT_DIR/defaults.sh # call clean on exit trap clean EXIT -export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +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 firesim_sysroot=lib-install -local_firesim_sysroot=$LOCAL_FIRESIM_DIR/$firesim_sysroot remote_firesim_sysroot=$REMOTE_FIRESIM_DIR/$firesim_sysroot -cd $LOCAL_CHIPYARD_DIR +cd $REMOTE_CHIPYARD_DIR ./scripts/init-submodules-no-riscv-tools.sh -cd $LOCAL_CHIPYARD_DIR/sims/firesim/sim/firesim-lib/src/main/cc/lib +cd $REMOTE_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 +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 -# 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" +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 -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]}" +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/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 74f46aa1..753bd66c 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -23,791 +23,783 @@ jobs: with: access_token: ${{ github.token }} - commit-on-master-check: - name: commit-on-master-check - 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: 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 - 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: 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 - 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: 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - run: cat /tmp/sphinx-err*.log - - uses: ./.github/actions/job-end - - install-riscv-toolchain: - name: install-riscv-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 default RISC-V toolchain - 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 - 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 default RISC-V toolchain - 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 - 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: ${{ 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 + # commit-on-master-check: + # name: commit-on-master-check + # 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: 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 + # 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: 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 + # 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: 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + # run: cat /tmp/sphinx-err*.log + # - uses: ./.github/actions/job-end + # + # install-riscv-toolchain: + # name: install-riscv-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 default RISC-V toolchain + # 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 + # 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 default RISC-V toolchain + # 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 + # 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: ${{ 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 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 }} - uses: ./.github/actions/job-start id: job-start - - name: Build verilator on remote + - name: Build verilator on self-hosted if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/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: [install-riscv-toolchain, install-esp-toolchain, install-verilator, - build-extra-tests] - runs-on: ubuntu-latest - steps: - - name: Set up complete - run: echo Set up is complete! - - ########################################################################## - - prepare-chipyard-cores: - name: prepare-chipyard-cores - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - 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: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - 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: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - 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 - - prepare-chipyard-tracegen: - name: prepare-chipyard-tracegen - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - 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: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - 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: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - 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: prepare-chipyard-cores - 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: 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: prepare-chipyard-cores - 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: 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: prepare-chipyard-cores - 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: 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: prepare-chipyard-cores - 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: 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: prepare-chipyard-cores - 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: 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: prepare-chipyard-peripherals - 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: 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: prepare-chipyard-peripherals - 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: 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: prepare-chipyard-peripherals - 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: 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: prepare-chipyard-peripherals - 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: 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: prepare-chipyard-accels - 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: Run tests - 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 - - chipyard-streaming-fir-run-tests: - name: chipyard-streaming-fir-run-tests - needs: prepare-chipyard-accels - 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: 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: prepare-chipyard-accels - 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: 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: prepare-chipyard-accels - 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: Run tests - 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 - - chipyard-gemmini-run-tests: - name: chipyard-gemmini-run-tests - needs: prepare-chipyard-accels - 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: Run tests - 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 - - chipyard-nvdla-run-tests: - name: chipyard-nvdla-run-tests - needs: prepare-chipyard-accels - 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: 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: prepare-chipyard-tracegen - 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: 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: prepare-chipyard-tracegen - 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: 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: prepare-chipyard-other - 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: 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: prepare-chipyard-other - 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: 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: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - 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: "extra-tests" - project-key: "firesim" - run-script: "run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - fireboom-run-tests: - name: fireboom-run-tests - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - 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: "extra-tests" - project-key: "fireboom" - run-script: "run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - firesim-multiclock-run-tests: - name: firesim-multiclock-run-tests - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - 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: "extra-tests" - project-key: "firesim-multiclock" - run-script: "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 - # - # When adding new top level jobs, please add them to `needs` below - all_tests_passed: - name: "all tests passed" - 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, - chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, - tracegen-boom-run-tests, tracegen-run-tests, - icenet-run-tests, testchipip-run-tests, - prepare-chipyard-fpga, - firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - runs-on: ubuntu-latest - steps: - - run: echo Success! + # # 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: [install-riscv-toolchain, install-esp-toolchain, install-verilator, + # build-extra-tests] + # runs-on: ubuntu-latest + # steps: + # - name: Set up complete + # run: echo Set up is complete! + # + # ########################################################################## + # + # prepare-chipyard-cores: + # name: prepare-chipyard-cores + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # 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: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # 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: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # 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 + # + # prepare-chipyard-tracegen: + # name: prepare-chipyard-tracegen + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # 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: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # 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: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # 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: prepare-chipyard-cores + # 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: 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: prepare-chipyard-cores + # 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: 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: prepare-chipyard-cores + # 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: 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: prepare-chipyard-cores + # 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: 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: prepare-chipyard-cores + # 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: 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: prepare-chipyard-peripherals + # 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: 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: prepare-chipyard-peripherals + # 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: 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: prepare-chipyard-peripherals + # 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: 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: prepare-chipyard-peripherals + # 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: 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: prepare-chipyard-accels + # 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: Run tests + # 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 + # + # chipyard-streaming-fir-run-tests: + # name: chipyard-streaming-fir-run-tests + # needs: prepare-chipyard-accels + # 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: 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: prepare-chipyard-accels + # 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: 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: prepare-chipyard-accels + # 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: Run tests + # 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 + # + # chipyard-gemmini-run-tests: + # name: chipyard-gemmini-run-tests + # needs: prepare-chipyard-accels + # 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: Run tests + # 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 + # + # chipyard-nvdla-run-tests: + # name: chipyard-nvdla-run-tests + # needs: prepare-chipyard-accels + # 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: 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: prepare-chipyard-tracegen + # 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: 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: prepare-chipyard-tracegen + # 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: 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: prepare-chipyard-other + # 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: 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: prepare-chipyard-other + # 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: 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: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - 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: "extra-tests" + # project-key: "firesim" + # run-script: "run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # fireboom-run-tests: + # name: fireboom-run-tests + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - 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: "extra-tests" + # project-key: "fireboom" + # run-script: "run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # firesim-multiclock-run-tests: + # name: firesim-multiclock-run-tests + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - 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: "extra-tests" + # project-key: "firesim-multiclock" + # run-script: "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 + # # + # # When adding new top level jobs, please add them to `needs` below + # all_tests_passed: + # name: "all tests passed" + # 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, + # chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, + # tracegen-boom-run-tests, tracegen-run-tests, + # icenet-run-tests, testchipip-run-tests, + # prepare-chipyard-fpga, + # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + # runs-on: ubuntu-latest + # steps: + # - run: echo Success! From 43430cb8bc05edd6d8d713e292789b8e48b23fd6 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 13:56:07 -0700 Subject: [PATCH 27/51] Retry --- .github/scripts/defaults.sh | 5 ++-- .github/workflows/chipyard-run-tests.yml | 34 ++++++++++++------------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 22307531..04ccd331 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -8,13 +8,12 @@ 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=$GITHUB_WORKSPACE REMOTE_RISCV_DIR=$GITHUB_WORKSPACE/riscv-tools-install diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 753bd66c..61b3bfc4 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -78,23 +78,23 @@ jobs: # run: cat /tmp/sphinx-err*.log # - uses: ./.github/actions/job-end # - # install-riscv-toolchain: - # name: install-riscv-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 default RISC-V toolchain - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # with: - # tools-version: 'riscv-tools' - # - uses: ./.github/actions/job-end + install-riscv-toolchain: + name: install-riscv-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 default RISC-V toolchain + 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 From ca4e9563b9829728e198499fe2752a4e06313d1b Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 14:15:46 -0700 Subject: [PATCH 28/51] Clearer script naming | Renable all CI --- .github/actions/prepare-rtl/action.yml | 2 +- .github/scripts/create-hash.sh | 4 +- ...do-rtl-build.sh => remote-do-rtl-build.sh} | 0 ...rilator.sh => remote-install-verilator.sh} | 3 +- ...s.sh => remote-run-firesim-scala-tests.sh} | 15 +- .github/workflows/chipyard-run-tests.yml | 1487 ++++++++--------- 6 files changed, 745 insertions(+), 766 deletions(-) rename .github/scripts/{do-rtl-build.sh => remote-do-rtl-build.sh} (100%) rename .github/scripts/{install-verilator.sh => remote-install-verilator.sh} (93%) rename .github/scripts/{run-firesim-scala-tests.sh => remote-run-firesim-scala-tests.sh} (77%) diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index 89dbb431..45996a90 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -12,7 +12,7 @@ inputs: 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 diff --git a/.github/scripts/create-hash.sh b/.github/scripts/create-hash.sh index 0fa95628..f64c0696 100755 --- a/.github/scripts/create-hash.sh +++ b/.github/scripts/create-hash.sh @@ -15,6 +15,6 @@ for tools in 'riscv-tools' 'esp-tools' ; do git submodule status "toolchains/${tools}" 'toolchains/libgloss' 'toolchains/qemu' | while read -r line ; do echo "${line#[!0-9a-f]}" - done > "$GITHUB_WORKSPACE/${tools}.hash" + 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/do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh similarity index 100% rename from .github/scripts/do-rtl-build.sh rename to .github/scripts/remote-do-rtl-build.sh diff --git a/.github/scripts/install-verilator.sh b/.github/scripts/remote-install-verilator.sh similarity index 93% rename from .github/scripts/install-verilator.sh rename to .github/scripts/remote-install-verilator.sh index 1159fc47..b244614e 100755 --- a/.github/scripts/install-verilator.sh +++ b/.github/scripts/remote-install-verilator.sh @@ -1,6 +1,6 @@ #!/bin/bash -# move verilator to the remote server +# install verilator # turn echo on and error on earliest command set -ex @@ -10,7 +10,6 @@ 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* diff --git a/.github/scripts/run-firesim-scala-tests.sh b/.github/scripts/remote-run-firesim-scala-tests.sh similarity index 77% rename from .github/scripts/run-firesim-scala-tests.sh rename to .github/scripts/remote-run-firesim-scala-tests.sh index 9b329fa7..916c7ca5 100755 --- a/.github/scripts/run-firesim-scala-tests.sh +++ b/.github/scripts/remote-run-firesim-scala-tests.sh @@ -10,33 +10,28 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh -# call clean on exit -trap clean EXIT - 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 -firesim_sysroot=lib-install -remote_firesim_sysroot=$REMOTE_FIRESIM_DIR/$firesim_sysroot +REMOTE_FIRESIM_SYSROOT=$REMOTE_FIRESIM_DIR/lib-install -cd $REMOTE_CHIPYARD_DIR ./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 +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 +LD_LIB_DIR=$REMOTE_FIRESIM_SYSROOT/lib:$REMOTE_RISCV_DIR/lib # Run Firesim Scala Tests export RISCV=$TOOLS_DIR diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 61b3bfc4..35ea5c45 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -23,64 +23,64 @@ jobs: with: access_token: ${{ github.token }} - # commit-on-master-check: - # name: commit-on-master-check - # 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: 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 - # 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: 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 - # 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: 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - # run: cat /tmp/sphinx-err*.log - # - uses: ./.github/actions/job-end - # + commit-on-master-check: + name: commit-on-master-check + 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: 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 + 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: 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 + 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: 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + run: cat /tmp/sphinx-err*.log + - uses: ./.github/actions/job-end + install-riscv-toolchain: name: install-riscv-toolchain - runs-on: ubuntu-latest + runs-on: self-hosted container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash @@ -95,58 +95,58 @@ jobs: 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 - # 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 default RISC-V toolchain - # 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 - # 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: ${{ 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-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 + 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 default RISC-V toolchain + 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 + 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: ${{ 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 @@ -158,648 +158,633 @@ jobs: id: job-start - name: Build verilator on self-hosted if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/install-verilator.sh + 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: [install-riscv-toolchain, install-esp-toolchain, install-verilator, - # build-extra-tests] - # runs-on: ubuntu-latest - # steps: - # - name: Set up complete - # run: echo Set up is complete! - # - # ########################################################################## - # - # prepare-chipyard-cores: - # name: prepare-chipyard-cores - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # 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: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # 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: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # 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 - # - # prepare-chipyard-tracegen: - # name: prepare-chipyard-tracegen - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # 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: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # 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: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # 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: prepare-chipyard-cores - # 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: 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: prepare-chipyard-cores - # 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: 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: prepare-chipyard-cores - # 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: 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: prepare-chipyard-cores - # 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: 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: prepare-chipyard-cores - # 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: 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: prepare-chipyard-peripherals - # 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: 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: prepare-chipyard-peripherals - # 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: 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: prepare-chipyard-peripherals - # 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: 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: prepare-chipyard-peripherals - # 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: 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: prepare-chipyard-accels - # 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: Run tests - # 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 - # - # chipyard-streaming-fir-run-tests: - # name: chipyard-streaming-fir-run-tests - # needs: prepare-chipyard-accels - # 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: 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: prepare-chipyard-accels - # 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: 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: prepare-chipyard-accels - # 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: Run tests - # 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 - # - # chipyard-gemmini-run-tests: - # name: chipyard-gemmini-run-tests - # needs: prepare-chipyard-accels - # 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: Run tests - # 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 - # - # chipyard-nvdla-run-tests: - # name: chipyard-nvdla-run-tests - # needs: prepare-chipyard-accels - # 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: 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: prepare-chipyard-tracegen - # 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: 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: prepare-chipyard-tracegen - # 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: 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: prepare-chipyard-other - # 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: 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: prepare-chipyard-other - # 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: 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: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - 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: "extra-tests" - # project-key: "firesim" - # run-script: "run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # fireboom-run-tests: - # name: fireboom-run-tests - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - 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: "extra-tests" - # project-key: "fireboom" - # run-script: "run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # firesim-multiclock-run-tests: - # name: firesim-multiclock-run-tests - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - 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: "extra-tests" - # project-key: "firesim-multiclock" - # run-script: "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 - # # - # # When adding new top level jobs, please add them to `needs` below - # all_tests_passed: - # name: "all tests passed" - # 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, - # chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, - # tracegen-boom-run-tests, tracegen-run-tests, - # icenet-run-tests, testchipip-run-tests, - # prepare-chipyard-fpga, - # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - # runs-on: ubuntu-latest - # steps: - # - run: echo Success! + # 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: [install-riscv-toolchain, install-esp-toolchain, install-verilator, + build-extra-tests] + runs-on: ubuntu-latest + steps: + - name: Set up complete + run: echo Set up is complete! + + ########################################################################## + + prepare-chipyard-cores: + name: prepare-chipyard-cores + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + 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: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + 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: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + 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 + + prepare-chipyard-tracegen: + name: prepare-chipyard-tracegen + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + 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: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + 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: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + 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: prepare-chipyard-cores + 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: 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: prepare-chipyard-cores + 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: 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: prepare-chipyard-cores + 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: 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: prepare-chipyard-cores + 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: 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: prepare-chipyard-cores + 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: 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: prepare-chipyard-peripherals + 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: 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: prepare-chipyard-peripherals + 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: 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: prepare-chipyard-peripherals + 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: 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: prepare-chipyard-peripherals + 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: 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: prepare-chipyard-accels + 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: Run tests + 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 + + chipyard-streaming-fir-run-tests: + name: chipyard-streaming-fir-run-tests + needs: prepare-chipyard-accels + 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: 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: prepare-chipyard-accels + 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: 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: prepare-chipyard-accels + 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: Run tests + 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 + + chipyard-gemmini-run-tests: + name: chipyard-gemmini-run-tests + needs: prepare-chipyard-accels + 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: Run tests + 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 + + chipyard-nvdla-run-tests: + name: chipyard-nvdla-run-tests + needs: prepare-chipyard-accels + 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: 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: prepare-chipyard-tracegen + 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: 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: prepare-chipyard-tracegen + 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: 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: prepare-chipyard-other + 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: 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: prepare-chipyard-other + 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: 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: setup-complete + runs-on: self-hosted + 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: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "firesim" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + fireboom-run-tests: + name: fireboom-run-tests + needs: setup-complete + runs-on: self-hosted + 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: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "fireboom" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + firesim-multiclock-run-tests: + name: firesim-multiclock-run-tests + needs: setup-complete + runs-on: self-hosted + 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: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "firesim-multiclock" + 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 + # + # When adding new top level jobs, please add them to `needs` below + all_tests_passed: + name: "all tests passed" + 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, + chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, + tracegen-boom-run-tests, tracegen-run-tests, + icenet-run-tests, testchipip-run-tests, + prepare-chipyard-fpga, + firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + runs-on: ubuntu-latest + steps: + - run: echo Success! From 3d1301040b525e5af68eb37f744372b051f7a082 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 14:18:08 -0700 Subject: [PATCH 29/51] Revert toolchain to use GH-A area --- .github/workflows/chipyard-run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 35ea5c45..5e42678d 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -80,7 +80,7 @@ jobs: install-riscv-toolchain: name: install-riscv-toolchain - runs-on: self-hosted + runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash From b612d04db007613a5fb6fb9556392c68ecc21eb5 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 14:49:27 -0700 Subject: [PATCH 30/51] Update README --- .github/README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/README.md b/.github/README.md index e864d705..030fbc96 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 @@ -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 From c7e251db137f6d9eebd8468d79c421a2ecd8e890 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 15:11:32 -0700 Subject: [PATCH 31/51] Bump README again --- .github/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/README.md b/.github/README.md index 030fbc96..4af1e9d9 100644 --- a/.github/README.md +++ b/.github/README.md @@ -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 From 51bc3ad7bb0f7e4e33d5385bd8aed46887d0ce1e Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 15:41:26 -0700 Subject: [PATCH 32/51] Fix setting JAVA/SBT make variables + Use run-binary-fast in run-tests --- .github/scripts/remote-do-rtl-build.sh | 2 +- .../scripts/remote-run-firesim-scala-tests.sh | 2 +- .github/scripts/run-tests.sh | 20 +++++++++---------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index e37cc863..ffe7e6e0 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -59,7 +59,7 @@ do 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]} + 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 diff --git a/.github/scripts/remote-run-firesim-scala-tests.sh b/.github/scripts/remote-run-firesim-scala-tests.sh index 916c7ca5..732cb59d 100755 --- a/.github/scripts/remote-run-firesim-scala-tests.sh +++ b/.github/scripts/remote-run-firesim-scala-tests.sh @@ -40,4 +40,4 @@ 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]} +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 7729579c..93475a19 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -30,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]} @@ -64,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) @@ -106,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]} From 0cca14c910d6791824aa0f51bea3e03118a81c43 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:09:36 -0700 Subject: [PATCH 33/51] Try to work around perm. issues on self-hosted | Remove SSH key installs --- .github/workflows/chipyard-run-tests.yml | 50 ++++++++++-------------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 5e42678d..6ef2ee1b 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -152,6 +152,8 @@ jobs: name: install-verilator runs-on: self-hosted steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -183,13 +185,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -207,13 +206,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -231,13 +227,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -256,13 +249,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -280,13 +270,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -304,13 +291,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -714,6 +698,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -735,6 +721,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -756,6 +744,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start From 9c335ef1899ebaee36f8f166242886aacf71df41 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:12:50 -0700 Subject: [PATCH 34/51] test --- .github/workflows/chipyard-run-tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 6ef2ee1b..3aa55caf 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -152,8 +152,10 @@ jobs: name: install-verilator runs-on: self-hosted steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE + - name: TESTING + run: | + whoami + ls -al $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start From a66666a2e519554d92be4753e269a9c26eada909 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:34:51 -0700 Subject: [PATCH 35/51] Remove containers from self-hosted + Remove sudo dir stuff --- .github/workflows/chipyard-run-tests.yml | 68 ++++-------------------- 1 file changed, 10 insertions(+), 58 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 3aa55caf..fcadc402 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -151,11 +151,8 @@ jobs: install-verilator: name: install-verilator runs-on: self-hosted + needs: cancel-prior-workflows steps: - - name: TESTING - run: | - whoami - ls -al $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -183,17 +180,12 @@ jobs: name: prepare-chipyard-cores needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -204,17 +196,12 @@ jobs: name: prepare-chipyard-peripherals needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -225,17 +212,12 @@ jobs: name: prepare-chipyard-accels needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -247,17 +229,12 @@ jobs: name: prepare-chipyard-tracegen needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -268,17 +245,12 @@ jobs: name: prepare-chipyard-other needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -289,17 +261,12 @@ jobs: name: prepare-chipyard-fpga needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -696,17 +663,12 @@ jobs: name: firesim-run-tests needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Run tests + - name: Run tests on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: @@ -719,17 +681,12 @@ jobs: name: fireboom-run-tests needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Run tests + - name: Run tests on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: @@ -742,17 +699,12 @@ jobs: name: firesim-multiclock-run-tests needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Run tests + - name: Run tests on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: From e7b0cb4aedc38a1a74d256fc04c96bb2426800cf Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:36:37 -0700 Subject: [PATCH 36/51] Remove need for container for cleanup old workflow job --- .github/workflows/chipyard-run-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index fcadc402..c2348ae8 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -14,9 +14,6 @@ jobs: cancel-prior-workflows: name: cancel-prior-workflows 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 From 379ad3a73cbfa42be0428f1edc23d2f5edd1e5b7 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 21:08:39 -0700 Subject: [PATCH 37/51] Forgot to remove clean in one place --- .github/scripts/remote-do-rtl-build.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index ffe7e6e0..bda81ead 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -14,9 +14,6 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh -# call clean on exit -trap clean EXIT - cd $REMOTE_CHIPYARD_DIR ./scripts/init-submodules-no-riscv-tools.sh ./scripts/init-fpga.sh From 20ebcc9f1bb2ee72c1d10bc2dcd689e5af5e06de Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Sat, 9 Oct 2021 10:35:47 -0700 Subject: [PATCH 38/51] Fix run-tests to use prep-rtl action + Fix Gemmini software build --- .github/actions/run-tests/action.yml | 7 +------ .github/actions/toolchain-build/action.yml | 2 +- .github/scripts/remote-do-rtl-build.sh | 7 ++++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 892ea699..28064e31 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -24,14 +24,9 @@ runs: run: ./scripts/init-submodules-no-riscv-tools.sh shell: bash - - name: Build toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: ${{ inputs.tools-version }} - # Note: You shouldn't need the other inputs since it shouldn't build RTL from scratch - name: Build RTL - uses: ./.github/actions/toolchain-build + uses: ./.github/actions/prepare-rtl with: tools-version: ${{ inputs.tools-version }} group-key: ${{ inputs.group-key }} diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 6e5329a7..f84a0fd9 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -1,5 +1,5 @@ name: toolchain-build -description: 'Builds or retrieves cache of the selected toolchain' +description: 'Builds or retrieves cache of the all toolchains' inputs: tools-version: diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index bda81ead..e5c4e101 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -25,11 +25,12 @@ if [ $1 = "group-accels" ]; then export RISCV=$REMOTE_ESP_DIR export LD_LIBRARY_PATH=$REMOTE_ESP_DIR/lib export PATH=$RISCV/bin:$PATH - GEMMINI_SOFTWARE_DIR=$REMOTE_CHIPYARD_DIR/generators/gemmini/software/gemmini-rocc-tests - cd $GEMMINI_SOFTWARE_DIR + pushd $REMOTE_CHIPYARD_DIR/generators/gemmini/software git submodule update --init --recursive gemmini-rocc-tests - cd gemmini-rocc-tests + pushd gemmini-rocc-tests ./build.sh + popd + popd fi # choose what make dir to use From 78e733b99274056d4a4a63be8477218e2e27ae16 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Sat, 9 Oct 2021 11:59:24 -0700 Subject: [PATCH 39/51] Build both toolchains in 1 job + Rename toolchain build job --- .github/actions/prepare-rtl/action.yml | 8 +---- .github/actions/run-tests/action.yml | 5 --- .github/actions/toolchain-build/action.yml | 30 +++++----------- .github/scripts/remote-do-rtl-build.sh | 2 -- .github/workflows/chipyard-run-tests.yml | 41 ++++------------------ 5 files changed, 17 insertions(+), 69 deletions(-) diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index 45996a90..25098bfc 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -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 diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 28064e31..d74b18af 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -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 diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index f84a0fd9..88da9a1a 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -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 diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index e5c4e101..a5268288 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -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 diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index c2348ae8..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 }} @@ -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 From 748c973d4427748f33d2e044cbb7b57da3207b61 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 11 Oct 2021 09:49:27 -0700 Subject: [PATCH 40/51] Clean extra disk space after build toolchains --- .github/scripts/build-toolchains.sh | 3 +++ 1 file changed, 3 insertions(+) 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 From 192e60f5a19933ea39fd632841f439105f3273f7 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 11 Oct 2021 16:45:57 -0700 Subject: [PATCH 41/51] Debug --- .github/actions/toolchain-build/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 88da9a1a..0c74cc44 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -8,6 +8,15 @@ runs: run: .github/scripts/create-hash.sh shell: bash + - run: | + cat $GITHUB_WORKSPACE/riscv-tools.hash + ls -alh $GITHUB_WORKSPACE/riscv-tools.hash + cat $GITHUB_WORKSPACE/esp-tools.hash + ls -alh $GITHUB_WORKSPACE/esp-tools.hash + echo "${{ hashFiles('**/riscv-tools.hash') }}" + echo "${{ hashFiles('**/esp-tools.hash') }}" + shell: bash + - name: Cache riscv-tools uses: actions/cache@v2 with: From 6eb06137f12e976e4346c1320a54f88fcd3b066a Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Tue, 12 Oct 2021 21:31:56 -0700 Subject: [PATCH 42/51] Testing theory --- .github/workflows/chipyard-run-tests.yml | 1367 +++++++++++----------- 1 file changed, 700 insertions(+), 667 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index c932d3e6..f27f726b 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -20,685 +20,718 @@ jobs: with: access_token: ${{ github.token }} - commit-on-master-check: - name: commit-on-master-check - 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: 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 - 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: 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 - 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: 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - run: cat /tmp/sphinx-err*.log - - uses: ./.github/actions/job-end - - install-toolchains: - name: install-toolchains - 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 RISC-V toolchains - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - - uses: ./.github/actions/job-end - - build-extra-tests: - name: build-extra-tests - needs: install-toolchains - 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 RISC-V toolchains - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - - 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: ${{ 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: self-hosted - needs: cancel-prior-workflows - steps: - - name: Checkout - uses: actions/checkout@v2 - - 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: [install-toolchains, install-verilator, build-extra-tests] + test1: + name: test1 runs-on: ubuntu-latest steps: - - name: Set up complete - run: echo Set up is complete! + - run: | + mkdir -p $GITHUB_WORKSPACE + echo "dummy" >> $GITHUB_WORKSPACE/temp.file + echo "${{ hashFiles('**/temp.file') }}" - ########################################################################## - - prepare-chipyard-cores: - name: prepare-chipyard-cores - needs: setup-complete + test2: + name: test2 runs-on: self-hosted steps: - - name: Checkout - uses: actions/checkout@v2 - - 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 + - run: | + mkdir -p $GITHUB_WORKSPACE + echo "dummy" >> $GITHUB_WORKSPACE/temp.file + echo "${{ hashFiles('**/temp.file') }}" - prepare-chipyard-peripherals: - name: prepare-chipyard-peripherals - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - 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: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - 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: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - 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: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - 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: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - 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: prepare-chipyard-cores + test3: + name: test3 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: 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 + - run: | + mkdir -p $GITHUB_WORKSPACE + echo "dummy" >> $GITHUB_WORKSPACE/temp.file + echo "${{ hashFiles('**/temp.file') }}" - chipyard-hetero-run-tests: - name: chipyard-hetero-run-tests - needs: prepare-chipyard-cores - 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: 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: prepare-chipyard-cores - 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: 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: prepare-chipyard-cores - 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: 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: prepare-chipyard-cores - 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: 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: prepare-chipyard-peripherals - 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: 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: prepare-chipyard-peripherals - 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: 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: prepare-chipyard-peripherals - 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: 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: prepare-chipyard-peripherals - 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: 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: prepare-chipyard-accels - 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: 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: prepare-chipyard-accels - 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: 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: prepare-chipyard-accels - 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: 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: prepare-chipyard-accels - 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: 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: prepare-chipyard-accels - 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: 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: prepare-chipyard-accels - 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: 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: prepare-chipyard-tracegen - 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: 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: prepare-chipyard-tracegen - 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: 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: prepare-chipyard-other - 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: 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: prepare-chipyard-other - 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: 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: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - 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: "remote-run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - fireboom-run-tests: - name: fireboom-run-tests - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - 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: "remote-run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - firesim-multiclock-run-tests: - name: firesim-multiclock-run-tests - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - 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: "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 - # - # When adding new top level jobs, please add them to `needs` below - all_tests_passed: - name: "all tests passed" - 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, - chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, - tracegen-boom-run-tests, tracegen-run-tests, - icenet-run-tests, testchipip-run-tests, - prepare-chipyard-fpga, - firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - runs-on: ubuntu-latest - steps: - - run: echo Success! + # commit-on-master-check: + # name: commit-on-master-check + # 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: 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 + # 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: 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 + # 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: 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + # run: cat /tmp/sphinx-err*.log + # - uses: ./.github/actions/job-end + # + # install-toolchains: + # name: install-toolchains + # 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 RISC-V toolchains + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # - uses: ./.github/actions/job-end + # + # build-extra-tests: + # name: build-extra-tests + # needs: install-toolchains + # 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 RISC-V toolchains + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # - 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: ${{ 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: self-hosted + # needs: cancel-prior-workflows + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - 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: [install-toolchains, install-verilator, build-extra-tests] + # runs-on: ubuntu-latest + # steps: + # - name: Set up complete + # run: echo Set up is complete! + # + # ########################################################################## + # + # prepare-chipyard-cores: + # name: prepare-chipyard-cores + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - 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: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - 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: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - 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: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - 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: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - 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: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - 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: prepare-chipyard-cores + # 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: 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: prepare-chipyard-cores + # 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: 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: prepare-chipyard-cores + # 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: 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: prepare-chipyard-cores + # 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: 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: prepare-chipyard-cores + # 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: 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: prepare-chipyard-peripherals + # 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: 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: prepare-chipyard-peripherals + # 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: 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: prepare-chipyard-peripherals + # 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: 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: prepare-chipyard-peripherals + # 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: 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: prepare-chipyard-accels + # 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: 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: prepare-chipyard-accels + # 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: 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: prepare-chipyard-accels + # 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: 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: prepare-chipyard-accels + # 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: 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: prepare-chipyard-accels + # 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: 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: prepare-chipyard-accels + # 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: 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: prepare-chipyard-tracegen + # 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: 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: prepare-chipyard-tracegen + # 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: 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: prepare-chipyard-other + # 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: 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: prepare-chipyard-other + # 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: 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: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - 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: "remote-run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # fireboom-run-tests: + # name: fireboom-run-tests + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - 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: "remote-run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # firesim-multiclock-run-tests: + # name: firesim-multiclock-run-tests + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - 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: "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 + # # + # # When adding new top level jobs, please add them to `needs` below + # all_tests_passed: + # name: "all tests passed" + # 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, + # chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, + # tracegen-boom-run-tests, tracegen-run-tests, + # icenet-run-tests, testchipip-run-tests, + # prepare-chipyard-fpga, + # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + # runs-on: ubuntu-latest + # steps: + # - run: echo Success! From 3afce5718b1b97596266c45182f9643bb3d9cd2f Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Tue, 12 Oct 2021 21:37:18 -0700 Subject: [PATCH 43/51] Testing theory --- .github/workflows/chipyard-run-tests.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index f27f726b..c4b4f6d3 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -24,19 +24,22 @@ jobs: name: test1 runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: | - mkdir -p $GITHUB_WORKSPACE echo "dummy" >> $GITHUB_WORKSPACE/temp.file echo "${{ hashFiles('**/temp.file') }}" + echo "${{ hashFiles('**/README.md') }}" test2: name: test2 runs-on: self-hosted steps: + - uses: actions/checkout@v2 - run: | - mkdir -p $GITHUB_WORKSPACE echo "dummy" >> $GITHUB_WORKSPACE/temp.file echo "${{ hashFiles('**/temp.file') }}" + echo "${{ hashFiles('**/README.md') }}" + test3: name: test3 @@ -45,12 +48,11 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - uses: actions/checkout@v2 - run: | - mkdir -p $GITHUB_WORKSPACE echo "dummy" >> $GITHUB_WORKSPACE/temp.file echo "${{ hashFiles('**/temp.file') }}" - - + echo "${{ hashFiles('**/README.md') }}" # commit-on-master-check: From 99f5345891ecc8703cd23e0380a4ec55cf92cdf2 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Tue, 12 Oct 2021 21:55:52 -0700 Subject: [PATCH 44/51] Try hack --- .github/actions/toolchain-build/action.yml | 32 +- .github/workflows/chipyard-run-tests.yml | 1385 ++++++++++---------- 2 files changed, 701 insertions(+), 716 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 0c74cc44..b2ee75c2 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -9,11 +9,31 @@ runs: shell: bash - run: | - cat $GITHUB_WORKSPACE/riscv-tools.hash - ls -alh $GITHUB_WORKSPACE/riscv-tools.hash - cat $GITHUB_WORKSPACE/esp-tools.hash - ls -alh $GITHUB_WORKSPACE/esp-tools.hash + echo "${{ hashFiles('**/riscv-tools.hash') }}" > riscv-tools.hashFilesOutput + echo "${{ hashFiles('**/esp-tools.hash') }}" > esp-tools.hashFilesOutput + shell: bash + + # AJG: hacky since "hashFiles" function differs on self-hosted vs GH-A machines + - 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: DEBUG - Check the output of the file vs the actual hashFiles output + run: | + echo "${{ steps.genkey.outputs.riscv-tools-cache-key }}" echo "${{ hashFiles('**/riscv-tools.hash') }}" + echo "${{ steps.genkey.outputs.esp-tools-cache-key }}" echo "${{ hashFiles('**/esp-tools.hash') }}" shell: bash @@ -21,7 +41,7 @@ runs: uses: actions/cache@v2 with: path: riscv-tools-install - key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/riscv-tools.hash') }} + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.riscv-tools-cache-key }} - name: Build RISC-V toolchain if not cached run: ./.github/scripts/build-toolchains.sh riscv-tools @@ -31,7 +51,7 @@ runs: uses: actions/cache@v2 with: path: esp-tools-install - key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/esp-tools.hash') }} + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.esp-tools-cache-key }} - name: Build ESP RISC-V toolchain if not cached run: ./.github/scripts/build-toolchains.sh esp-tools diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index c4b4f6d3..c932d3e6 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -20,720 +20,685 @@ jobs: with: access_token: ${{ github.token }} - test1: - name: test1 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: | - echo "dummy" >> $GITHUB_WORKSPACE/temp.file - echo "${{ hashFiles('**/temp.file') }}" - echo "${{ hashFiles('**/README.md') }}" - - test2: - name: test2 - runs-on: self-hosted - steps: - - uses: actions/checkout@v2 - - run: | - echo "dummy" >> $GITHUB_WORKSPACE/temp.file - echo "${{ hashFiles('**/temp.file') }}" - echo "${{ hashFiles('**/README.md') }}" - - - test3: - name: test3 + commit-on-master-check: + name: commit-on-master-check runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: actions/checkout@v2 - - run: | - echo "dummy" >> $GITHUB_WORKSPACE/temp.file - echo "${{ hashFiles('**/temp.file') }}" - echo "${{ hashFiles('**/README.md') }}" + - 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 + 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: 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 - # commit-on-master-check: - # name: commit-on-master-check - # 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: 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 - # 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: 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 - # 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: 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - # run: cat /tmp/sphinx-err*.log - # - uses: ./.github/actions/job-end - # - # install-toolchains: - # name: install-toolchains - # 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 RISC-V toolchains - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # - uses: ./.github/actions/job-end - # - # build-extra-tests: - # name: build-extra-tests - # needs: install-toolchains - # 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 RISC-V toolchains - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # - 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: ${{ 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: self-hosted - # needs: cancel-prior-workflows - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - 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: [install-toolchains, install-verilator, build-extra-tests] - # runs-on: ubuntu-latest - # steps: - # - name: Set up complete - # run: echo Set up is complete! - # - # ########################################################################## - # - # prepare-chipyard-cores: - # name: prepare-chipyard-cores - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - 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: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - 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: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - 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: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - 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: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - 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: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - 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: prepare-chipyard-cores - # 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: 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: prepare-chipyard-cores - # 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: 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: prepare-chipyard-cores - # 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: 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: prepare-chipyard-cores - # 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: 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: prepare-chipyard-cores - # 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: 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: prepare-chipyard-peripherals - # 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: 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: prepare-chipyard-peripherals - # 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: 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: prepare-chipyard-peripherals - # 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: 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: prepare-chipyard-peripherals - # 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: 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: prepare-chipyard-accels - # 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: 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: prepare-chipyard-accels - # 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: 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: prepare-chipyard-accels - # 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: 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: prepare-chipyard-accels - # 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: 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: prepare-chipyard-accels - # 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: 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: prepare-chipyard-accels - # 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: 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: prepare-chipyard-tracegen - # 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: 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: prepare-chipyard-tracegen - # 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: 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: prepare-chipyard-other - # 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: 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: prepare-chipyard-other - # 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: 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: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - 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: "remote-run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # fireboom-run-tests: - # name: fireboom-run-tests - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - 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: "remote-run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # firesim-multiclock-run-tests: - # name: firesim-multiclock-run-tests - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - 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: "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 - # # - # # When adding new top level jobs, please add them to `needs` below - # all_tests_passed: - # name: "all tests passed" - # 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, - # chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, - # tracegen-boom-run-tests, tracegen-run-tests, - # icenet-run-tests, testchipip-run-tests, - # prepare-chipyard-fpga, - # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - # runs-on: ubuntu-latest - # steps: - # - run: echo Success! + documentation-check: + name: documentation-check + 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: 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + run: cat /tmp/sphinx-err*.log + - uses: ./.github/actions/job-end + + install-toolchains: + name: install-toolchains + 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 RISC-V toolchains + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + - uses: ./.github/actions/job-end + + build-extra-tests: + name: build-extra-tests + needs: install-toolchains + 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 RISC-V toolchains + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + - 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: ${{ 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: self-hosted + needs: cancel-prior-workflows + steps: + - name: Checkout + uses: actions/checkout@v2 + - 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: [install-toolchains, install-verilator, build-extra-tests] + runs-on: ubuntu-latest + steps: + - name: Set up complete + run: echo Set up is complete! + + ########################################################################## + + prepare-chipyard-cores: + name: prepare-chipyard-cores + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - 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: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - 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: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - 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: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - 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: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - 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: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - 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: prepare-chipyard-cores + 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: 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: prepare-chipyard-cores + 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: 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: prepare-chipyard-cores + 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: 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: prepare-chipyard-cores + 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: 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: prepare-chipyard-cores + 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: 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: prepare-chipyard-peripherals + 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: 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: prepare-chipyard-peripherals + 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: 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: prepare-chipyard-peripherals + 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: 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: prepare-chipyard-peripherals + 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: 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: prepare-chipyard-accels + 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: 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: prepare-chipyard-accels + 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: 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: prepare-chipyard-accels + 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: 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: prepare-chipyard-accels + 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: 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: prepare-chipyard-accels + 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: 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: prepare-chipyard-accels + 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: 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: prepare-chipyard-tracegen + 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: 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: prepare-chipyard-tracegen + 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: 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: prepare-chipyard-other + 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: 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: prepare-chipyard-other + 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: 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: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - 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: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + fireboom-run-tests: + name: fireboom-run-tests + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - 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: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + firesim-multiclock-run-tests: + name: firesim-multiclock-run-tests + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - 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: "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 + # + # When adding new top level jobs, please add them to `needs` below + all_tests_passed: + name: "all tests passed" + 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, + chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, + tracegen-boom-run-tests, tracegen-run-tests, + icenet-run-tests, testchipip-run-tests, + prepare-chipyard-fpga, + firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + runs-on: ubuntu-latest + steps: + - run: echo Success! From fdd9cb2f1d48ebdd410a7e9e398f9a5e51979b07 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Wed, 13 Oct 2021 09:43:44 -0700 Subject: [PATCH 45/51] Cleanup toolchain-build a bit more --- .github/actions/toolchain-build/action.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index b2ee75c2..c3492054 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -8,12 +8,13 @@ runs: 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 - # AJG: hacky since "hashFiles" function differs on self-hosted vs GH-A machines - name: Cache hashFiles outputs uses: actions/cache@v2 with: @@ -29,30 +30,22 @@ runs: echo "::set-output name=esp-tools-cache-key::$(cat esp-tools.hashFilesOutput)" shell: bash - - name: DEBUG - Check the output of the file vs the actual hashFiles output - run: | - echo "${{ steps.genkey.outputs.riscv-tools-cache-key }}" - echo "${{ hashFiles('**/riscv-tools.hash') }}" - echo "${{ steps.genkey.outputs.esp-tools-cache-key }}" - echo "${{ hashFiles('**/esp-tools.hash') }}" - 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: 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 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 From 2fb3dc7c423b9b72bde1b79aa85de9bc1c408e3f Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Wed, 13 Oct 2021 23:13:52 -0700 Subject: [PATCH 46/51] Small cleanup on README.md/comments [ci skip] Co-authored-by: Jerry Zhao --- .github/README.md | 4 ++-- .github/scripts/check-commit.sh | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/README.md b/.github/README.md index 4af1e9d9..2f70449e 100644 --- a/.github/README.md +++ b/.github/README.md @@ -7,7 +7,7 @@ GitHub Actions Brief Explanation --------------------------- 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`. +In our case, we have just one workflow named `chipyard-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. @@ -120,7 +120,7 @@ Note: On the remote server you need to have the `*.pub` key file added to the `a Notes on CIRCLE CI ------------------ This code is heavily based on the origin [CircleCI]() work. There a quite a few differences -- CCI supports workflow level variables, in GA we must define thiing like `BUILDSERVER: ${{ secrets.BUILDSERVER }}` in every job +- CCI supports workflow level variables, in GA we must define things like `BUILDSERVER: ${{ secrets.BUILDSERVER }}` in every job - CCI allows a much larger cache. The entire CY directory with toolchains and RTL could be cached, with GA there is a 5Gb total cache limit - GA support more parallel jobs 20 vs 4 - GA seems to allow much longer run times diff --git a/.github/scripts/check-commit.sh b/.github/scripts/check-commit.sh index 1b59191e..004acc5a 100755 --- a/.github/scripts/check-commit.sh +++ b/.github/scripts/check-commit.sh @@ -9,7 +9,6 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh -# enter bhd repo cd $LOCAL_CHIPYARD_DIR # ignore the private vlsi submodules From b7fd1ffae228e65385075e0aff4c32013b3312a1 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 18 Oct 2021 10:33:49 -0700 Subject: [PATCH 47/51] Add bypass to ignore simulator dependency --- .github/scripts/run-tests.sh | 34 +++++++++++++++++---------------- common.mk | 19 ++++++++++++------ generators/tracegen/tracegen.mk | 2 +- 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index 93475a19..ffa61db5 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -13,12 +13,14 @@ export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" export LD_LIBRARY_PATH="$RISCV/lib" export PATH="$RISCV/bin:$PATH" +DISABLE_SIM_PREREQ="BREAK_SIM_PREREQ=1" + run_bmark () { - make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ + make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@ } run_asm () { - make run-asm-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ + make run-asm-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@ } run_both () { @@ -27,7 +29,7 @@ run_both () { } run_tracegen () { - make tracegen -C $LOCAL_SIM_DIR $@ + make tracegen -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@ } case $1 in @@ -53,7 +55,7 @@ case $1 in export RISCV=$LOCAL_ESP_DIR export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib export PATH=$RISCV/bin:$PATH - make run-rv64uv-p-asm-tests -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR ${mapping[$1]} + make run-rv64uv-p-asm-tests -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} ;; chipyard-gemmini) export RISCV=$LOCAL_ESP_DIR @@ -62,32 +64,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 - 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 + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${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) - make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${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 - make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv ;; chipyard-streaming-fir) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${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-fast + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${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-fast + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${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) @@ -97,20 +99,20 @@ case $1 in run_tracegen ${mapping[$1]} ;; chipyard-cva6) - make run-binary-fast -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv + make run-binary-fast -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv ;; chipyard-sodor) run_asm ${mapping[$1]} ;; chipyard-nvdla) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary-fast + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${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]} + make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} ;; testchipip) - make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} + make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} ;; *) echo "No set of tests for $1. Did you spell it right?" diff --git a/common.mk b/common.mk index 634f7767..7adb91d5 100644 --- a/common.mk +++ b/common.mk @@ -31,7 +31,8 @@ EXTRA_SIM_REQS ?= #---------------------------------------------------------------------------- HELP_SIMULATION_VARIABLES += \ " EXTRA_SIM_FLAGS = additional runtime simulation flags (passed within +permissive)" \ -" NUMACTL = set to '1' to wrap simulator in the appropriate numactl command" +" NUMACTL = set to '1' to wrap simulator in the appropriate numactl command" \ +" BREAK_SIM_PREREQ = when running a binary, doesn't rebuild RTL on source changes" EXTRA_SIM_FLAGS ?= NUMACTL ?= 0 @@ -191,16 +192,22 @@ ifeq (,$(BINARY)) $(error BINARY variable is not set. Set it to the simulation binary) endif +# allow you to override sim prereq +ifeq(,$(BREAK_SIM_PREREQ)) +SIM_PREREQ = $(sim) +SIM_DEBUG_PREREQ = $(sim_debug) +else + # run normal binary with hardware-logged insn dissassembly -run-binary: $(output_dir) check-binary +run-binary: $(output_dir) $(SIM_PREREQ) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $(BINARY) >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log) # run simulator as fast as possible (no insn disassembly) -run-binary-fast: $(output_dir) check-binary +run-binary-fast: $(output_dir) $(SIM_PREREQ) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $(BINARY) >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log) run-fast: run-asm-tests-fast run-bmark-tests-fast @@ -239,10 +246,10 @@ $(output_dir): $(output_dir)/%: $(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa/% $(output_dir) ln -sf $< $@ -$(output_dir)/%.run: $(output_dir)/% +$(output_dir)/%.run: $(output_dir)/% $(SIM_PREREQ) (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $< >(spike-dasm > $@) | tee $<.log) ######################################################################################### diff --git a/generators/tracegen/tracegen.mk b/generators/tracegen/tracegen.mk index 1766059f..55a544e7 100644 --- a/generators/tracegen/tracegen.mk +++ b/generators/tracegen/tracegen.mk @@ -8,7 +8,7 @@ AXE=$(AXE_DIR)/axe $(AXE): $(wildcard $(AXE_DIR)/*.[ch]) $(AXE_DIR)/make.sh cd $(AXE_DIR) && ./make.sh -$(output_dir)/tracegen.out: +$(output_dir)/tracegen.out: $(SIM_PREREQ) mkdir -p $(output_dir) && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) none $@ $(output_dir)/tracegen.result: $(output_dir)/tracegen.out $(AXE) From 1d3d8e4e0151030d1c35d6ca609307e9d18376e3 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 25 Oct 2021 22:29:38 -0700 Subject: [PATCH 48/51] Reverse documentation on breaking prereqs --- docs/Advanced-Concepts/Debugging-RTL.rst | 20 ++++++++++++++++---- docs/Customization/Dsptools-Blocks.rst | 1 - docs/Customization/MMIO-Peripherals.rst | 1 - 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/Advanced-Concepts/Debugging-RTL.rst b/docs/Advanced-Concepts/Debugging-RTL.rst index 678ab33a..79b9428e 100644 --- a/docs/Advanced-Concepts/Debugging-RTL.rst +++ b/docs/Advanced-Concepts/Debugging-RTL.rst @@ -22,8 +22,8 @@ make target. For example: make CONFIG=CustomConfig debug -The ``run-binary-debug`` rule uses the prebuilt simulator to run a custom binary -and generate a waveform. For example, to run a +The ``run-binary-debug`` rule will also automatically build a simulator, +run it on a custom binary, and generate a waveform. For example, to run a test on ``helloworld.riscv``, use .. code-block:: shell @@ -83,8 +83,20 @@ Torture tests The RISC-V torture utility generates random RISC-V assembly streams, compiles them, runs them on both the Spike functional model and the SW simulator, and verifies identical program behavior. The torture utility can also be configured to run -continuously for stress-testing. The torture utility exists within the ``utilities`` -directory. +continuously for stress-testing. The torture utility exists within the ``tools`` +directory. To run torture tests, run ``make`` in the simulation directories: + +.. code-block:: shell + + make CONFIG=CustomConfig torture + +To run overnight tests (repeated random tests), run + +.. code-block:: shell + + make CONFIG=CustomConfig TORTURE_ONIGHT_OPTIONS= torture-overnight + +You can find the overnight options in `overnight/src/main/scala/main.scala` in the torture repo. Firesim Debugging --------------------------- diff --git a/docs/Customization/Dsptools-Blocks.rst b/docs/Customization/Dsptools-Blocks.rst index 52109a75..bdf68fc1 100644 --- a/docs/Customization/Dsptools-Blocks.rst +++ b/docs/Customization/Dsptools-Blocks.rst @@ -120,7 +120,6 @@ Now we can run our simulation. .. code-block:: shell cd sims/verilator - make CONFIG=StreamingFIRRocketConfig make CONFIG=StreamingFIRRocketConfig BINARY=../../tests/streaming-fir.riscv run-binary .. [#] ``ReadQueue`` and ``WriteQueue`` are good illustrations of how to write a ``DspBlock`` and how they can be integrated into rocket, but in a real design a DMA engine would be preferred. ``ReadQueue`` will stall the processor if you try to read an empty queue, and ``WriteQueue`` will stall if you try to write to a full queue, which a DMA engine can more elegantly avoid. Furthermore, a DMA engine can do the work of moving data, freeing the processor to do other useful work (or sleep). diff --git a/docs/Customization/MMIO-Peripherals.rst b/docs/Customization/MMIO-Peripherals.rst index bffe6f26..15ed5a00 100644 --- a/docs/Customization/MMIO-Peripherals.rst +++ b/docs/Customization/MMIO-Peripherals.rst @@ -137,7 +137,6 @@ Now with all of that done, we can go ahead and run our simulation. .. code-block:: shell cd sims/verilator - make CONFIG=GCDTLRocketConfig make CONFIG=GCDTLRocketConfig BINARY=../../tests/gcd.riscv run-binary From e6387e06272e42de0bdf28042a494d3597184668 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 25 Oct 2021 22:30:00 -0700 Subject: [PATCH 49/51] Fix Makefile bug w/ BREAK_SIM_PREREQ --- common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index 7adb91d5..6bd1e04c 100644 --- a/common.mk +++ b/common.mk @@ -193,10 +193,10 @@ ifeq (,$(BINARY)) endif # allow you to override sim prereq -ifeq(,$(BREAK_SIM_PREREQ)) +ifeq (,$(BREAK_SIM_PREREQ)) SIM_PREREQ = $(sim) SIM_DEBUG_PREREQ = $(sim_debug) -else +endif # run normal binary with hardware-logged insn dissassembly run-binary: $(output_dir) $(SIM_PREREQ) check-binary From 2e86495e80053f9ad2f513d7d05960b4bea132d0 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 25 Oct 2021 22:30:22 -0700 Subject: [PATCH 50/51] Force removal of toolchain files after build --- .github/scripts/build-toolchains.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/build-toolchains.sh b/.github/scripts/build-toolchains.sh index cd1abb1d..1f23c408 100755 --- a/.github/scripts/build-toolchains.sh +++ b/.github/scripts/build-toolchains.sh @@ -16,6 +16,6 @@ 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 + # de-init the toolchain area to save on space (forced to ignore local changes) + git submodule deinit --force $LOCAL_CHIPYARD_DIR/toolchains/$1 fi From 23bb89e21ea3936805b5cfc7fa77c494bc2a3574 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 26 Oct 2021 23:15:18 -0700 Subject: [PATCH 51/51] Forgot a couple of sim prereqs --- common.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common.mk b/common.mk index 6bd1e04c..2bb0f511 100644 --- a/common.mk +++ b/common.mk @@ -219,19 +219,19 @@ $(binary_hex): $(output_dir) $(BINARY) $(base_dir)/scripts/smartelf2hex.sh $(BINARY) > $(binary_hex) run-binary-hex: check-binary -run-binary-hex: $(output_dir) $(sim) $(binary_hex) +run-binary-hex: $(output_dir) $(SIM_PREREQ) $(binary_hex) run-binary-hex: run-binary run-binary-hex: override LOADMEM_ADDR = 80000000 run-binary-hex: override LOADMEM = $(binary_hex) run-binary-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-debug-hex: check-binary -run-binary-debug-hex: $(output_dir) $(sim) $(binary_hex) +run-binary-debug-hex: $(output_dir) $(SIM_DEBUG_REREQ) $(binary_hex) run-binary-debug-hex: run-binary-debug run-binary-debug-hex: override LOADMEM_ADDR = 80000000 run-binary-debug-hex: override LOADMEM = $(binary_hex) run-binary-debug-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-fast-hex: check-binary -run-binary-fast-hex: $(output_dir) $(binary_hex) +run-binary-fast-hex: $(output_dir) $(SIM_PREREQ) $(binary_hex) run-binary-fast-hex: run-binary-fast run-binary-fast-hex: override LOADMEM_ADDR = 80000000 run-binary-fast-hex: override LOADMEM = $(binary_hex)