Skip to content

Commit

Permalink
Generate all lockfiles at once
Browse files Browse the repository at this point in the history
  • Loading branch information
abejgonzalez committed May 9, 2023
1 parent dbbf7c9 commit 1f687af
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 33 deletions.
4 changes: 2 additions & 2 deletions scripts/build-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ if run_step "1"; then
LOCKFILE=$CONDA_LOCK_REQS/conda-requirements-$TOOLCHAIN_TYPE-linux-64.conda-lock.yml

if [ "$USE_UNPINNED_DEPS" = true ]; then
# auto-gen the lockfile
$CYDIR/scripts/generate-conda-lockfile.sh $TOOLCHAIN_TYPE
# auto-gen the lockfiles
$CYDIR/scripts/generate-conda-lockfiles.sh
fi

# use conda-lock to create env
Expand Down
31 changes: 0 additions & 31 deletions scripts/generate-conda-lockfile.sh

This file was deleted.

18 changes: 18 additions & 0 deletions scripts/generate-conda-lockfiles.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1f687af

Please sign in to comment.