From 6d00c7f1d4b6ab61d128394d87eec87c7412bdea Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Tue, 2 May 2023 12:49:51 -0700 Subject: [PATCH] Use Action for miniconda --- .github/workflows/conda.yml | 17 ++++++++++++----- .github/workflows/dependencies/conda.sh | 4 +--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml index 58de2097f91..51e45bd926e 100644 --- a/.github/workflows/conda.yml +++ b/.github/workflows/conda.yml @@ -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 @@ -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 diff --git a/.github/workflows/dependencies/conda.sh b/.github/workflows/dependencies/conda.sh index 2bf2615a203..9cef5b68049 100755 --- a/.github/workflows/dependencies/conda.sh +++ b/.github/workflows/dependencies/conda.sh @@ -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