-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
10 changed files
with
519 additions
and
2 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,87 @@ | ||
name: Continious Integration | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: [3.7, 3.8, 3.9] | ||
torch-version: [1.10.2, 1.11.0, 1.12.0] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Restore Ubuntu cache | ||
uses: actions/cache@v1 | ||
if: matrix.operating-system == 'ubuntu-latest' | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}- | ||
|
||
- name: Restore MacOS cache | ||
uses: actions/cache@v1 | ||
if: matrix.operating-system == 'macos-latest' | ||
with: | ||
path: ~/Library/Caches/pip | ||
key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}- | ||
|
||
- name: Restore Windows cache | ||
uses: actions/cache@v1 | ||
if: matrix.operating-system == 'windows-latest' | ||
with: | ||
path: ~\AppData\Local\pip\Cache | ||
key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}- | ||
|
||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Lint with flake8, black and isort | ||
run: | | ||
pip install -e .[dev] | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
black . --check --config pyproject.toml | ||
isort -c . | ||
# exit-zero treats all errors as warnings. Allowed max line length is 120. | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics | ||
- name: Install PyTorch on Linux and Windows | ||
if: > | ||
matrix.operating-system == 'ubuntu-latest' || | ||
matrix.operating-system == 'windows-latest' | ||
run: > | ||
pip install torch==${{ matrix.torch-version }}+cpu | ||
-f https://download.pytorch.org/whl/torch_stable.html | ||
- name: Install PyTorch on MacOS | ||
if: matrix.operating-system == 'macos-latest' | ||
run: pip install torch==${{ matrix.torch-version }} | ||
|
||
- name: Install video-transformers package from local setup.py | ||
run: > | ||
pip install -e . | ||
- name: Install test dependencies | ||
run: > | ||
pip install -e .[test] | ||
- name: Unittest video-transformers | ||
run: | | ||
python -m unittest |
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,73 @@ | ||
name: Package Testing | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Runs at 00:00 UTC every day | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: [3.7, 3.8, 3.9] | ||
torch-version: [1.10.2, 1.11.0, 1.12.0] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Restore Ubuntu cache | ||
uses: actions/cache@v1 | ||
if: matrix.operating-system == 'ubuntu-latest' | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}- | ||
|
||
- name: Restore MacOS cache | ||
uses: actions/cache@v1 | ||
if: matrix.operating-system == 'macos-latest' | ||
with: | ||
path: ~/Library/Caches/pip | ||
key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}- | ||
|
||
- name: Restore Windows cache | ||
uses: actions/cache@v1 | ||
if: matrix.operating-system == 'windows-latest' | ||
with: | ||
path: ~\AppData\Local\pip\Cache | ||
key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} | ||
restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}- | ||
|
||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install PyTorch on Linux and Windows | ||
if: > | ||
matrix.operating-system == 'ubuntu-latest' || | ||
matrix.operating-system == 'windows-latest' | ||
run: > | ||
pip install torch==${{ matrix.torch-version }}+cpu | ||
-f https://download.pytorch.org/whl/torch_stable.html | ||
- name: Install PyTorch on MacOS | ||
if: matrix.operating-system == 'macos-latest' | ||
run: pip install torch==${{ matrix.torch-version }} | ||
|
||
- name: Install latest video-transformers package | ||
run: > | ||
pip install --upgrade --force-reinstall video-transformers[test] | ||
- name: Unittest video-transformers | ||
run: | | ||
python -m unittest | ||
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,27 @@ | ||
name: Publish Python Package | ||
|
||
on: | ||
release: | ||
types: [published, edited] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload --verbose --skip-existing 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 |
---|---|---|
|
@@ -127,3 +127,8 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# extra | ||
.vscode | ||
.neptune | ||
runs/ |
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 @@ | ||
include requirements.txt |
Oops, something went wrong.