-
-
Notifications
You must be signed in to change notification settings - Fork 518
148 lines (147 loc) · 4.97 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: packages
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
# Dry-run only
workflow_dispatch:
schedule:
- cron: '0 19 * * SUN'
jobs:
conda_build:
name: Build Conda Packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -l {0}
env:
CHANS_DEV: "-c pyviz/label/dev -c bokeh/label/dev -c conda-forge"
PKG_TEST_PYTHON: "--test-python=py39"
PYTHON_VERSION: "3.9"
MPLBACKEND: "Agg"
steps:
- name: remove nodejs
run: |
sudo rm /usr/local/bin/node
sudo rm /usr/local/bin/npm
- uses: actions/checkout@v3
with:
fetch-depth: "100"
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
python-version: 3.9
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: conda setup
run: |
conda config --set always_yes True
conda install "pip<21.2.1"
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
# See: https://github.com/holoviz/panel/pull/4979
conda install -c conda-forge "urllib3<2.0.0" "conda-build==3.24"
- name: build pyodide wheels for CDN
run: |
python ./scripts/build_pyodide_wheels.py
- name: conda build
run: doit package_build $CHANS_DEV $PKG_TEST_PYTHON --test-group=unit_deploy
- name: npm setup
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_API_TOKEN }}" > $HOME/.npmrc
npm whoami
npm -v
- name: conda dev deploy
if: (github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: |
doit package_upload --token=${{ secrets.CONDA_UPLOAD_TOKEN }} --label=dev
python setup.py develop
cd ./panel
npm publish --tag dev
- name: conda main deploy
if: (github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: |
doit package_upload --token=${{ secrets.CONDA_UPLOAD_TOKEN }} --label=dev --label=main
python setup.py develop
cd ./panel
npm publish --tag latest
cd ..
- name: Deploy to cdn.holoviz.org
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
run: python scripts/cdn_upload.py
pip_build:
name: Build PyPI Packages
runs-on: 'ubuntu-latest'
defaults:
run:
shell: bash -l {0}
env:
CHANS_DEV: "-c pyviz/label/dev -c bokeh/label/dev -c conda-forge"
PKG_TEST_PYTHON: "--test-python=py39"
PYTHON_VERSION: "3.9"
CHANS: "-c pyviz"
MPLBACKEND: "Agg"
PYPI: "https://upload.pypi.org/legacy/"
steps:
- name: remove nodejs
run: |
sudo rm /usr/local/bin/node
sudo rm /usr/local/bin/npm
- uses: actions/checkout@v3
with:
fetch-depth: "100"
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
- uses: actions/setup-node@v2
with:
node-version: '15'
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- name: conda setup
run: |
conda config --set always_yes True
conda install -c pyviz "pyctdev>=0.5"
doit ecosystem_setup
doit env_create $CHANS_DEV --python=$PYTHON_VERSION
- name: env setup
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
conda install ${{ env.CHANS_DEV }} "pip<21.2.1"
doit develop_install $CHANS_DEV -o build
pip uninstall -y panel
doit pip_on_conda
- name: pip build
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit ecosystem=pip package_build $PKG_TEST_PYTHON --test-group=flakes
- name: git status
run: |
git status
git diff
- name: pip upload
if: github.event_name == 'push'
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
doit ecosystem=pip package_upload -u ${{ secrets.PPU }} -p ${{ secrets.PPP }} -r $PYPI