Repository navigation
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
59 lines (56 loc) · 2.03 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
59 lines (56 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
install:
stage: test
image: continuumio/miniconda3:latest
script:
- conda create -y -n idtrackerai_test python=3.12 pip pytorch torchvision -c pytorch
- source activate idtrackerai_test
- apt-get update
- apt-get install -y g++ ffmpeg libsm6 libxext6
- python -m pip install .
- python -m pip install pytest
- pytest tests/unit_test.py --junitxml=report.xml
artifacts:
expire_in: 1 week
checks:
stage: test
image: continuumio/miniconda3:latest
script:
- pip install pre-commit
- pre-commit run --all-files
artifacts:
expire_in: 1 week
pypi_release:
stage: deploy
image: continuumio/miniconda3:latest
rules:
- if: $CI_COMMIT_TAG =~ /^v?((([0-9]+)!)?([0-9]+(\.[0-9]+)*)([-_\.]?(alpha|a|beta|b|preview|pre|c|rc)[-_\.]?([0-9]+)?)?((-([0-9]+))|([-_\.]?(post|rev|r)[-_\.]?([0-9]+)?))?([-_\.]?(dev)[-_\.]?([0-9]+)?)?)(\+([a-z0-9]+([-_\.][a-z0-9]+)*))?$/ # only version tags
script:
- pip install -U twine build
- python -m build .
- python -m twine upload dist/*
artifacts:
expire_in: 1 week
gitlab_release:
stage: .post
image: registry.gitlab.com/gitlab-org/release-cli:latest
needs:
- job: pypi_release
rules:
- if: $CI_COMMIT_TAG =~ /^v?((([0-9]+)!)?([0-9]+(\.[0-9]+)*)([-_\.]?(alpha|a|beta|b|preview|pre|c|rc)[-_\.]?([0-9]+)?)?((-([0-9]+))|([-_\.]?(post|rev|r)[-_\.]?([0-9]+)?))?([-_\.]?(dev)[-_\.]?([0-9]+)?)?)(\+([a-z0-9]+([-_\.][a-z0-9]+)*))?$/ # only version tags
script:
- echo "running gitlab_release for version tag $CI_COMMIT_TAG, idtrackerai version $CI_COMMIT_TAG"
release:
tag_name: $CI_COMMIT_TAG
name: $CI_COMMIT_TAG
description: "Automated GitLab release from tag $CI_COMMIT_TAG"
assets:
links:
- name: "Documentation"
url: "https://idtracker.ai/"
- name: "PyPI"
url: "https://pypi.org/project/idtrackerai/$CI_COMMIT_TAG/"
link_type: "package"
- name: "Changelog"
url: "https://idtracker.ai/latest/user_guide/changelog.html"
artifacts:
expire_in: 1 week