diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index bdbfae5..1806c76 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -16,7 +16,14 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Conda - run: ./ci/setup-conda.sh + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + - name: Install global deps + run: | + conda install conda-build conda-verify anaconda-client + conda info -a - name: Build Pytest-Mpl run: ./ci/build-package.sh pytest-mpl env: @@ -48,7 +55,14 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Conda - run: ./ci/setup-conda.sh + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + - name: Install global deps + run: | + conda install conda-build conda-verify anaconda-client + conda info -a - name: Make Env run: ./ci/make-env.sh env: diff --git a/ci/activate-conda.sh b/ci/activate-conda.sh deleted file mode 100755 index 478704e..0000000 --- a/ci/activate-conda.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -source "${CONDA}/etc/profile.d/conda.sh" -conda activate base - -function RQ() { - echo ">>>" "$@" - "$@" -} diff --git a/ci/build-package.sh b/ci/build-package.sh index 22e8559..f986f4a 100755 --- a/ci/build-package.sh +++ b/ci/build-package.sh @@ -1,10 +1,7 @@ #!/bin/bash set -e -cd "$(dirname "$0")" -source ./activate-conda.sh - -cd .. +cd "$(dirname "$0")"/.. PKG="$1" MF="./build/$1/meta.yaml" diff --git a/ci/make-env.sh b/ci/make-env.sh index cd5253f..a4a5a85 100755 --- a/ci/make-env.sh +++ b/ci/make-env.sh @@ -1,10 +1,7 @@ #!/bin/bash set -e -cd "$(dirname "$0")" -source ./activate-conda.sh - -cd .. +cd "$(dirname "$0")"/.. export MPLBACKEND=agg export OGGM_USE_MP_SPAWN=1 diff --git a/ci/setup-conda.sh b/ci/setup-conda.sh deleted file mode 100755 index bffdc6f..0000000 --- a/ci/setup-conda.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -e - -cd "$(dirname "$0")" -source ./activate-conda.sh - -if [[ "${RUNNER_OS}" != "Windows" ]]; then - RQ sudo chown -R "$(id -u):$(id -g)" "$CONDA" -fi - -RQ conda config --set always_yes yes --set changeps1 no -RQ conda update -q conda -RQ conda update -c conda-forge -q --all -RQ conda install -c conda-forge -q conda-build "conda-verify>=3" anaconda-client -RQ conda info -a \ No newline at end of file