forked from ray-project/rayfed
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nightly release workflow into Github actions (ray-project#103)
- Loading branch information
1 parent
633aac4
commit 2a90477
Showing
3 changed files
with
61 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
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.9 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.9 | ||
|
||
- 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 | ||
pip install ray==2.0.0 | ||
python 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 }} |
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
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