Skip to content

Commit

Permalink
Use Action for miniconda
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed May 2, 2023
1 parent eb8eed9 commit 6d00c7f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ jobs:
CXXFLAGS: "-Werror"
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
name: Setup conda
with:
auto-update-conda: true
activate-environment: testing
auto-activate-base: false
channels: conda-forge,defaults
channel-priority: true
- name: install dependencies
run: |
.github/workflows/dependencies/conda.sh
Expand All @@ -24,24 +32,23 @@ jobs:
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
~/.ccache
~/.cache/ccache
key: ccache-conda-linux-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
key: ccache-conda-linux-${{ hashFiles('.github/workflows/conda.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
restore-keys: |
ccache-conda-linux-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
ccache-conda-linux-${{ hashFiles('.github/workflows/conda.yml') }}-
ccache-conda-linux-
- name: build WarpX
run: |
source activate base
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_DIMS=RZ \
-DWarpX_EB=ON \
-DWarpX_LIB=ON \
-DWarpX_QED=ON \
-DWarpX_openpmd_internal=OFF
cmake --build build -j 3
./build/bin/warpx Examples/Physics_applications/laser_acceleration/inputs_3d
./build/bin/warpx Examples/Physics_applications/laser_acceleration/inputs_rz
# TODO: Linux
# TODO: Windows
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/dependencies/conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@

set -eu -o pipefail

conda init bash

conda update -y -n base conda
conda install -y -n base conda-libmamba-solver
conda config --set solver libmamba

conda install -y -c conda-forge blaspp ccache cmake compilers git lapackpp "openpmd-api=*=mpi_mpich*" python mpi4py numpy pandas scipy yt "fftw=*=mpi_mpich*" pkg-config setuptools matplotlib mpich pip virtualenv wheel
conda install -y -n testing -c conda-forge blaspp ccache cmake compilers git lapackpp "openpmd-api=*=mpi_mpich*" python mpi4py numpy pandas scipy yt "fftw=*=mpi_mpich*" pkg-config setuptools matplotlib mpich pip virtualenv wheel

0 comments on commit 6d00c7f

Please sign in to comment.