-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix auto-publish tool, replace setup.py with pyproject.toml standard,…
… disable duplicate builds. PiperOrigin-RevId: 490342029
- Loading branch information
1 parent
3ed1730
commit 42a9dcc
Showing
5 changed files
with
54 additions
and
100 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 |
---|---|---|
|
@@ -3,43 +3,13 @@ name: Auto-publish | |
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
pytest-job: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# LINT.IfChange | ||
python-version: [3.7, 3.8, 3.9] | ||
# LINT.ThenChange(build.yml) | ||
|
||
timeout-minutes: 30 | ||
|
||
steps: | ||
- uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
# Install deps | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: pip --version | ||
- run: pip install -e .[all,dev] | ||
- run: pip freeze | ||
|
||
# Run tests | ||
- name: Run core tests | ||
run: pytest -vv -n auto | ||
|
||
publish-job: | ||
# Only try to publish if: | ||
# * Repo is self (prevents running from forks) | ||
# * Branch is `main` | ||
if: | | ||
github.repository == 'google/orbax' | ||
&& github.ref == 'refs/heads/main' | ||
needs: pytest-job # Only publish after tests are successful | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
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
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,47 @@ | ||
[build-system] | ||
requires = ["flit_core >=3.5,<4"] | ||
build-backend = "flit_core.buildapi" | ||
|
||
[project] | ||
name = 'orbax' | ||
description='Orbax' | ||
readme = 'README.md' | ||
license = {file = 'LICENSE'} | ||
requires-python = '>=3.7' | ||
authors = [{name = 'Orbax Authors', email='[email protected]'}] | ||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Programming Language :: Python', | ||
'Topic :: Scientific/Engineering :: Artificial Intelligence', | ||
] | ||
|
||
keywords = ['JAX machine learning'] | ||
|
||
dependencies = [ | ||
'absl-py', | ||
'cached_property', | ||
'importlib_resources', | ||
'etils', | ||
'flax', | ||
'importlib_resources', | ||
'jax', | ||
'jaxlib', | ||
'numpy', | ||
'pytest', | ||
'pyyaml', | ||
'tensorstore >= 0.1.20', | ||
] | ||
|
||
dynamic = ['version'] | ||
|
||
[project.urls] | ||
homepage = 'http://github.com/google/orbax' | ||
repository = 'http://github.com/google/orbax' | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
'pytest-xdist' | ||
] |