-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathscikit-ci.yml
69 lines (55 loc) · 2.24 KB
/
scikit-ci.yml
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
60
61
62
63
64
65
66
67
68
69
schema_version: "0.5.0"
before_install:
environment:
RUN_ENV: anyci/run.sh
circle:
commands:
- |
sudo apt-get update -y
sudo apt-get install -y rsync
install:
commands:
- python -m ci_addons $<CI_NAME>/install_cmake 3.22.2
- $<RUN_ENV> python -m pip install --disable-pip-version-check --upgrade pip
- $<RUN_ENV> pip install -r requirements.txt
- $<RUN_ENV> pip install -r requirements-dev.txt
before_build:
commands:
- flake8
build:
commands:
- $<RUN_ENV> python setup.py build
test:
commands:
- $<RUN_ENV> python setup.py test
# Check CMake version
- python _tests/cmake_check_version.py 3.22.2
# Check python interpreter found using $<RUN_ENV> wrapper script
# is the expected one
- $<RUN_ENV> python --version
- $<RUN_ENV> python _tests/python_check_version.py
- $<RUN_ENV> python _tests/python_check_arch.py
# The following test is similar to 'python_check_version.py' and is used
# to confirm execution of python code using "python:" syntax.
- python: |
import os
import sys
from pprint import pprint as pp
pp(os.environ['PATH'].split(os.path.pathsep))
current_version = list(sys.version_info[:3])
print("current: %s" % str(current_version))
expected_version = list(
map(int, os.environ["EXPECTED_PYTHON_VERSION"].split(".")))
print("expected: %s" % str(expected_version))
assert current_version == expected_version
after_test:
commands:
- codecov -X gcov --required --file ./_tests/coverage.xml
# XXX Remove pre-release tag to ensure generated packages have expected names
# We could teach python-versioneer to ignore "latest" tag
- git tag --delete latest | echo ""
# Generate packages
- $<RUN_ENV> python setup.py sdist bdist_wheel
# Install scikit-ci-addons and check that prerelease uploads succeed
- python -m pip install .
- python -m ci_addons publish_github_release scikit-build/scikit-ci-addons --exit-success-if-missing-token --re-upload --prerelease-packages "dist/*" --prerelease-packages-clear-pattern "*" --prerelease-packages-keep-pattern "*<COMMIT_SHORT_SHA>*"