From 0c1023d8f4449cd77572efa30517c055e018514e Mon Sep 17 00:00:00 2001 From: NguyenHoangSon96 Date: Tue, 19 Aug 2025 17:43:13 +0700 Subject: [PATCH 1/2] feat: support arm64 circleci --- .circleci/config.yml | 123 +++++++++++++++++++++++++++++-------------- 1 file changed, 83 insertions(+), 40 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 02b286f..1e8c3a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,37 @@ version: 2.1 +parameters: + default-python-image: + type: string + default: "cimg/python:3.8" + +executors: + docker-amd64-image: + parameters: + maven-image: + type: string + default: << pipeline.parameters.default-python-image >> + docker: + - image: <> + - image: influxdb:3-core + environment: + - INFLUXDB3_NODE_IDENTIFIER_PREFIX=node01 + - INFLUXDB3_OBJECT_STORE=file + - INFLUXDB3_DB_DIR=/var/lib/influxdb3/data + docker-arm64-image: + parameters: + maven-image: + type: string + default: << pipeline.parameters.default-python-image >> + docker: + - image: <> + - image: influxdb:3-core + environment: + - INFLUXDB3_NODE_IDENTIFIER_PREFIX=node01 + - INFLUXDB3_OBJECT_STORE=file + - INFLUXDB3_DB_DIR=/var/lib/influxdb3/data + resource_class: arm.medium + commands: client-test: description: "Run tests" @@ -31,12 +63,41 @@ commands: - "~/.cache/pip" - "/usr/local/lib/site-python" when: always + upload-codecov-amd64: + steps: + - run: + name: Collecting coverage reports + command: | + curl -Os https://uploader.codecov.io/latest/linux/codecov + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig + curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + chmod +x ./codecov + ./codecov + upload-codecov-arm64: + steps: + - run: + name: Collecting coverage reports + command: | + curl -k https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import + curl -Os https://uploader.codecov.io/v0.8.0/aarch64/codecov + curl -Os https://uploader.codecov.io/v0.8.0/aarch64/codecov.SHA256SUM + curl -Os https://uploader.codecov.io/v0.8.0/aarch64/codecov.SHA256SUM.sig + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM + shasum -a 256 -c codecov.SHA256SUM + sudo chmod +x codecov + jobs: tests-python: parameters: python-image: type: string - default: &default-python "cimg/python:3.8" + default: <>>> + exe: + type: executor + default: docker-amd64-image pytest-marker: type: string default: "not integration" @@ -63,20 +124,19 @@ jobs: pytest-marker: << parameters.pytest-marker >> - store_test_results: path: test-reports - - run: - name: Collecting coverage reports - command: | - curl -Os https://uploader.codecov.io/latest/linux/codecov - curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM - curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig - curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import - gpgv codecov.SHA256SUM.sig codecov.SHA256SUM - shasum -a 256 -c codecov.SHA256SUM - chmod +x ./codecov - ./codecov + - when: + condition: + equal: [ docker-amd64-image, << parameters.exe >> ] + steps: + - upload-codecov-amd64 + - when: + condition: + equal: [ docker-arm64-image, << parameters.exe >> ] + steps: + - upload-codecov-arm64 check-code-style: docker: - - image: *default-python + - image: <> environment: PIPENV_VENV_IN_PROJECT: true steps: @@ -103,7 +163,7 @@ jobs: flake8 Examples/ check-twine: docker: - - image: *default-python + - image: <> environment: PIPENV_VENV_IN_PROJECT: true steps: @@ -117,7 +177,7 @@ jobs: twine check dist/* check-docstyle: docker: - - image: *default-python + - image: <> environment: PIPENV_VENV_IN_PROJECT: true steps: @@ -128,6 +188,7 @@ jobs: pip install pydocstyle --user pydocstyle --count influxdb_client_3 + workflows: version: 2 build: @@ -136,36 +197,18 @@ workflows: equal: [ scheduled_pipeline, << pipeline.trigger_source >> ] jobs: - check-code-style -# - check-docstyle + # - check-docstyle - check-twine - tests-python: - name: test-3.8 - python-image: "cimg/python:3.8" - - tests-python: - name: test-3.9 - python-image: "cimg/python:3.9" - - tests-python: - name: test-3.10 - python-image: "cimg/python:3.10" - - tests-python: - name: test-3.11 - python-image: "cimg/python:3.11" - - tests-python: - name: test-3.12 - python-image: "cimg/python:3.12" - - tests-python: - name: test-3.13 - python-image: "cimg/python:3.13" + matrix: + parameters: + exe: [ docker-amd64-image, docker-arm64-image ] + 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 ] - tests-python: requires: - - test-3.8 - - test-3.9 - - test-3.10 - - test-3.11 - - test-3.12 - - test-3.13 + - tests-python name: test-integration - python-image: *default-python + python-image: <> pytest-marker: "integration" nightly: From c5dbd9ec669af6bb7c43bdda60299cab76de7b30 Mon Sep 17 00:00:00 2001 From: NguyenHoangSon96 Date: Tue, 19 Aug 2025 17:47:40 +0700 Subject: [PATCH 2/2] chore: CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a96051e..b94bb2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 0.16.0 [unreleased] +### CI + +1. [#153](https://github.com/InfluxCommunity/influxdb3-python/pull/153) Add tests for arm64 CircleCI. + ## 0.15.0 [2025-08-12] ### Features