Skip to content

Commit

Permalink
Use official conda-action
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoRoth committed Aug 20, 2024
1 parent 75ae049 commit 73cd54b
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 31 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,24 @@ jobs:
packages:
name: Build Packages
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- 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
auto-activate-base: true
activate-environment: ""
channel-priority: strict
channels: conda-forge
- name: Install global deps
run: |
conda install conda-build anaconda-client
conda info -a
- name: Build Pytest-Mpl
run: ./ci/build-package.sh pytest-mpl
env:
Expand Down Expand Up @@ -44,11 +57,24 @@ jobs:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
continue-on-error: ${{ contains(matrix.os, 'windows') }}
defaults:
run:
shell: bash
steps:
- 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
auto-activate-base: true
activate-environment: ""
channel-priority: strict
channels: conda-forge
- name: Install global deps
run: |
conda install conda-build anaconda-client
conda info -a
- name: Make Env
run: ./ci/make-env.sh
env:
Expand Down
8 changes: 0 additions & 8 deletions ci/activate-conda.sh

This file was deleted.

10 changes: 7 additions & 3 deletions ci/build-package.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/bash
set -e

cd "$(dirname "$0")"
source ./activate-conda.sh
function RQ() {
echo ">>>" "$@"
"$@"
}

cd ..
cd "$(dirname "$0")"/..

PKG="$1"
MF="./build/$1/meta.yaml"
Expand Down Expand Up @@ -35,6 +37,8 @@ echo
echo "Done building"
echo

anaconda --version

for i in "$CONDA_BLD_PATH"/*/*.tar.bz2; do
echo
echo "Uploading $(basename $i)"
Expand Down
8 changes: 5 additions & 3 deletions ci/make-env.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/bash
set -e

cd "$(dirname "$0")"
source ./activate-conda.sh
function RQ() {
echo ">>>" "$@"
"$@"
}

cd ..
cd "$(dirname "$0")"/..

export MPLBACKEND=agg
export OGGM_USE_MP_SPAWN=1
Expand Down
15 changes: 0 additions & 15 deletions ci/setup-conda.sh

This file was deleted.

0 comments on commit 73cd54b

Please sign in to comment.