forked from automaticanalysis/automaticanalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt workflow install step to use a single platform independent wrapper
Single-step install and configure, make parameter file name an env var
- Loading branch information
Showing
4 changed files
with
77 additions
and
79 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
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
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ python $TOOLDIR/get-pip.py --force-reinstall | |
|
||
# All MATLAB tools MUST be installed referred by the parameterset | ||
source $GITHUB_WORKSPACE/.github/workflows/tools_urls.sh | ||
source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_tools.sh $GITHUB_WORKSPACE/.github/workflows/aap_parameters_defaults_GitHub.xml $TOOLDIR | ||
source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_tools.sh $GITHUB_WORKSPACE/.github/workflows/$PARAMETER_XML $TOOLDIR | ||
|
||
echo "FSL: ${LOAD_FSL}; FREESURFER: ${LOAD_FREESURFER}" | ||
|
||
|
@@ -22,4 +22,10 @@ fi | |
|
||
if [[ "x${LOAD_FREESURFER}x" == "x1x" ]]; then | ||
source $GITHUB_WORKSPACE/aa_tools/toolboxes/installation_scripts/install_freesurfer.sh $TOOLDIR 7.2.0 centos7 "[email protected]\n7061\n *Ccpi6x7PAIeQ\n FS96pPK5vW.0g" $TEMPLATEDIR | ||
fi | ||
fi | ||
|
||
echo "Free space:" | ||
df -h | ||
mkdir $HOME/.aa | ||
cp $GITHUB_WORKSPACE/.github/workflows/$PARAMETER_XML $HOME/.aa/aap_parameters_user.xml | ||
mkdir $HOME/projects |
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,34 @@ | ||
# Note: Assume Python 2.7, since that will have been installed for facemasking requirements. | ||
# | ||
# Using python (instead of matlab) because using system() in matlab gives enormous amount of | ||
# command window output, and there is some problem with the status code from system() | ||
|
||
import sys | ||
import subprocess | ||
import platform | ||
|
||
def main(): | ||
do_install() | ||
|
||
def do_install(): | ||
plt = platform.system() | ||
if plt == "Windows": | ||
print("Your system is Windows") | ||
sys.stdout.flush() | ||
# do x y z | ||
elif plt == "Linux": | ||
print("Your system is Linux") | ||
sys.stdout.flush() | ||
subprocess.check_call('source $GITHUB_WORKSPACE/.github/workflows/tools_install.sh', shell=True, executable="/bin/bash") | ||
|
||
elif plt == "Darwin": | ||
print("Your system is MacOS") | ||
sys.stdout.flush() | ||
# do x y z | ||
else: | ||
print("Unidentified system:") | ||
print(plt) | ||
sys.stdout.flush() | ||
|
||
if __name__=="__main__": | ||
main() |