mite 2.0.0__tar.gz → 2.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. {mite-2.0.0 → mite-2.0.2}/.pre-commit-config.yaml +1 -1
  2. {mite-2.0.0/mite.egg-info → mite-2.0.2}/PKG-INFO +1 -1
  3. {mite-2.0.0 → mite-2.0.2}/cd-scripts/cdRelease.py +3 -5
  4. mite-2.0.2/cd-scripts/cdTagRelease.sh +73 -0
  5. mite-2.0.2/cd-scripts/runTests.sh +31 -0
  6. {mite-2.0.0 → mite-2.0.2}/cd.yml +13 -2
  7. {mite-2.0.0 → mite-2.0.2}/dev-requirements.txt +1 -1
  8. {mite-2.0.0 → mite-2.0.2/mite.egg-info}/PKG-INFO +1 -1
  9. {mite-2.0.0 → mite-2.0.2}/mite.egg-info/SOURCES.txt +2 -1
  10. {mite-2.0.0 → mite-2.0.2}/test-requirements.txt +2 -1
  11. {mite-2.0.0 → mite-2.0.2}/tox.ini +1 -1
  12. mite-2.0.0/.circleci/config.yml +0 -184
  13. {mite-2.0.0 → mite-2.0.2}/.dockerignore +0 -0
  14. {mite-2.0.0 → mite-2.0.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  15. {mite-2.0.0 → mite-2.0.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  16. {mite-2.0.0 → mite-2.0.2}/.github/pull_request_template.md +0 -0
  17. {mite-2.0.0 → mite-2.0.2}/.gitignore +0 -0
  18. {mite-2.0.0 → mite-2.0.2}/.isort.cfg +0 -0
  19. {mite-2.0.0 → mite-2.0.2}/.travis.yml +0 -0
  20. {mite-2.0.0 → mite-2.0.2}/CODE_OF_CONDUCT.md +0 -0
  21. {mite-2.0.0 → mite-2.0.2}/CONTRIBUTING.md +0 -0
  22. {mite-2.0.0 → mite-2.0.2}/DEV.md +0 -0
  23. {mite-2.0.0 → mite-2.0.2}/Dockerfile +0 -0
  24. {mite-2.0.0 → mite-2.0.2}/Dockerfile.perftest +0 -0
  25. {mite-2.0.0 → mite-2.0.2}/LICENSE +0 -0
  26. {mite-2.0.0 → mite-2.0.2}/MANIFEST.in +0 -0
  27. {mite-2.0.0 → mite-2.0.2}/README.md +0 -0
  28. {mite-2.0.0 → mite-2.0.2}/cd-scripts/cdBuild-1.sh +0 -0
  29. {mite-2.0.0 → mite-2.0.2}/docker_compose.yml +0 -0
  30. {mite-2.0.0 → mite-2.0.2}/docker_compose_monitoring.yml +0 -0
  31. {mite-2.0.0 → mite-2.0.2}/docs/Makefile +0 -0
  32. {mite-2.0.0 → mite-2.0.2}/docs/components.rst +0 -0
  33. {mite-2.0.0 → mite-2.0.2}/docs/conf.py +0 -0
  34. {mite-2.0.0 → mite-2.0.2}/docs/config.rst +0 -0
  35. {mite-2.0.0 → mite-2.0.2}/docs/design-deployment.rst +0 -0
  36. {mite-2.0.0 → mite-2.0.2}/docs/index.rst +0 -0
  37. {mite-2.0.0 → mite-2.0.2}/docs/journeys.rst +0 -0
  38. {mite-2.0.0 → mite-2.0.2}/docs/notes.txt +0 -0
  39. {mite-2.0.0 → mite-2.0.2}/docs/prometheus.rst +0 -0
  40. {mite-2.0.0 → mite-2.0.2}/docs/stats.rst +0 -0
  41. {mite-2.0.0 → mite-2.0.2}/docs/volume-model.rst +0 -0
  42. {mite-2.0.0 → mite-2.0.2}/grafana/Dockerfile +0 -0
  43. {mite-2.0.0 → mite-2.0.2}/grafana/config.ini +0 -0
  44. {mite-2.0.0 → mite-2.0.2}/grafana/provisioning/dashboards/dashboards.yml +0 -0
  45. {mite-2.0.0 → mite-2.0.2}/grafana/provisioning/dashboards/grafana_dashboard_template.json +0 -0
  46. {mite-2.0.0 → mite-2.0.2}/grafana/provisioning/dashboards/mite_docker.json +0 -0
  47. {mite-2.0.0 → mite-2.0.2}/grafana/provisioning/datasources/datasources.yml +0 -0
  48. {mite-2.0.0 → mite-2.0.2}/local/Makefile +0 -0
  49. {mite-2.0.0 → mite-2.0.2}/local/README.md +0 -0
  50. {mite-2.0.0 → mite-2.0.2}/local/demo.py +0 -0
  51. {mite-2.0.0 → mite-2.0.2}/local/run_mite.sh +0 -0
  52. {mite-2.0.0 → mite-2.0.2}/mite/__init__.py +0 -0
  53. {mite-2.0.0 → mite-2.0.2}/mite/__main__.py +0 -0
  54. {mite-2.0.0 → mite-2.0.2}/mite/cli/__init__.py +0 -0
  55. {mite-2.0.0 → mite-2.0.2}/mite/cli/cat.py +0 -0
  56. {mite-2.0.0 → mite-2.0.2}/mite/cli/collector.py +0 -0
  57. {mite-2.0.0 → mite-2.0.2}/mite/cli/common.py +0 -0
  58. {mite-2.0.0 → mite-2.0.2}/mite/cli/duplicator.py +0 -0
  59. {mite-2.0.0 → mite-2.0.2}/mite/cli/receiver.py +0 -0
  60. {mite-2.0.0 → mite-2.0.2}/mite/cli/stats.py +0 -0
  61. {mite-2.0.0 → mite-2.0.2}/mite/cli/test.py +0 -0
  62. {mite-2.0.0 → mite-2.0.2}/mite/collector.py +0 -0
  63. {mite-2.0.0 → mite-2.0.2}/mite/config.py +0 -0
  64. {mite-2.0.0 → mite-2.0.2}/mite/context.py +0 -0
  65. {mite-2.0.0 → mite-2.0.2}/mite/controller.py +0 -0
  66. {mite-2.0.0 → mite-2.0.2}/mite/datapools.py +0 -0
  67. {mite-2.0.0 → mite-2.0.2}/mite/example.py +0 -0
  68. {mite-2.0.0 → mite-2.0.2}/mite/exceptions.py +0 -0
  69. {mite-2.0.0 → mite-2.0.2}/mite/har_to_mite.py +0 -0
  70. {mite-2.0.0 → mite-2.0.2}/mite/logoutput.py +0 -0
  71. {mite-2.0.0 → mite-2.0.2}/mite/nanomsg.py +0 -0
  72. {mite-2.0.0 → mite-2.0.2}/mite/recorder.py +0 -0
  73. {mite-2.0.0 → mite-2.0.2}/mite/runner.py +0 -0
  74. {mite-2.0.0 → mite-2.0.2}/mite/scenario.py +0 -0
  75. {mite-2.0.0 → mite-2.0.2}/mite/stats.py +0 -0
  76. {mite-2.0.0 → mite-2.0.2}/mite/test.py +0 -0
  77. {mite-2.0.0 → mite-2.0.2}/mite/utils.py +0 -0
  78. {mite-2.0.0 → mite-2.0.2}/mite/volume_model.py +0 -0
  79. {mite-2.0.0 → mite-2.0.2}/mite/web/__init__.py +0 -0
  80. {mite-2.0.0 → mite-2.0.2}/mite/web/prometheus.py +0 -0
  81. {mite-2.0.0 → mite-2.0.2}/mite/zmq.py +0 -0
  82. {mite-2.0.0 → mite-2.0.2}/mite.egg-info/dependency_links.txt +0 -0
  83. {mite-2.0.0 → mite-2.0.2}/mite.egg-info/entry_points.txt +0 -0
  84. {mite-2.0.0 → mite-2.0.2}/mite.egg-info/requires.txt +0 -0
  85. {mite-2.0.0 → mite-2.0.2}/mite.egg-info/top_level.txt +0 -0
  86. {mite-2.0.0 → mite-2.0.2}/mite_amqp/__init__.py +0 -0
  87. {mite-2.0.0 → mite-2.0.2}/mite_browser/__init__.py +0 -0
  88. {mite-2.0.0 → mite-2.0.2}/mite_finagle/README.md +0 -0
  89. {mite-2.0.0 → mite-2.0.2}/mite_finagle/__init__.py +0 -0
  90. {mite-2.0.0 → mite-2.0.2}/mite_finagle/mux.py +0 -0
  91. {mite-2.0.0 → mite-2.0.2}/mite_finagle/stats.py +0 -0
  92. {mite-2.0.0 → mite-2.0.2}/mite_finagle/tests/__init__.py +0 -0
  93. {mite-2.0.0 → mite-2.0.2}/mite_finagle/tests/conftest.py +0 -0
  94. {mite-2.0.0 → mite-2.0.2}/mite_finagle/tests/foo_service/Foo-remote +0 -0
  95. {mite-2.0.0 → mite-2.0.2}/mite_finagle/tests/foo_service/Foo.py +0 -0
  96. {mite-2.0.0 → mite-2.0.2}/mite_finagle/tests/foo_service/__init__.py +0 -0
  97. {mite-2.0.0 → mite-2.0.2}/mite_finagle/tests/foo_service/constants.py +0 -0
  98. {mite-2.0.0 → mite-2.0.2}/mite_finagle/tests/foo_service/ttypes.py +0 -0
  99. {mite-2.0.0 → mite-2.0.2}/mite_finagle/tests/foo_service.thrift +0 -0
  100. {mite-2.0.0 → mite-2.0.2}/mite_finagle/tests/test_integration.py +0 -0
  101. {mite-2.0.0 → mite-2.0.2}/mite_finagle/tests/test_mux.py +0 -0
  102. {mite-2.0.0 → mite-2.0.2}/mite_finagle/tests/test_thrift.py +0 -0
  103. {mite-2.0.0 → mite-2.0.2}/mite_finagle/thrift.py +0 -0
  104. {mite-2.0.0 → mite-2.0.2}/mite_http/__init__.py +0 -0
  105. {mite-2.0.0 → mite-2.0.2}/mite_http/stats.py +0 -0
  106. {mite-2.0.0 → mite-2.0.2}/mite_kafka/__init__.py +0 -0
  107. {mite-2.0.0 → mite-2.0.2}/mite_kafka/kafka_test_scenario.py +0 -0
  108. {mite-2.0.0 → mite-2.0.2}/mite_kafka/stats.py +0 -0
  109. {mite-2.0.0 → mite-2.0.2}/mite_selenium/__init__.py +0 -0
  110. {mite-2.0.0 → mite-2.0.2}/mite_selenium/stats.py +0 -0
  111. {mite-2.0.0 → mite-2.0.2}/mite_websocket/__init__.py +0 -0
  112. {mite-2.0.0 → mite-2.0.2}/prometheus/Dockerfile +0 -0
  113. {mite-2.0.0 → mite-2.0.2}/prometheus/prometheus_config_docker.yml +0 -0
  114. {mite-2.0.0 → mite-2.0.2}/prometheus/prometheus_config_template.yml +0 -0
  115. {mite-2.0.0 → mite-2.0.2}/pyproject.toml +0 -0
  116. {mite-2.0.0 → mite-2.0.2}/requirements.txt +0 -0
  117. {mite-2.0.0 → mite-2.0.2}/setup.cfg +0 -0
  118. {mite-2.0.0 → mite-2.0.2}/setup.py +0 -0
  119. {mite-2.0.0 → mite-2.0.2}/test/legacy.py +0 -0
  120. {mite-2.0.0 → mite-2.0.2}/test/mocks/mock_collector.py +0 -0
  121. {mite-2.0.0 → mite-2.0.2}/test/mocks/mock_context.py +0 -0
  122. {mite-2.0.0 → mite-2.0.2}/test/mocks/mock_direct_receiver.py +0 -0
  123. {mite-2.0.0 → mite-2.0.2}/test/mocks/mock_direct_runner_transport.py +0 -0
  124. {mite-2.0.0 → mite-2.0.2}/test/mocks/mock_recorder_msg_http.py +0 -0
  125. {mite-2.0.0 → mite-2.0.2}/test/mocks/mock_selenium.py +0 -0
  126. {mite-2.0.0 → mite-2.0.2}/test/mocks/mock_sender.py +0 -0
  127. {mite-2.0.0 → mite-2.0.2}/test/perf/.gitignore +0 -0
  128. {mite-2.0.0 → mite-2.0.2}/test/perf/http_server.py +0 -0
  129. {mite-2.0.0 → mite-2.0.2}/test/perf/http_server_aiohttp.py +0 -0
  130. {mite-2.0.0 → mite-2.0.2}/test/perf/mite_perftest.py +0 -0
  131. {mite-2.0.0 → mite-2.0.2}/test/perf/perftest.py +0 -0
  132. {mite-2.0.0 → mite-2.0.2}/test/perf/run-perftest.sh +0 -0
  133. {mite-2.0.0 → mite-2.0.2}/test/perf/test-requirements.txt +0 -0
  134. {mite-2.0.0 → mite-2.0.2}/test/test.har +0 -0
  135. {mite-2.0.0 → mite-2.0.2}/test/test_collector.py +0 -0
  136. {mite-2.0.0 → mite-2.0.2}/test/test_config.py +0 -0
  137. {mite-2.0.0 → mite-2.0.2}/test/test_context.py +0 -0
  138. {mite-2.0.0 → mite-2.0.2}/test/test_controller.py +0 -0
  139. {mite-2.0.0 → mite-2.0.2}/test/test_datapools.py +0 -0
  140. {mite-2.0.0 → mite-2.0.2}/test/test_har_to_mite.py +0 -0
  141. {mite-2.0.0 → mite-2.0.2}/test/test_logging.py +0 -0
  142. {mite-2.0.0 → mite-2.0.2}/test/test_mite_amqp.py +0 -0
  143. {mite-2.0.0 → mite-2.0.2}/test/test_mite_browser.py +0 -0
  144. {mite-2.0.0 → mite-2.0.2}/test/test_mite_http.py +0 -0
  145. {mite-2.0.0 → mite-2.0.2}/test/test_mite_kafka.py +0 -0
  146. {mite-2.0.0 → mite-2.0.2}/test/test_mite_utils.py +0 -0
  147. {mite-2.0.0 → mite-2.0.2}/test/test_mite_websockets.py +0 -0
  148. {mite-2.0.0 → mite-2.0.2}/test/test_prometheus_mite.py +0 -0
  149. {mite-2.0.0 → mite-2.0.2}/test/test_recorder.py +0 -0
  150. {mite-2.0.0 → mite-2.0.2}/test/test_runner.py +0 -0
  151. {mite-2.0.0 → mite-2.0.2}/test/test_runner_tracker.py +0 -0
  152. {mite-2.0.0 → mite-2.0.2}/test/test_scenario.py +0 -0
  153. {mite-2.0.0 → mite-2.0.2}/test/test_stats.py +0 -0
  154. {mite-2.0.0 → mite-2.0.2}/test/test_volume_model.py +0 -0
  155. {mite-2.0.0 → mite-2.0.2}/test/test_webdriver.py +0 -0
  156. {mite-2.0.0 → mite-2.0.2}/test/test_work_tracker.py +0 -0
  157. {mite-2.0.0 → mite-2.0.2}/test.har +0 -0
@@ -1,6 +1,6 @@
1
1
  repos:
2
2
  - repo: https://github.com/timothycrosley/isort
3
- rev: 5.10.1
3
+ rev: 5.12.0
4
4
  hooks:
5
5
  - id: isort
6
6
  files: .*.py$
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mite
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: A Python Performance Testing Framework
5
5
  Home-page: https://github.com/sky-uk/mite/
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -128,19 +128,17 @@ def main():
128
128
  else:
129
129
  commit_message = repo.git.log("--format=%B", n=1)
130
130
  matches = re.findall(r"^.*\(#(\d+)\)$", commit_message, re.MULTILINE)
131
- version_parts_to_increment = parse_pr(matches[0])
131
+ version_parts_to_increment = parse_pr(matches[0]) if len(matches) else None
132
132
 
133
133
  if not version_parts_to_increment:
134
134
  logger.info("No release")
135
- with open("/tmp/workspace/env_vars", "a") as f:
136
- f.write("export VERSION_INCREMENT=false")
137
- sys.exit(0)
135
+ sys.exit(1)
136
+
138
137
  new_tag = increment_version_from_pr(
139
138
  current_latest_version, version_parts_to_increment
140
139
  )
141
140
 
142
141
  create_and_push_tag(repo, new_tag)
143
-
144
142
  sys.exit(0)
145
143
 
146
144
 
@@ -0,0 +1,73 @@
1
+ #!/bin/bash
2
+
3
+ function tagBuild() {
4
+ git config user.email "mite@noreply.github.com"
5
+ git config user.name "Jenkins-CI"
6
+ pip3 install docopt GitPython packaging requests
7
+ python3 cd-scripts/cdRelease.py
8
+ if (( $? == 1)); then
9
+ VERSION_INCREMENT=false
10
+ fi
11
+ }
12
+
13
+ function checkAcurl() {
14
+ ACURL_CHANGED=false
15
+
16
+ if [[ -n $(git show --name-only ${CD_VCS_REF} ./acurl) ]]; then
17
+ echo "Acurl has changed"
18
+ ACURL_CHANGED=true
19
+ LATEST_ACURL_VERSION=$(curl -s https://pypi.org/pypi/acurl/json | jq -r '.info .version')
20
+ if [[ -n $(grep "version = $LATEST_ACURL_VERSION$" acurl/setup.cfg) ]]; then
21
+ echo "Acurl has changed, but the version of acurl hasn't changed"
22
+ exit 1
23
+ fi
24
+ fi
25
+ }
26
+
27
+ function buildLinuxWheels() {
28
+
29
+ CIBW_BEFORE_ALL_LINUX="yum install -y libcurl-devel || apt-get install -y libcurl-dev || apk add curl-dev"
30
+ CIBW_SKIP="*i686"
31
+
32
+ if [ "$VERSION_INCREMENT" = false ]; then
33
+ echo "Mite version not incremented, not building"
34
+ else
35
+ echo "##### Building Mite #####"
36
+ pip3 install --user cibuildwheel==2.8.1 build twine
37
+ python3 -m build --outdir ./wheelhouse
38
+ fi
39
+ if [ "$ACURL_CHANGED" = true ]; then
40
+ echo "##### Building Acurl #####"
41
+ cd acurl
42
+ pip3 install --user cibuildwheel==2.8.1 build Cython twine
43
+ python3 -m build --sdist --outdir ../wheelhouse
44
+ cd ../
45
+ fi
46
+ }
47
+
48
+ function initPypirc() {
49
+ echo -e "[pypi]" > ~/.pypirc
50
+ echo -e "username = __token__" >> ~/.pypirc
51
+ echo -e "password = $PYPI_TOKEN" >> ~/.pypirc
52
+ }
53
+
54
+ ###### MAIN SECTION ######
55
+
56
+ echo "##### Starting tag process and check for version increment #####"
57
+ tagBuild
58
+
59
+ echo "##### Look for Acurl changes #####"
60
+ checkAcurl
61
+
62
+ echo "##### Build Linux-Wheels #####"
63
+ buildLinuxWheels
64
+
65
+ if [ "$VERSION_INCREMENT" = false ]; then
66
+ echo "Mite version not incremented, nothing to upload"
67
+ else
68
+ echo "##### Init .pypirc #####"
69
+ initPypirc
70
+
71
+ echo "##### Upload package #####"
72
+ python3 -m twine upload wheelhouse/*
73
+ fi
@@ -0,0 +1,31 @@
1
+ #!/bin/bash
2
+
3
+ function isOnMaster() {
4
+ current_revision=$(git rev-parse HEAD)
5
+ branch=$(git branch -r --contains $current_revision)
6
+ set +e
7
+ echo "$branch" | grep -q "origin/master$"
8
+ result=$?
9
+ set -e
10
+ return ${result}
11
+ }
12
+
13
+
14
+ echo "##### Run pre-commit checks #####"
15
+ /home/jenkins/.local/bin/pre-commit run --origin HEAD --source origin/master
16
+ PRE_COMMIT_STATUS=$?
17
+
18
+ if [ $PRE_COMMIT_STATUS -ne 0 ]; then
19
+ git diff
20
+ fi
21
+
22
+ echo "##### Run tests with tox #####"
23
+ tox; TOX_EXIT_CODE=$?
24
+ [ "$TOX_EXIT_CODE" -eq 0 -a "$PRE_COMMIT_STATUS" -eq 0 ] || exit 1
25
+
26
+ if isOnMaster ; then
27
+ echo "##### Job running on MASTER. Proceeding with the Tag and Release script. ######"
28
+ ./cd-scripts/cdTagRelease.sh
29
+ else
30
+ echo "###### Job running on a Branch. Stopping here. ######"
31
+ fi
@@ -1,9 +1,20 @@
1
1
  version: 1
2
- context: identity
2
+
3
+ # Further ideas for jobs to run:
4
+ # - license check
5
+ # - make sure test coverage increases
6
+ # - merge all tox tests into one using pyenv
7
+ # And, once we're sure that the pipeline is working:
8
+ # - integration/performance tests
9
+ # Once we have docs:
10
+ # - documentation coverage
11
+ # - docs build (on master only)
12
+
13
+ context: sky-identity
3
14
  triggering: multibranch
4
15
 
5
16
  defaultNodes:
6
- default: id-mite-slave
17
+ default: sky-identity-nonprod-mite-slave-buildkit
7
18
 
8
19
  modules:
9
20
  mite-ci:
@@ -3,5 +3,5 @@ keyring~=19.0.2
3
3
  tox~=3.14.2
4
4
  pre-commit~=2.20.0
5
5
  flake8~=3.7.8
6
- black~=22.3.0
6
+ black~=22.4.2
7
7
  coverage~=5.1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mite
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: A Python Performance Testing Framework
5
5
  Home-page: https://github.com/sky-uk/mite/
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -22,12 +22,13 @@ setup.py
22
22
  test-requirements.txt
23
23
  test.har
24
24
  tox.ini
25
- .circleci/config.yml
26
25
  .github/pull_request_template.md
27
26
  .github/ISSUE_TEMPLATE/bug_report.md
28
27
  .github/ISSUE_TEMPLATE/feature_request.md
29
28
  cd-scripts/cdBuild-1.sh
30
29
  cd-scripts/cdRelease.py
30
+ cd-scripts/cdTagRelease.sh
31
+ cd-scripts/runTests.sh
31
32
  docs/Makefile
32
33
  docs/components.rst
33
34
  docs/conf.py
@@ -13,4 +13,5 @@ pytest-cov
13
13
  pytest-httpbin
14
14
  pytest-httpserver
15
15
  sanic
16
- werkzeug==2.0.3
16
+ werkzeug==3.0.3
17
+ uvloop==0.19.0
@@ -1,5 +1,5 @@
1
1
  [tox]
2
- envlist = py39, py310, py311
2
+ envlist = py310, py311
3
3
  skipsdist = true
4
4
 
5
5
  [testenv]
@@ -1,184 +0,0 @@
1
- version: 2.1
2
-
3
- # Further ideas for jobs to run:
4
- # - license check
5
- # - make sure test coverage increases
6
- # - merge all tox tests into one using pyenv
7
- # And, once we're sure that the pipeline is working:
8
- # - integration/performance tests
9
- # Once we have docs:
10
- # - documentation coverage
11
- # - docs build (on master only)
12
-
13
- workflows:
14
- mite:
15
- jobs:
16
- - check-acurl-version
17
- - build:
18
- requires:
19
- - check-acurl-version
20
- - tag:
21
- requires:
22
- - build
23
- filters:
24
- branches:
25
- only: master
26
- - linux-wheels:
27
- requires:
28
- - tag
29
- filters:
30
- branches:
31
- only: master
32
- - osx-wheels:
33
- requires:
34
- - tag
35
- filters:
36
- branches:
37
- only: master
38
-
39
-
40
- jobs:
41
-
42
- check-acurl-version:
43
- docker:
44
- - image: python:3.11.2
45
- steps:
46
- - checkout
47
- - run:
48
- command: |
49
- ACURL_CHANGED=false
50
- if [[ -n $(git show --name-only ${CIRCLE_SHA1} ./acurl) ]]; then
51
- echo "Acurl has changed"
52
- apt-get update && apt-get install -y jq
53
- ACURL_CHANGED=true
54
- LATEST_ACURL_VERSION=$(curl -s https://pypi.org/pypi/acurl/json | jq -r '.info .version')
55
- if [[ -n $(grep "version = $LATEST_ACURL_VERSION$" acurl/setup.cfg) ]]; then
56
- echo "Acurl has changed, but the version of acurl hasn't changed"
57
- exit 1
58
- fi
59
- fi
60
- mkdir -p /tmp/workspace
61
- echo "export ACURL_CHANGED=\"$ACURL_CHANGED\"" >> /tmp/workspace/env_vars
62
- - persist_to_workspace:
63
- root: /tmp/workspace
64
- paths:
65
- - env_vars
66
-
67
- build:
68
- docker:
69
- - image: python:3.11.2
70
- environment:
71
- PYENV_ROOT: /root/.pyenv
72
- PYTHON_VERSION: 3.11.2
73
- PIPENV_DEFAULT_PYTHON_VERSION: 3.11.2
74
- steps:
75
- - checkout
76
- - run:
77
- name: Install pyenv, run tox
78
- command: |
79
- echo 'export PATH="/root/.pyenv/shims:/root/.pyenv/bin:$PATH"' >> "$BASH_ENV"
80
- source "$BASH_ENV"
81
- curl https://pyenv.run | bash
82
- for version in 3.9.16 3.10.10 3.11.2; do
83
- pyenv install $version
84
- done
85
- pyenv local 3.11.2 3.10.10 3.9.16
86
- pip install tox
87
- tox
88
-
89
- tag:
90
- docker:
91
- - image: python:3.11.2
92
- steps:
93
- - add_ssh_keys:
94
- fingerprints:
95
- - "fc:39:a2:b8:32:23:52:a5:fe:45:b6:9b:12:e7:30:2a"
96
- - checkout
97
- - attach_workspace:
98
- at: /tmp/workspace
99
- - run:
100
- name: tag github version
101
- command: |
102
- git config user.email "mite@noreply.github.com"
103
- git config user.name "CircleCI"
104
- pip3 install docopt GitPython packaging requests
105
- python3 cd-scripts/cdRelease.py
106
- - persist_to_workspace:
107
- root: /tmp/workspace
108
- paths:
109
- - env_vars
110
-
111
- linux-wheels:
112
- # we only need to build the 'mite' wheels on one platform
113
- # so we only need to run `python3 -m build` in this job
114
- working_directory: ~/linux-wheels
115
- docker:
116
- - image: python:3.11.2
117
- environment:
118
- CIBW_BEFORE_ALL_LINUX: "yum install -y libcurl-devel || apt-get install -y libcurl-dev || apk add curl-dev"
119
- CIBW_SKIP: "*i686"
120
- steps:
121
- - checkout
122
- - setup_remote_docker
123
- - attach_workspace:
124
- at: /tmp/workspace
125
- - run:
126
- name: Build the Linux wheels.
127
- command: |
128
- source /tmp/workspace/env_vars
129
- if [ "$VERSION_INCREMENT" = false ]; then
130
- echo "Mite version not incremented, not building"
131
- else
132
- pip3 install --user cibuildwheel==2.8.1 build twine
133
- python3 -m build --outdir ./wheelhouse
134
- fi
135
- if [ "$ACURL_CHANGED" = true ]; then
136
- cd acurl
137
- pip3 install --user cibuildwheel==2.8.1 build Cython twine
138
- python3 -m build --sdist --outdir ../wheelhouse
139
- fi
140
- - run:
141
- name: init .pypirc
142
- command: |
143
- echo -e "[pypi]" >> ~/.pypirc
144
- echo -e "username = __token__" >> ~/.pypirc
145
- echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
146
- - run:
147
- name: upload packages to pypi
148
- command: /root/.local/bin/twine upload wheelhouse/*
149
- - store_artifacts:
150
- path: wheelhouse/
151
-
152
- osx-wheels:
153
- working_directory: ~/osx-wheels
154
- macos:
155
- # https://circleci.com/docs/testing-ios#supported-xcode-versions
156
- xcode: 12.5.1
157
- steps:
158
- - checkout
159
- - attach_workspace:
160
- at: /tmp/workspace
161
- - run:
162
- name: Build the OS X wheels.
163
- command: |
164
- source /tmp/workspace/env_vars
165
- if [ "$ACURL_CHANGED" = true ]; then
166
- pip3 install cibuildwheel==2.8.1 Cython twine
167
- cd acurl
168
- cibuildwheel --output-dir ../wheelhouse --archs x86_64,arm64
169
- fi
170
- - run:
171
- name: init .pypirc
172
- command: |
173
- echo -e "[pypi]" >> ~/.pypirc
174
- echo -e "username = __token__" >> ~/.pypirc
175
- echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
176
- - run:
177
- name: upload packages to pypi
178
- command: |
179
- source /tmp/workspace/env_vars
180
- if [ "$ACURL_CHANGED" = true ]; then
181
- twine upload wheelhouse/*
182
- fi
183
- - store_artifacts:
184
- path: wheelhouse/
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes