Skip to content

Commit 96241c9

Browse files
authored
Build packages on GH Actions (#4735)
1 parent bc841f0 commit 96241c9

5 files changed

Lines changed: 108 additions & 176 deletions

File tree

.github/workflows/build.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: packages
2+
on:
3+
push:
4+
tags:
5+
- 'v[0-9]+.[0-9]+.[0-9]+'
6+
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
7+
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
8+
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
9+
10+
jobs:
11+
conda_build:
12+
name: Build Conda Packages
13+
runs-on: 'ubuntu-latest'
14+
defaults:
15+
run:
16+
shell: bash -l {0}
17+
env:
18+
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
19+
PKG_TEST_PYTHON: "--test-python=py37 --test-python=py27"
20+
PYTHON_VERSION: "3.7"
21+
CHANS: "-c pyviz"
22+
MPLBACKEND: "Agg"
23+
CONDA_UPLOAD_TOKEN: ${{ secrets.CONDA_UPLOAD_TOKEN }}
24+
steps:
25+
- uses: actions/checkout@v2
26+
with:
27+
fetch-depth: "100"
28+
- uses: actions/setup-python@v2
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
- uses: conda-incubator/setup-miniconda@v2
32+
with:
33+
miniconda-version: "latest"
34+
- name: Fetch unshallow
35+
run: git fetch --prune --tags --unshallow -f
36+
- name: conda setup
37+
run: |
38+
conda config --set always_yes True
39+
conda install -c pyviz "pyctdev>=0.5"
40+
doit ecosystem_setup
41+
- name: conda build
42+
run: doit package_build $CHANS_DEV $PKG_TEST_PYTHON --test-group=unit
43+
- name: conda dev upload
44+
if: (contains(github.ref, 'a') || contains(github.ref, 'b') || contains(github.ref, 'rc'))
45+
run: doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev
46+
- name: conda main upload
47+
if: startsWith(github.ref, 'ref/tags/') && !(contains(github.ref, 'a') || contains(github.ref, 'b') || contains(github.ref, 'rc'))
48+
run: doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --label=main
49+
pip_build:
50+
name: Build PyPI Packages
51+
runs-on: 'ubuntu-latest'
52+
defaults:
53+
run:
54+
shell: bash -l {0}
55+
env:
56+
CHANS_DEV: "-c pyviz/label/dev -c bokeh"
57+
PKG_TEST_PYTHON: "--test-python=py37 --test-python=py27"
58+
PYTHON_VERSION: "3.7"
59+
CHANS: "-c pyviz"
60+
MPLBACKEND: "Agg"
61+
PPU: ${{ secrets.PPU }}
62+
PPP: ${{ secrets.PPP }}
63+
PYPI: "https://upload.pypi.org/legacy/"
64+
steps:
65+
- uses: actions/checkout@v2
66+
with:
67+
fetch-depth: "100"
68+
- uses: actions/setup-python@v2
69+
with:
70+
python-version: ${{ matrix.python-version }}
71+
- uses: conda-incubator/setup-miniconda@v2
72+
with:
73+
miniconda-version: "latest"
74+
- name: Fetch unshallow
75+
run: git fetch --prune --tags --unshallow -f
76+
- name: conda setup
77+
run: |
78+
conda config --set always_yes True
79+
conda install -c pyviz "pyctdev>=0.5"
80+
doit ecosystem_setup
81+
doit env_create $CHANS_DEV --python=$PYTHON_VERSION
82+
- name: env setup
83+
run: |
84+
eval "$(conda shell.bash hook)"
85+
conda activate test-environment
86+
doit develop_install $CHANS_DEV -o unit_tests
87+
pip uninstall -y holoviews
88+
doit pip_on_conda
89+
- name: matplotlib patch
90+
run: |
91+
eval "$(conda shell.bash hook)"
92+
conda activate test-environment
93+
conda uninstall matplotlib matplotlib-base --force
94+
conda install matplotlib=3.0.3 --no-deps
95+
python -c "import matplotlib; print(matplotlib.__version__);"
96+
- name: pip build
97+
run: |
98+
eval "$(conda shell.bash hook)"
99+
conda activate test-environment
100+
doit ecosystem=pip package_build
101+
- name: pip upload
102+
run: |
103+
eval "$(conda shell.bash hook)"
104+
conda activate test-environment
105+
doit ecosystem=pip package_upload -u $PPU -p $PPP -r $PYPI

.github/workflows/docs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ jobs:
4242
with:
4343
miniconda-version: "latest"
4444
- name: Fetch unshallow
45-
if: (!startsWith(github.ref, 'ref/tags/'))
46-
run: git fetch --prune --tags --unshallow
45+
run: git fetch --prune --tags --unshallow -f
4746
- name: conda setup
4847
run: |
4948
conda config --set always_yes True

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
python-version: 2.7
2222
- os: macos-latest
2323
python-version: 3.7
24-
timeout-minutes: 30
24+
timeout-minutes: 60
2525
defaults:
2626
run:
2727
shell: bash -l {0}

.travis.yml

Lines changed: 0 additions & 173 deletions
This file was deleted.

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ commands = examples-pkg: {[_pkg]commands}
4646
unit: {[_unit]commands}
4747
flakes: {[_flakes]commands}
4848
regression: {[_regression]commands}
49+
examples: {[_examples]commands}
4950
all_recommended: {[_all_recommended]commands}
5051

5152
deps = unit: {[_unit]deps}

0 commit comments

Comments
 (0)