-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
# Parse command line arguments: | ||
# --conda-defs <path> : Path to the conda.sh file | ||
# --env-file <path> : Path to a conda environment YAML file | ||
|
||
ENV_FILE=environment.yml | ||
while test $# -gt 0; do | ||
case "$1" in | ||
--conda-defs) | ||
shift | ||
CONDA_DEFS=$1 | ||
shift | ||
;; | ||
--env-file) | ||
shift | ||
ENV_FILE=$1 | ||
shift | ||
;; | ||
*) | ||
break | ||
;; | ||
esac | ||
done | ||
|
||
# Configure conda to run in the current shell | ||
source $CONDA_DEFS | ||
|
||
# Get the name of the conda environment in the environment.yml file | ||
echo "Reading the environment file $ENV_FILE" | ||
ENV_NAME=$(grep name $ENV_FILE | head -n 1 | cut -d ' ' -f 2) | ||
echo " ... Found environment name: $ENV_NAME" | ||
|
||
# If the environment already exists, update it based on the file contents. Otherwise, create it. | ||
if conda info --envs | grep -q force; then | ||
echo " ... Updating the existing environment $ENV_NAME" | ||
conda env update -f $ENV_FILE --name $ENV_NAME | ||
else | ||
echo " ... Creating a new environment $ENV_NAME" | ||
conda env create -f environment.yml | ||
fi | ||
|
||
# Activate the environment | ||
conda activate $ENV_NAME | ||
|
||
# Build the FORCE executables | ||
echo "Building the FORCE executables" | ||
python setup.py install_exe --install-dir force_install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: force_build_10 | ||
dependencies: | ||
- python=3.10 | ||
- pip | ||
- pip: | ||
- cx_Freeze | ||
- raven-framework | ||
- heron-ravenframework | ||
- teal-ravenframework |