-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
212 additions
and
0 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,38 @@ | ||
name: docs | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test-ubuntu: | ||
name: "docs on ${{ matrix.python-version }} on ${{ matrix.os }}" | ||
runs-on: "${{ matrix.os }}" | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt install -y pandoc | ||
python -m pip install --upgrade pip | ||
pip install . | ||
pip install -r docs/requirements.txt | ||
- name: Test doctests | ||
run: | | ||
cd docs | ||
make doctest | ||
- name: Test docs to HTML | ||
run: | | ||
cd docs | ||
make html |
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,25 @@ | ||
name: pypi | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.x" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
pip install twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python -m build | ||
python -m twine upload dist/* |
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,38 @@ | ||
name: default | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
PYTREECLASS_BACKEND: numpy | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install optree numpy | ||
python -m pip install typing-extensions | ||
python -m pip install pytest pytest-benchmark wheel coverage | ||
- name: Pytest Check | ||
run: | | ||
export PYTREECLASS_BACKEND=default | ||
python -m pip install . | ||
coverage run -m pytest tests | ||
- name: Codecov | ||
uses: codecov/[email protected] |
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,35 @@ | ||
name: jax backend | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install jaxlib jax | ||
python -m pip install typing-extensions | ||
python -m pip install pytest pytest-benchmark wheel coverage | ||
- name: Pytest Check | ||
run: | | ||
export PYTREECLASS_BACKEND=jax | ||
python -m pip install . | ||
coverage run -m pytest tests | ||
- name: Codecov | ||
uses: codecov/[email protected] |
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,38 @@ | ||
name: numpy backend | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
PYTREECLASS_BACKEND: numpy | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install optree numpy | ||
python -m pip install typing-extensions | ||
python -m pip install pytest pytest-benchmark wheel coverage | ||
- name: Pytest Check | ||
run: | | ||
export PYTREECLASS_BACKEND=numpy | ||
python -m pip install . | ||
coverage run -m pytest tests | ||
- name: Codecov | ||
uses: codecov/[email protected] |
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,38 @@ | ||
name: torch backend | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
PYTREECLASS_BACKEND: numpy | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install optree torch numpy | ||
python -m pip install typing-extensions | ||
python -m pip install pytest pytest-benchmark wheel coverage | ||
- name: Pytest Check | ||
run: | | ||
export PYTREECLASS_BACKEND=torch | ||
python -m pip install . | ||
coverage run -m pytest tests | ||
- name: Codecov | ||
uses: codecov/[email protected] |