1
0
Fork 0

windows tests: revamp conda env

This commit is contained in:
Astro 2019-04-11 16:22:17 +02:00 committed by Sébastien Bourdeauducq
parent dadb1a0b2e
commit 315688cd74
2 changed files with 8 additions and 5 deletions

View File

@ -36,10 +36,11 @@ let
${openssh}/bin/scp -P 2022 ${sshOpts} \
"${src}" "${sshUser}@localhost:${target}"
'';
condaEnv = "artiq-env";
installCondaPkg = pkg: ''
F="$(basename ${pkg})"
${scp pkg "$F"}
${ssh "miniconda\\Scripts\\conda install $F"}
${ssh "miniconda\\Scripts\\conda install -y -n ${condaEnv} $F"}
${ssh "del $F"}
'';
makeTest = name: artiqPkg:
@ -72,7 +73,7 @@ let
# Allow tests to run for 2 minutes
${ssh "shutdown -s -t ${toString testTimeout}"}
${ssh "miniconda\\scripts\\activate && miniconda\\python -m unittest discover -v artiq.test"}
${ssh "miniconda\\scripts\\activate ${condaEnv} && miniconda\\envs\\${condaEnv}\\python -m unittest discover -v artiq.test"}
# Abort timeouted shutdown
${ssh "shutdown -a"}

View File

@ -98,9 +98,11 @@ stdenv.mkDerivation {
${scp miniconda "Miniconda.exe"}
${ssh "start /wait \"\" Miniconda.exe /S /D=%cd%\\miniconda"}
${ssh "del Miniconda.exe"}
${ssh "miniconda\\Scripts\\conda update -y python"}
${ssh "miniconda\\Scripts\\conda install -y numpy h5py"}
${ssh "miniconda\\Scripts\\conda install -y -c m-labs pythonparser"}
${ssh "miniconda\\Scripts\\conda config --add channels conda-forge"}
${ssh "miniconda\\Scripts\\conda config --add channels m-labs"}
${ssh "miniconda\\Scripts\\conda create -y -n artiq-env"}
${ssh "miniconda\\Scripts\\conda install -y -n artiq-env numpy scipy python-dateutil h5py pythonparser levenshtein outputcheck"}
${ssh "shutdown /p /f"}
echo "Waiting for qemu exit"