-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conda builds to our github actions workflow
This adds a conda build step to build our conda package to the github actions workflow. This also uploads the package to anaconda during release.
- Loading branch information
Showing
1 changed file
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
python-version: [3.7, 3.8, 3.9] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
|
@@ -62,11 +62,27 @@ jobs: | |
- name: Generate package for pypi | ||
run: | | ||
python setup.py sdist | ||
- name: Upload artifacts to github | ||
- name: Upload pypi artifacts to github | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Generate package for conda | ||
id: conda_build | ||
run: | | ||
conda update conda | ||
conda install conda-build pybind11 | ||
conda build --python ${{ matrix.python-version }} . -c defaults -c conda-forge -c numba -c rapidsai -c nvidia --output-folder ./conda_packages | ||
export CONDA_PACKAGE=$(conda build --python ${{ matrix.python-version }} . -c defaults -c conda-forge -c numba -c rapidsai -c nvidia --output-folder ./conda_packages --output) | ||
echo "conda_package : $CONDA_PACKAGE" | ||
echo "::set-output name=conda_package::$CONDA_PACKAGE" | ||
- name: Upload conda artifacts to github | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: conda | ||
path: ${{ steps.conda_build.outputs.conda_package }} | ||
|
||
# Build docs, treat warnings as errors | ||
- name: Building docs | ||
run: | | ||
|
@@ -99,10 +115,11 @@ jobs: | |
- uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Create GitHub Release | ||
uses: fnkr/[email protected] | ||
env: | ||
GHR_PATH: . | ||
GHR_PATH: ./dist | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/setup-python@v2 | ||
with: | ||
|
@@ -113,4 +130,21 @@ jobs: | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
pip install --upgrade wheel pip setuptools twine | ||
twine upload * | ||
twine upload dist/* | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: conda | ||
path: conda | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
- name: Install conda dependencies | ||
shell: bash -l {0} | ||
run: | | ||
conda install -y anaconda-client conda-build | ||
- name: Push to anaconda | ||
shell: bash -l {0} | ||
env: | ||
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | ||
run: | | ||
anaconda -t $ANACONDA_TOKEN upload -u nvidia conda/*.tar.bz2 |