|
| 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 |
0 commit comments