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
This commit is contained in:
chick
2021-10-01 14:31:02 -07:00
committed by Ella Schwarz
parent fc994c4822
commit 60ba6357a0
23 changed files with 1571 additions and 553 deletions

View File

@@ -1,24 +1,42 @@
#!/bin/bash
copy () {
rsync -azp -e 'ssh' --exclude '.git' $1 $2
}
run () {
ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER $@
}
run_script () {
ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2"
}
clean () {
# remove remote work dir
run "rm -rf $REMOTE_WORK_DIR"
}
# make parallelism
CI_MAKE_NPROC=8
CI_MAKE_NPROC=4
# chosen based on a 24c system shared with 1 other project
REMOTE_MAKE_NPROC=4
# verilator version
VERILATOR_VERSION=v4.034
HOME=$GITHUB_WORKSPACE
# remote variables
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
REMOTE_ESP_DIR=$GITHUB_WORKSPACE/esp-tools-install
REMOTE_CHIPYARD_DIR=$GITHUB_WORKSPACE
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_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/verilator
REMOTE_FIRESIM_DIR=$REMOTE_CHIPYARD_DIR/sims/firesim/sim
REMOTE_FPGA_DIR=$REMOTE_CHIPYARD_DIR/fpga