Skip to content

Commit ed886ca

Browse files
feat: support arm64 circleci (#153)
1 parent 7ba3c61 commit ed886ca

File tree

2 files changed

+87
-40
lines changed

2 files changed

+87
-40
lines changed

.circleci/config.yml

Lines changed: 83 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
version: 2.1
22

3+
parameters:
4+
default-python-image:
5+
type: string
6+
default: "cimg/python:3.8"
7+
8+
executors:
9+
docker-amd64-image:
10+
parameters:
11+
maven-image:
12+
type: string
13+
default: << pipeline.parameters.default-python-image >>
14+
docker:
15+
- image: <<parameters.maven-image>>
16+
- image: influxdb:3-core
17+
environment:
18+
- INFLUXDB3_NODE_IDENTIFIER_PREFIX=node01
19+
- INFLUXDB3_OBJECT_STORE=file
20+
- INFLUXDB3_DB_DIR=/var/lib/influxdb3/data
21+
docker-arm64-image:
22+
parameters:
23+
maven-image:
24+
type: string
25+
default: << pipeline.parameters.default-python-image >>
26+
docker:
27+
- image: <<parameters.maven-image>>
28+
- image: influxdb:3-core
29+
environment:
30+
- INFLUXDB3_NODE_IDENTIFIER_PREFIX=node01
31+
- INFLUXDB3_OBJECT_STORE=file
32+
- INFLUXDB3_DB_DIR=/var/lib/influxdb3/data
33+
resource_class: arm.medium
34+
335
commands:
436
client-test:
537
description: "Run tests"
@@ -31,12 +63,41 @@ commands:
3163
- "~/.cache/pip"
3264
- "/usr/local/lib/site-python"
3365
when: always
66+
upload-codecov-amd64:
67+
steps:
68+
- run:
69+
name: Collecting coverage reports
70+
command: |
71+
curl -Os https://uploader.codecov.io/latest/linux/codecov
72+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
73+
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
74+
curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
75+
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
76+
shasum -a 256 -c codecov.SHA256SUM
77+
chmod +x ./codecov
78+
./codecov
79+
upload-codecov-arm64:
80+
steps:
81+
- run:
82+
name: Collecting coverage reports
83+
command: |
84+
curl -k https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
85+
curl -Os https://uploader.codecov.io/v0.8.0/aarch64/codecov
86+
curl -Os https://uploader.codecov.io/v0.8.0/aarch64/codecov.SHA256SUM
87+
curl -Os https://uploader.codecov.io/v0.8.0/aarch64/codecov.SHA256SUM.sig
88+
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
89+
shasum -a 256 -c codecov.SHA256SUM
90+
sudo chmod +x codecov
91+
3492
jobs:
3593
tests-python:
3694
parameters:
3795
python-image:
3896
type: string
39-
default: &default-python "cimg/python:3.8"
97+
default: <<pipeline.parameters.default-python-image>>>>
98+
exe:
99+
type: executor
100+
default: docker-amd64-image
40101
pytest-marker:
41102
type: string
42103
default: "not integration"
@@ -63,20 +124,19 @@ jobs:
63124
pytest-marker: << parameters.pytest-marker >>
64125
- store_test_results:
65126
path: test-reports
66-
- run:
67-
name: Collecting coverage reports
68-
command: |
69-
curl -Os https://uploader.codecov.io/latest/linux/codecov
70-
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
71-
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
72-
curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
73-
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
74-
shasum -a 256 -c codecov.SHA256SUM
75-
chmod +x ./codecov
76-
./codecov
127+
- when:
128+
condition:
129+
equal: [ docker-amd64-image, << parameters.exe >> ]
130+
steps:
131+
- upload-codecov-amd64
132+
- when:
133+
condition:
134+
equal: [ docker-arm64-image, << parameters.exe >> ]
135+
steps:
136+
- upload-codecov-arm64
77137
check-code-style:
78138
docker:
79-
- image: *default-python
139+
- image: <<pipeline.parameters.default-python-image>>
80140
environment:
81141
PIPENV_VENV_IN_PROJECT: true
82142
steps:
@@ -103,7 +163,7 @@ jobs:
103163
flake8 Examples/
104164
check-twine:
105165
docker:
106-
- image: *default-python
166+
- image: <<pipeline.parameters.default-python-image>>
107167
environment:
108168
PIPENV_VENV_IN_PROJECT: true
109169
steps:
@@ -117,7 +177,7 @@ jobs:
117177
twine check dist/*
118178
check-docstyle:
119179
docker:
120-
- image: *default-python
180+
- image: <<pipeline.parameters.default-python-image>>
121181
environment:
122182
PIPENV_VENV_IN_PROJECT: true
123183
steps:
@@ -128,6 +188,7 @@ jobs:
128188
pip install pydocstyle --user
129189
pydocstyle --count influxdb_client_3
130190
191+
131192
workflows:
132193
version: 2
133194
build:
@@ -136,36 +197,18 @@ workflows:
136197
equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
137198
jobs:
138199
- check-code-style
139-
# - check-docstyle
200+
# - check-docstyle
140201
- check-twine
141202
- tests-python:
142-
name: test-3.8
143-
python-image: "cimg/python:3.8"
144-
- tests-python:
145-
name: test-3.9
146-
python-image: "cimg/python:3.9"
147-
- tests-python:
148-
name: test-3.10
149-
python-image: "cimg/python:3.10"
150-
- tests-python:
151-
name: test-3.11
152-
python-image: "cimg/python:3.11"
153-
- tests-python:
154-
name: test-3.12
155-
python-image: "cimg/python:3.12"
156-
- tests-python:
157-
name: test-3.13
158-
python-image: "cimg/python:3.13"
203+
matrix:
204+
parameters:
205+
exe: [ docker-amd64-image, docker-arm64-image ]
206+
python-image: [ << pipeline.parameters.default-python-image >>, "cimg/python:3.9", "cimg/python:3.10", "cimg/python:3.11", "cimg/python:3.12", cimg/python:3.13 ]
159207
- tests-python:
160208
requires:
161-
- test-3.8
162-
- test-3.9
163-
- test-3.10
164-
- test-3.11
165-
- test-3.12
166-
- test-3.13
209+
- tests-python
167210
name: test-integration
168-
python-image: *default-python
211+
python-image: <<pipeline.parameters.default-python-image>>
169212
pytest-marker: "integration"
170213

171214
nightly:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## 0.16.0 [unreleased]
44

5+
### CI
6+
7+
1. [#153](https://github.com/InfluxCommunity/influxdb3-python/pull/153) Add tests for arm64 CircleCI.
8+
59
## 0.15.0 [2025-08-12]
610

711
### Features

0 commit comments

Comments
 (0)