Skip to content

Commit

Permalink
Add nightly release (#813)
Browse files Browse the repository at this point in the history
* Add nightly release

* Update py version

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Add nightly release

* Fedlearner

* Add night release update

* Add night release update

* Add night release update
  • Loading branch information
duanbing authored Apr 30, 2021
1 parent 6936fb7 commit 2f3d74e
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 10 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# TODO add test pypi
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

on:
push:
branches:
- nightly
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04]

steps:
- uses: actions/checkout@master
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--wheel
--outdir dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: fedlearner
password: ${{ secrets.PYPI_SECRET }}

14 changes: 14 additions & 0 deletions .github/workflows/update-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
workflow_dispatch: # Allow manual triggers
schedule:
- cron: 0 2 * * * # 4am UTC is 10pm in Beijing
name: Set nightly branch to master HEAD
jobs:
master-to-nightly:
if: github.repository == 'bytedance/fedlearner' # Don't do this in forks
runs-on: ubuntu-latest
steps:
- uses: zofrex/mirror-branch@v1
name: Set nightly branch to master HEAD
with:
target-branch: 'nightly'
2 changes: 1 addition & 1 deletion docs/tutorials/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
First clone the latest code of this library from github:

```
git clone https://github.com/fedlearner/fedlearner.git --recursive
git clone https://github.com/bytedance/fedlearner.git --recursive
```

Then setup python environment to run the package. Make sure that you have Python 3.6, other versions may have dependency issues:
Expand Down
35 changes: 26 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
import os
import platform
from setuptools import setup, find_packages
import time

with open("README.md", "r") as fh:
long_description = fh.read()

with open('requirements.txt') as f:
required = f.read().splitlines()

def get_version():
base = "1.5"
day = time.strftime('%Y%m%d', time.localtime())
return '%s-dev%s'%(base, day)

setup(
name='fedlearner',
version='0.1',
version=get_version(),
packages=find_packages(),
include_package_data=True,
install_requires=[
'click'
],
entry_points='''
[console_scripts]
fedlearner=fedlearner.cli.cli:cli_group
''',
)
author='Fedlearner Contributors',
long_description=long_description,
long_description_content_type="text/markdown",
install_requires=required,
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux"
],
)

0 comments on commit 2f3d74e

Please sign in to comment.