Nightly Cron #63
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
name: Nightly Cron | |
on: | |
schedule: | |
# 2:30 PST | |
- cron: '30 10 * * *' | |
workflow_dispatch: | |
jobs: | |
tests-and-coverage-nightly: | |
name: Test & Coverage | |
uses: ./.github/workflows/reusable_test_pip.yml | |
with: | |
use_latest_pytorch_gpytorch: true | |
secrets: inherit | |
package-test-deploy-pypi: | |
name: Package and test deployment to test.pypi.org | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # This is required for PyPI OIDC authentication. | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Fetch all history for all tags and branches | |
run: git fetch --prune --unshallow | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
env: | |
ALLOW_LATEST_GPYTORCH_LINOP: true | |
run: | | |
pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html | |
pip install git+https://github.com/cornellius-gp/linear_operator.git | |
pip install git+https://github.com/cornellius-gp/gpytorch.git | |
pip install .[test] | |
pip install --upgrade build setuptools setuptools_scm wheel | |
- name: Extract reduced version and save to env var | |
# strip the commit hash from the version to enable upload to pypi | |
# env var will persist for subsequent steps | |
run: | | |
no_local_version=$(python -m setuptools_scm | cut -d "+" -f 1) | |
echo "SETUPTOOLS_SCM_PRETEND_VERSION=${no_local_version}" >> $GITHUB_ENV | |
- name: Build packages (wheel and source distribution) | |
env: | |
ALLOW_LATEST_GPYTORCH_LINOP: true | |
run: | | |
python -m build --sdist --wheel | |
- name: Verify packages | |
env: | |
ALLOW_LATEST_GPYTORCH_LINOP: true | |
run: | | |
./scripts/build_and_verify_py_packages.sh | |
- name: Deploy to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
skip-existing: true | |
verbose: true | |
package-conda: | |
name: Test conda build | |
runs-on: 8-core-ubuntu | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniconda-version: "latest" | |
activate-environment: test | |
python-version: "3.10" | |
- name: Fetch all history for all tags and branches | |
run: git fetch --prune --unshallow | |
- name: Install dependencies | |
shell: bash -l {0} | |
env: | |
ALLOW_LATEST_GPYTORCH_LINOP: true | |
# Don't need most deps for conda build, but need them for testing | |
# We do need setuptools_scm though to properly parse the version | |
run: | | |
# avoid conda bug in >=23.10.0: https://github.com/conda/conda/issues/13412 | |
conda config --set solver classic | |
conda install -y scipy multipledispatch setuptools_scm conda-build conda-verify | |
conda config --set anaconda_upload no | |
conda install -y -c pytorch-nightly pytorch cpuonly | |
conda install -y -c conda-forge pyro-ppl>=1.8.4 | |
pip install git+https://github.com/cornellius-gp/linear_operator.git | |
pip install git+https://github.com/cornellius-gp/gpytorch.git | |
- name: Build and verify conda package | |
shell: bash -l {0} | |
run: | | |
./scripts/build_and_verify_conda_package.sh | |
publish-latest-website: | |
name: Publish latest website | |
needs: [tests-and-coverage-nightly, package-test-deploy-pypi, package-conda] | |
uses: ./.github/workflows/reusable_website.yml | |
with: | |
publish_versioned_website: false | |
secrets: inherit | |
run_tutorials: | |
name: Run tutorials without smoke test on latest PyTorch / GPyTorch / Ax | |
uses: ./.github/workflows/reusable_tutorials.yml | |
with: | |
smoke_test: false | |
use_stable_pytorch_gpytorch: false | |
use_stable_ax: false |