Skip to content

Commit 565100c

Browse files
committed
Use Action for miniconda
1 parent eb8eed9 commit 565100c

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/conda.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ jobs:
1515
CXXFLAGS: "-Werror"
1616
steps:
1717
- uses: actions/checkout@v3
18+
- uses: conda-incubator/setup-miniconda@v2
19+
name: Setup conda
20+
with:
21+
auto-update-conda: true
22+
activate-environment: testing
23+
auto-activate-base: false
24+
channels: conda-forge,defaults
25+
channel-priority: true
1826
- name: install dependencies
1927
run: |
2028
.github/workflows/dependencies/conda.sh
@@ -24,15 +32,13 @@ jobs:
2432
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
2533
with:
2634
path: |
27-
~/.ccache
2835
~/.cache/ccache
29-
key: ccache-conda-linux-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
36+
key: ccache-conda-linux-${{ hashFiles('.github/workflows/conda.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
3037
restore-keys: |
31-
ccache-conda-linux-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
38+
ccache-conda-linux-${{ hashFiles('.github/workflows/conda.yml') }}-
3239
ccache-conda-linux-
3340
- name: build WarpX
3441
run: |
35-
source activate base
3642
cmake -S . -B build \
3743
-DCMAKE_VERBOSE_MAKEFILE=ON \
3844
-DWarpX_EB=ON \

.github/workflows/dependencies/conda.sh

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
set -eu -o pipefail
99

10-
conda init bash
11-
1210
conda update -y -n base conda
1311
conda install -y -n base conda-libmamba-solver
1412
conda config --set solver libmamba

0 commit comments

Comments
 (0)