Merge pull request #1466 from ucb-bar/sync-params-n-script

Separate out conda-lock generation into new script
This commit is contained in:
Abraham Gonzalez
2023-05-09 20:41:31 -07:00
committed by GitHub
5 changed files with 565 additions and 517 deletions

View File

@@ -131,7 +131,7 @@ dependencies:
- pytest-mock
- moto
- mypy
- s3fs
- s3fs==0.4.2
- aiohttp
- pip:
- sure

View File

@@ -114,11 +114,12 @@ if run_step "1"; then
# note: lock file must end in .conda-lock.yml - see https://github.com/conda-incubator/conda-lock/issues/154
CONDA_REQS=$CYDIR/conda-reqs
CONDA_LOCK_REQS=$CONDA_REQS/conda-lock-reqs
# must match with the file generated by generate-conda-lockfile.sh
LOCKFILE=$CONDA_LOCK_REQS/conda-requirements-$TOOLCHAIN_TYPE-linux-64.conda-lock.yml
if [ "$USE_UNPINNED_DEPS" = true ]; then
# auto-gen the lockfile
conda-lock -f $CONDA_REQS/chipyard.yaml -f $CONDA_REQS/$TOOLCHAIN_TYPE.yaml --lockfile $LOCKFILE
# auto-gen the lockfiles
$CYDIR/scripts/generate-conda-lockfiles.sh
fi
# use conda-lock to create env

View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -ex
CUR_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
REQS_DIR="$CUR_DIR/../conda-reqs"
if [ ! -d "$REQS_DIR" ]; then
echo "$REQS_DIR does not exist, make sure you're calling this script from chipyard/"
exit 1
fi
for TOOLCHAIN_TYPE in riscv-tools esp-tools; do
# note: lock file must end in .conda-lock.yml - see https://github.com/conda-incubator/conda-lock/issues/154
LOCKFILE=$REQS_DIR/conda-lock-reqs/conda-requirements-$TOOLCHAIN_TYPE-linux-64.conda-lock.yml
conda-lock -f "$REQS_DIR/chipyard.yaml" -f "$REQS_DIR/$TOOLCHAIN_TYPE.yaml" -p linux-64 --lockfile $LOCKFILE
done