Skip to content

Commit

Permalink
Add workflow / recipe to generate Dask nightlies (#8469)
Browse files Browse the repository at this point in the history
As part of addressing dask/community#76, this PR adds:

- A conda recipe in `continuous_integration` to build a nightly `dask-core` package
- A GHA workflow to build this nightly as a check for PRs, and upload this package to the Dask channel under the `dev` label for pushes to `main`
  • Loading branch information
charlesbluca committed Dec 20, 2021
1 parent 1f30a14 commit 7d1a02c
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Conda build
on:
push:
branches:
- main
pull_request:

# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: conda-${{ github.head_ref }}
cancel-in-progress: true

# Required shell entrypoint to have properly activated conda environments
defaults:
run:
shell: bash -l {0}

jobs:
conda:
name: Build (and upload)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
use-mamba: true
python-version: 3.8
- name: Install dependencies
run: |
mamba install boa conda-verify
which python
pip list
mamba list
- name: Build conda package
run: |
# suffix for nightly package versions
export VERSION_SUFFIX=a`date +%y%m%d`
conda mambabuild continuous_integration/recipe \
--no-anaconda-upload \
--output-folder .
- name: Upload conda package
if: |
github.event_name == 'push'
&& github.ref == 'refs/heads/main'
&& github.repository == 'dask/dask'
env:
ANACONDA_API_TOKEN: ${{ secrets.DASK_CONDA_TOKEN }}
run: |
# install anaconda for upload
mamba install anaconda-client
anaconda upload --label dev noarch/*.tar.bz2
47 changes: 47 additions & 0 deletions continuous_integration/recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0.dev') + environ.get('VERSION_SUFFIX', '') %}
{% set py_version=environ.get('CONDA_PY', 36) %}


package:
name: dask-core
version: {{ version }}

source:
git_url: ../..

build:
number: {{ GIT_DESCRIBE_NUMBER }}
noarch: python
string: py{{ py_version }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }}
script: {{ PYTHON }} -m pip install . -vv

requirements:
host:
- python >=3.7
- pip

run:
- python >=3.7
- cloudpickle >=1.1.1
- fsspec >=0.6.0
- packaging >=20.0
- partd >=0.3.10
- pyyaml
- toolz >=0.8.2

test:
imports:
- dask
commands:
- pip check
requires:
- pip

about:
home: https://github.com/dask/dask/
summary: Parallel PyData with Task Scheduling
license: BSD-3-Clause
license_file: LICENSE.txt
summary: Parallel Python with task scheduling
doc_url: https://dask.org/
dev_url: https://github.com/dask/dask

0 comments on commit 7d1a02c

Please sign in to comment.