mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 13:34:23 +08:00
Create ci.yaml (#10)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
4aa74bb726
commit
088bd5b462
66
.github/workflows/ci.yaml
vendored
Normal file
66
.github/workflows/ci.yaml
vendored
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
# Ultralytics Continuous Integration (CI) GitHub Actions tests
|
||||||
|
|
||||||
|
name: Ultralytics CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
# schedule:
|
||||||
|
# - cron: '0 0 * * *' # runs at 00:00 UTC every day
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Tests:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ ubuntu-latest ]
|
||||||
|
python-version: [ 3.9 ]
|
||||||
|
timeout-minutes: 60
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python-version }}
|
||||||
|
- name: Get cache dir
|
||||||
|
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
|
||||||
|
id: pip-cache
|
||||||
|
run: echo "::set-output name=dir::$(pip cache dir)"
|
||||||
|
- name: Cache pip
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.pip-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}
|
||||||
|
restore-keys: ${{ runner.os }}-${{ matrix.python-version }}-pip-
|
||||||
|
- name: Install requirements
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip wheel
|
||||||
|
pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu
|
||||||
|
# pip install ultralytics (production)
|
||||||
|
# python setup.py install (deprecated)
|
||||||
|
python -m pip install .
|
||||||
|
- name: Check environment
|
||||||
|
run: |
|
||||||
|
echo "RUNNER_OS is ${{ runner.os }}"
|
||||||
|
echo "GITHUB_EVENT_NAME is ${{ github.event_name }}"
|
||||||
|
echo "GITHUB_WORKFLOW is ${{ github.workflow }}"
|
||||||
|
echo "GITHUB_ACTOR is ${{ github.actor }}"
|
||||||
|
echo "GITHUB_REPOSITORY is ${{ github.repository }}"
|
||||||
|
echo "GITHUB_REPOSITORY_OWNER is ${{ github.repository_owner }}"
|
||||||
|
python --version
|
||||||
|
pip --version
|
||||||
|
pip list
|
||||||
|
- name: Test HUB training
|
||||||
|
shell: python
|
||||||
|
env:
|
||||||
|
APIKEY: ${{ secrets.ULTRALYTICS_HUB_APIKEY }}
|
||||||
|
run: |
|
||||||
|
import os
|
||||||
|
import ultralytics
|
||||||
|
key = os.environ['APIKEY']
|
||||||
|
print(ultralytics.__version__)
|
||||||
|
# ultralytics.checks()
|
||||||
|
# ultralytics.reset_model(key) # reset trained model
|
||||||
|
# ultralytics.start(key) # train model
|
5
setup.py
5
setup.py
@ -2,7 +2,7 @@ import re
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import pkg_resources as pkg
|
import pkg_resources as pkg
|
||||||
from setuptools import find_packages, setup
|
from setuptools import setup
|
||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
FILE = Path(__file__).resolve()
|
FILE = Path(__file__).resolve()
|
||||||
@ -29,8 +29,7 @@ setup(
|
|||||||
'Source': 'https://github.com/ultralytics/ultralytics',},
|
'Source': 'https://github.com/ultralytics/ultralytics',},
|
||||||
author="Ultralytics",
|
author="Ultralytics",
|
||||||
author_email='hello@ultralytics.com',
|
author_email='hello@ultralytics.com',
|
||||||
# package_dir={'': 'ultralytics'}, # Optional, use if source code is in a subdirectory under the project root, i.e. `src/`
|
packages=['ultralytics'], # required
|
||||||
packages=find_packages('ultralytics'), # required
|
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=REQUIREMENTS,
|
install_requires=REQUIREMENTS,
|
||||||
extras_require={
|
extras_require={
|
||||||
|
Loading…
x
Reference in New Issue
Block a user