@@ -43,25 +43,30 @@ jobs:
4343 with :
4444 fetch-depth : 0
4545
46- - name : Restore conda environment cache
47- id : conda-cache
48- uses : actions/cache@v4
49- with :
50- path : ${{ env.CONDA_INSTALL_DIR }}
51- key : conda-${{ runner.os }}-py${{ matrix.python }}-${{ hashFiles('environment-dev.yml') }}
52-
53- - name : Create Helios dev environment
46+ - name : Setup Miniconda
5447 uses : conda-incubator/setup-miniconda@v3
5548 with :
5649 installation-dir : ${{ env.CONDA_INSTALL_DIR }}
5750 auto-update-conda : true
5851 conda-remove-defaults : true
52+ channels : conda-forge
5953 auto-activate : false
6054 activate-environment : helios-dev
61- environment-file : environment-dev.yml
6255 python-version : ${{ matrix.python }}
6356 miniconda-version : " latest"
6457
58+ - name : Restore conda environment cache
59+ id : conda-cache
60+ uses : actions/cache@v4
61+ with :
62+ path : ${{ env.CONDA_INSTALL_DIR }}/envs/helios-dev
63+ key : conda-env-v2-${{ runner.os }}-py${{ matrix.python }}-${{ hashFiles('environment-dev.yml') }}
64+
65+ - name : Create Helios dev environment
66+ if : steps.conda-cache.outputs.cache-hit != 'true'
67+ run : |
68+ conda env update -n helios-dev -f environment-dev.yml --prune || conda env create -n helios-dev -f environment-dev.yml
69+
6570 - name : Install Conda GCC
6671 if : runner.os == 'Linux'
6772 run : |
@@ -110,25 +115,30 @@ jobs:
110115 with :
111116 fetch-depth : 0
112117
113- - name : Restore conda environment cache
114- id : conda-cache
115- uses : actions/cache@v4
116- with :
117- path : ${{ env.CONDA_INSTALL_DIR }}
118- key : conda-${{ runner.os }}-py3.10-${{ hashFiles('environment-dev.yml') }}
119-
120- - name : Create Helios dev environment
118+ - name : Setup Miniconda
121119 uses : conda-incubator/setup-miniconda@v3
122120 with :
123121 installation-dir : ${{ env.CONDA_INSTALL_DIR }}
124122 auto-update-conda : true
125123 conda-remove-defaults : true
124+ channels : conda-forge
126125 auto-activate : false
127126 activate-environment : helios-dev
128- environment-file : environment-dev.yml
129127 python-version : " 3.10"
130128 miniconda-version : " latest"
131129
130+ - name : Restore conda environment cache
131+ id : conda-cache
132+ uses : actions/cache@v4
133+ with :
134+ path : ${{ env.CONDA_INSTALL_DIR }}/envs/helios-dev
135+ key : conda-env-v2-${{ runner.os }}-py3.10-${{ hashFiles('environment-dev.yml') }}
136+
137+ - name : Create Helios dev environment
138+ if : steps.conda-cache.outputs.cache-hit != 'true'
139+ run : |
140+ conda env update -n helios-dev -f environment-dev.yml --prune || conda env create -n helios-dev -f environment-dev.yml
141+
132142 - name : Install Conda GCC
133143 run : |
134144 conda install -y -c conda-forge gcc gxx
0 commit comments