Switch to --force | More cleanup
This commit is contained in:
2
.github/actions/run-tests/action.yml
vendored
2
.github/actions/run-tests/action.yml
vendored
@@ -23,7 +23,7 @@ runs:
|
|||||||
- name: Init submodules (since only the RTL is cached)
|
- name: Init submodules (since only the RTL is cached)
|
||||||
run: |
|
run: |
|
||||||
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-${{ inputs.toolchain }}
|
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-${{ inputs.toolchain }}
|
||||||
./scripts/init-submodules-no-riscv-tools.sh --skip-validate
|
./scripts/init-submodules-no-riscv-tools.sh --force
|
||||||
shell: bash -leo pipefail {0}
|
shell: bash -leo pipefail {0}
|
||||||
|
|
||||||
# Note: You shouldn't need the other inputs since it shouldn't build RTL from scratch
|
# Note: You shouldn't need the other inputs since it shouldn't build RTL from scratch
|
||||||
|
|||||||
2
.github/scripts/remote-do-rtl-build.sh
vendored
2
.github/scripts/remote-do-rtl-build.sh
vendored
@@ -15,7 +15,7 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
|||||||
source $SCRIPT_DIR/defaults.sh
|
source $SCRIPT_DIR/defaults.sh
|
||||||
|
|
||||||
cd $REMOTE_CHIPYARD_DIR
|
cd $REMOTE_CHIPYARD_DIR
|
||||||
./scripts/init-submodules-no-riscv-tools.sh --skip-validate
|
./scripts/init-submodules-no-riscv-tools.sh --force
|
||||||
./scripts/init-fpga.sh
|
./scripts/init-fpga.sh
|
||||||
|
|
||||||
if [ $1 = "group-accels" ]; then
|
if [ $1 = "group-accels" ]; then
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
|||||||
source $SCRIPT_DIR/defaults.sh
|
source $SCRIPT_DIR/defaults.sh
|
||||||
|
|
||||||
cd $REMOTE_CHIPYARD_DIR
|
cd $REMOTE_CHIPYARD_DIR
|
||||||
./scripts/init-submodules-no-riscv-tools.sh --skip-validate
|
./scripts/init-submodules-no-riscv-tools.sh --force
|
||||||
|
|
||||||
# Run Firesim Scala Tests
|
# Run Firesim Scala Tests
|
||||||
export FIRESIM_ENV_SOURCED=1;
|
export FIRESIM_ENV_SOURCED=1;
|
||||||
|
|||||||
@@ -4,16 +4,12 @@
|
|||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
# On macOS, use GNU readlink from 'coreutils' package in Homebrew/MacPorts
|
RDIR=$(git rev-parse --show-toplevel)
|
||||||
if [ "$(uname -s)" = "Darwin" ] ; then
|
|
||||||
READLINK=greadlink
|
|
||||||
else
|
|
||||||
READLINK=readlink
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If BASH_SOURCE is undefined, we may be running under zsh, in that case
|
# get helpful utilities
|
||||||
# provide a zsh-compatible alternative
|
source $RDIR/scripts/utils.sh
|
||||||
DIR="$(dirname "$($READLINK -f "${BASH_SOURCE[0]:-${(%):-%x}}")")"
|
|
||||||
|
common_setup
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0} [OPTIONS] [riscv-tools | esp-tools]"
|
echo "Usage: ${0} [OPTIONS] [riscv-tools | esp-tools]"
|
||||||
@@ -28,7 +24,8 @@ usage() {
|
|||||||
echo "Options"
|
echo "Options"
|
||||||
echo " --help -h : Display this message"
|
echo " --help -h : Display this message"
|
||||||
echo " --unpinned-deps -ud : Use unpinned conda environment"
|
echo " --unpinned-deps -ud : Use unpinned conda environment"
|
||||||
echo " --batch : Skip prompt checking for tagged release/conda"
|
echo " --force -f : Skip prompt checking for tagged release/conda"
|
||||||
|
echo " --skip-validate : DEPRECATED: Same functionality as --force"
|
||||||
echo " --skip-conda : Skip conda env creation"
|
echo " --skip-conda : Skip conda env creation"
|
||||||
echo " --skip-toolchain-extra : Skip building extra RISC-V toolchain collateral (Spike, PK, tests, libgloos)"
|
echo " --skip-toolchain-extra : Skip building extra RISC-V toolchain collateral (Spike, PK, tests, libgloos)"
|
||||||
exit "$1"
|
exit "$1"
|
||||||
@@ -36,7 +33,7 @@ usage() {
|
|||||||
|
|
||||||
TOOLCHAIN="riscv-tools"
|
TOOLCHAIN="riscv-tools"
|
||||||
USE_PINNED_DEPS=true
|
USE_PINNED_DEPS=true
|
||||||
BATCH_FLAG=""
|
FORCE_FLAG=""
|
||||||
SKIP_CONDA=false
|
SKIP_CONDA=false
|
||||||
SKIP_TOOLCHAIN=false
|
SKIP_TOOLCHAIN=false
|
||||||
|
|
||||||
@@ -50,8 +47,8 @@ do
|
|||||||
TOOLCHAIN=$1 ;;
|
TOOLCHAIN=$1 ;;
|
||||||
-ud | --unpinned-deps )
|
-ud | --unpinned-deps )
|
||||||
USE_PINNED_DEPS=false ;;
|
USE_PINNED_DEPS=false ;;
|
||||||
--batch)
|
--force | -f | --skip-validate)
|
||||||
BATCH_FLAG=$1 ;;
|
FORCE_FLAG=$1 ;;
|
||||||
--skip-conda)
|
--skip-conda)
|
||||||
SKIP_CONDA=true ;;
|
SKIP_CONDA=true ;;
|
||||||
--skip-toolchain-extra)
|
--skip-toolchain-extra)
|
||||||
@@ -65,8 +62,8 @@ done
|
|||||||
|
|
||||||
if [ "$SKIP_CONDA" = false ]; then
|
if [ "$SKIP_CONDA" = false ]; then
|
||||||
# note: lock file must end in .conda-lock.yml - see https://github.com/conda-incubator/conda-lock/issues/154
|
# note: lock file must end in .conda-lock.yml - see https://github.com/conda-incubator/conda-lock/issues/154
|
||||||
LOCKFILE=$DIR/conda-requirements-$TOOLCHAIN-linux-64.conda-lock.yml
|
LOCKFILE=$RDIR/conda-requirements-$TOOLCHAIN-linux-64.conda-lock.yml
|
||||||
YAMLFILE=$DIR/conda-requirements-$TOOLCHAIN.yaml
|
YAMLFILE=$RDIR/conda-requirements-$TOOLCHAIN.yaml
|
||||||
|
|
||||||
if [ "$USE_PINNED_DEPS" = false ]; then
|
if [ "$USE_PINNED_DEPS" = false ]; then
|
||||||
# auto-gen the lockfile
|
# auto-gen the lockfile
|
||||||
@@ -74,28 +71,28 @@ if [ "$SKIP_CONDA" = false ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# use conda-lock to create env
|
# use conda-lock to create env
|
||||||
conda-lock install -p $DIR/.conda-env $LOCKFILE
|
conda-lock install -p $RDIR/.conda-env $LOCKFILE
|
||||||
|
|
||||||
source $DIR/.conda-env/etc/profile.d/conda.sh
|
source $RDIR/.conda-env/etc/profile.d/conda.sh
|
||||||
conda activate $DIR/.conda-env
|
conda activate $RDIR/.conda-env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$BATCH_FLAG" ]; then
|
if [ -z "$FORCE_FLAG" ]; then
|
||||||
if [ -z ${CONDA_DEFAULT_ENV+x} ]; then
|
if [ -z ${CONDA_DEFAULT_ENV+x} ]; then
|
||||||
error "ERROR: No conda environment detected. Did you activate the conda environment (e.x. 'conda activate base')?"
|
error "ERROR: No conda environment detected. Did you activate the conda environment (e.x. 'conda activate base')?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$DIR/scripts/init-submodules-no-riscv-tools.sh $BATCH_FLAG
|
$RDIR/scripts/init-submodules-no-riscv-tools.sh $FORCE_FLAG
|
||||||
|
|
||||||
if [ "$SKIP_TOOLCHAIN" = false ]; then
|
if [ "$SKIP_TOOLCHAIN" = false ]; then
|
||||||
$DIR/scripts/build-toolchain-extra.sh $BATCH_FLAG $TOOLCHAIN
|
$RDIR/scripts/build-toolchain-extra.sh $FORCE_FLAG $TOOLCHAIN
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$DIR/scripts/gen-tags.sh
|
$RDIR/scripts/gen-tags.sh
|
||||||
|
|
||||||
cat << EOT >> env.sh
|
cat << EOT >> env.sh
|
||||||
# line auto-generated by $0
|
# line auto-generated by $0
|
||||||
conda activate $DIR/.conda-env
|
conda activate $RDIR/.conda-env
|
||||||
EOT
|
EOT
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ usage() {
|
|||||||
echo " --prefix PREFIX : Install destination. If unset, defaults to $CONDA_PREFIX/riscv-tools"
|
echo " --prefix PREFIX : Install destination. If unset, defaults to $CONDA_PREFIX/riscv-tools"
|
||||||
echo " or $CONDA_PREFIX/esp-tools"
|
echo " or $CONDA_PREFIX/esp-tools"
|
||||||
echo " --clean-after-install : Run make clean in calls to module_make and module_build"
|
echo " --clean-after-install : Run make clean in calls to module_make and module_build"
|
||||||
echo " --batch : Skip prompt checking for conda"
|
echo " --force -f : Skip prompt checking for conda"
|
||||||
|
echo " --skip-validate : DEPRECATED: Same functionality as --force"
|
||||||
echo " --help -h : Display this message"
|
echo " --help -h : Display this message"
|
||||||
exit "$1"
|
exit "$1"
|
||||||
}
|
}
|
||||||
@@ -34,7 +35,7 @@ usage() {
|
|||||||
TOOLCHAIN="riscv-tools"
|
TOOLCHAIN="riscv-tools"
|
||||||
CLEANAFTERINSTALL=""
|
CLEANAFTERINSTALL=""
|
||||||
RISCV=""
|
RISCV=""
|
||||||
BATCH=false
|
FORCE=false
|
||||||
|
|
||||||
# getopts does not support long options, and is inflexible
|
# getopts does not support long options, and is inflexible
|
||||||
while [ "$1" != "" ];
|
while [ "$1" != "" ];
|
||||||
@@ -49,8 +50,8 @@ do
|
|||||||
CLEANAFTERINSTALL="true" ;;
|
CLEANAFTERINSTALL="true" ;;
|
||||||
riscv-tools | esp-tools)
|
riscv-tools | esp-tools)
|
||||||
TOOLCHAIN=$1 ;;
|
TOOLCHAIN=$1 ;;
|
||||||
--batch)
|
--force | -f | --skip-validate)
|
||||||
BATCH=true;
|
FORCE=true;
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
error "invalid option $1"
|
error "invalid option $1"
|
||||||
@@ -59,7 +60,7 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$BATCH" = false ]; then
|
if [ "$FORCE" = false ]; then
|
||||||
if [ -z ${CONDA_DEFAULT_ENV+x} ]; then
|
if [ -z ${CONDA_DEFAULT_ENV+x} ]; then
|
||||||
error "ERROR: No conda environment detected. Did you activate the conda environment (e.x. 'conda activate chipyard')?"
|
error "ERROR: No conda environment detected. Did you activate the conda environment (e.x. 'conda activate chipyard')?"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# exit script if any command fails
|
# exit script if any command fails
|
||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# exit script if any command fails
|
# exit script if any command fails
|
||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|||||||
@@ -13,18 +13,19 @@ common_setup
|
|||||||
|
|
||||||
function usage
|
function usage
|
||||||
{
|
{
|
||||||
echo "Usage: $0 [--batch]"
|
echo "Usage: $0 [--force]"
|
||||||
echo "Initialize Chipyard submodules and setup initial env.sh script."
|
echo "Initialize Chipyard submodules and setup initial env.sh script."
|
||||||
echo ""
|
echo ""
|
||||||
echo " --batch Skip prompt checking for tagged release"
|
echo " --force -f : Skip prompt checking for tagged release"
|
||||||
|
echo " --skip-validate : DEPRECATED: Same functionality as --force"
|
||||||
}
|
}
|
||||||
|
|
||||||
BATCH=false
|
FORCE=false
|
||||||
while test $# -gt 0
|
while test $# -gt 0
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--batch)
|
--force | -f | --skip-validate)
|
||||||
BATCH=true;
|
FORCE=true;
|
||||||
;;
|
;;
|
||||||
-h | -H | --help | help)
|
-h | -H | --help | help)
|
||||||
usage
|
usage
|
||||||
@@ -46,7 +47,7 @@ git_tag=$(git describe --exact-match --tags)
|
|||||||
git_tag_rc=$?
|
git_tag_rc=$?
|
||||||
restore_bash_options
|
restore_bash_options
|
||||||
if [ "$git_tag_rc" -ne 0 ]; then
|
if [ "$git_tag_rc" -ne 0 ]; then
|
||||||
if [ "$BATCH" == false ]; then
|
if [ "$FORCE" == false ]; then
|
||||||
while true; do
|
while true; do
|
||||||
read -p "WARNING: You are not on an official release of Chipyard."$'\n'"Type \"y\" to continue if this is intended or \"n\" if not: " validate
|
read -p "WARNING: You are not on an official release of Chipyard."$'\n'"Type \"y\" to continue if this is intended or \"n\" if not: " validate
|
||||||
case "$validate" in
|
case "$validate" in
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# exit script if any command fails
|
# exit script if any command fails
|
||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|||||||
@@ -3,19 +3,9 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# this should be run from chipyard repo top
|
# this should be run from chipyard repo top
|
||||||
TOPDIR=$(pwd)
|
RDIR=$(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
cd generators/cva6/src/main/resources/vsrc
|
cd $RDIR/libgloss
|
||||||
git submodule deinit cva6
|
|
||||||
|
|
||||||
cd $TOPDIR
|
|
||||||
|
|
||||||
cd toolchains/qemu/roms/
|
|
||||||
git submodule deinit edk2
|
|
||||||
cd ../
|
|
||||||
rm -rf build
|
|
||||||
|
|
||||||
cd ../libgloss
|
|
||||||
rm -rf build.log
|
rm -rf build.log
|
||||||
|
|
||||||
cd ../riscv-tools/riscv-isa-sim/
|
cd ../riscv-tools/riscv-isa-sim/
|
||||||
@@ -27,6 +17,5 @@ rm -rf build.log
|
|||||||
cd ../riscv-tests
|
cd ../riscv-tests
|
||||||
rm -rf build.log
|
rm -rf build.log
|
||||||
|
|
||||||
cd $TOPDIR
|
cd $RDIR/tools/api-config-chipsalliance
|
||||||
cd tools/api-config-chipsalliance
|
|
||||||
git config --local status.showUntrackedFiles no
|
git config --local status.showUntrackedFiles no
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e -x
|
set -ex
|
||||||
|
|
||||||
|
RDIR=$(git rev-parse --show-toplevel)
|
||||||
|
|
||||||
|
cd $RDIR
|
||||||
|
|
||||||
git rm generators/chipyard/src/main/scala/config/RocketSha3Configs.scala
|
git rm generators/chipyard/src/main/scala/config/RocketSha3Configs.scala
|
||||||
git rm -rf generators/sha3
|
git rm -rf generators/sha3
|
||||||
|
|||||||
Reference in New Issue
Block a user