55# Build worker image (VM template)
66image :
77 - Ubuntu2004
8- # - Visual Studio 2019
8+ - Visual Studio 2019
99 - macos
1010
1111# set clone depth
@@ -16,43 +16,42 @@ build: off
1616
1717# scripts that run after cloning repository
1818install :
19- - if [[ "$CI_LINUX" == true ]]; then
20- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
21- bash miniconda.sh -b -p $HOME/miniconda;
22- else
23- curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -L -o miniconda.sh;
24- bash miniconda.sh -b -p $HOME/miniconda;
25- fi
26- - export PATH="$HOME/miniconda/bin:$PATH"
27- - hash -r
19+ - sh : if [[ $CI_LINUX == true ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; bash miniconda.sh -b -p $HOME/miniconda; export PATH="$HOME/miniconda/bin:$PATH"; else curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -L -o miniconda.sh; bash miniconda.sh -b -p $HOME/miniconda; export PATH="$HOME/miniconda/bin:$PATH"; fi
20+ - sh : hash -r
21+ - sh : source activate
22+ - cmd : SET MINICONDA_PATH="C:\\Miniconda38-x64"
23+ - cmd : SET PATH=%MINICONDA_PATH%;%MINICONDA_PATH%"\\Scripts";%PATH%
24+ - cmd : conda init cmd.exe
2825 - conda config --set always_yes yes --set changeps1 no
2926 - conda config --set auto_update_conda no
3027 - conda update -q conda
31- - source activate
28+
29+ # Set environment variables
30+ - sh : BIOPTIM_FOLDER=`pwd`
31+ - cmd : SET BIOPTIM_FOLDER=%cd%
32+
33+ # Setup the conda environment
3234 - conda env update -n bioptim -f environment.yml
3335 - conda activate bioptim
3436 - conda install pytest-cov black pytest pytest-cov codecov -cconda-forge
35- - conda install xorg-libx11 xorg-libxtst -cconda-forge
37+ - sh : if [[ $CI_LINUX == true ]]; then conda install xorg-libx11 xorg-libxtst -cconda-forge; fi
3638 - conda list
39+
40+ # Install ACADOS on LINUX and MAC
3741 - cd external
38- - if [[ "$CI_LINUX" == true ]]; then
39- ./acados_install_linux.sh;
40- else
41- ./acados_install_mac.sh;
42- fi
42+ - sh : if [[ $CI_LINUX == true ]]; then ./acados_install_linux.sh; else ./acados_install_mac.sh; fi
4343 - cd ..
44-
44+
4545# to run your custom scripts instead of automatic tests
4646test_script :
47- - bioptim_folder=`pwd`
48- - if [[ "$CI_LINUX" == true ]]; then
49- black . -l120 --exclude "external/*" --check;
50- fi
47+ - sh : if [[ $CI_LINUX == true ]]; then black . -l120 --exclude "external/*" --check; fi
5148 - pytest -v --color=yes --cov-report term-missing --cov=bioptim tests
5249 - python setup.py install
53- - cd
50+ - sh : cd
51+ - cmd : cd C:/
5452 - python -c "import bioptim"
55- - cd $bioptim_folder
53+ - sh : cd $BIOPTIM_FOLDER
54+ - cmd : cd %BIOPTIM_FOLDER%
5655
5756
5857# ---------------------------------#
@@ -61,8 +60,5 @@ test_script:
6160
6261# on successful build
6362on_success :
64- - if [[ "$CI_LINUX" == true ]]; then
65- codecov;
66- fi
67-
63+ - sh : if [[ $CI_LINUX == true ]]; then codecov; fi
6864
0 commit comments