Skip to content

RayFed PyPi Nightly #545

RayFed PyPi Nightly

RayFed PyPi Nightly #545

Workflow file for this run

name: RayFed PyPi Nightly
on:
schedule:
- cron: '0 0 * * *'
# can manually trigger the workflow
workflow_dispatch:
jobs:
build-and-publish:
# do not run in forks
if: ${{ github.repository_owner == 'ray-project' }}
name: build wheel and upload
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: 3.10
- name: days since the commit date
run: |
:
timestamp=$(git log --no-walk --date=unix --format=%cd $GITHUB_SHA)
days=$(( ( $(date --utc +%s) - $timestamp ) / 86400 ))
if [ $days -eq 0 ]; then
echo COMMIT_TODAY=true >> $GITHUB_ENV
fi
- name: Build wheel
if: env.COMMIT_TODAY == 'true'
env:
RAYFED_BUILD_MODE: nightly
run: |
pip install pytest torch cloudpickle cryptography wheel
pip install ray==2.0.0
python3 setup.py bdist_wheel
- name: Upload
if: env.COMMIT_TODAY == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}