From 90fe2e1e7f9851dd9e7e395ce1ac95a50205f9cc Mon Sep 17 00:00:00 2001 From: Adrian Zawadzki Date: Tue, 16 Dec 2025 22:37:56 +0100 Subject: [PATCH 1/3] fix(ci): fixed problem with default timeout --- .github/workflows/build-mac-wheel.yml | 2 +- meson.build | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-mac-wheel.yml b/.github/workflows/build-mac-wheel.yml index 9e354c8d..a5ca4f9d 100644 --- a/.github/workflows/build-mac-wheel.yml +++ b/.github/workflows/build-mac-wheel.yml @@ -42,7 +42,7 @@ on: jobs: build-macos: runs-on: macos-latest - timeout-minutes: ${{ inputs.timeout-minutes }} + timeout-minutes: ${{ fromJSON(inputs.timeout-minutes) }} steps: - uses: actions/checkout@v4 diff --git a/meson.build b/meson.build index d4a0a2c3..eb156379 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('DBZero', 'cpp', default_options :['buildtype=release', 'b_ndebug=if-release']) +project('dbzero', 'cpp', default_options :['buildtype=release', 'b_ndebug=if-release']) cc = meson.get_compiler('cpp') compiler_id = cc.get_id() diff --git a/pyproject.toml b/pyproject.toml index 701863f8..05220c89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ requires = ['meson-python'] [project] name = 'dbzero' version = '0.1.0' -description = 'DBZero Community Edition' +description = 'A state management system for Python 3.x that unifies your application's business logic, data persistence, and caching into a single, efficient layer.' readme = 'README.md' requires-python = '>=3.9' license = {file = 'LICENSE'} From 1e9f457a5a8a677616b88217058814cbb7d7d837 Mon Sep 17 00:00:00 2001 From: Adrian Zawadzki Date: Tue, 16 Dec 2025 22:40:09 +0100 Subject: [PATCH 2/3] fix(build): fixed pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 05220c89..a2b3a487 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ requires = ['meson-python'] [project] name = 'dbzero' version = '0.1.0' -description = 'A state management system for Python 3.x that unifies your application's business logic, data persistence, and caching into a single, efficient layer.' +description = 'A state management system for Python 3.x that unifies your applications business logic, data persistence, and caching into a single, efficient layer.' readme = 'README.md' requires-python = '>=3.9' license = {file = 'LICENSE'} From bcdba528545597ff066c005f922b4a7e87790faa Mon Sep 17 00:00:00 2001 From: Adrian Zawadzki Date: Tue, 16 Dec 2025 22:49:48 +0100 Subject: [PATCH 3/3] feature(ci): added mac build, test and deploy --- .github/workflows/build-and-deploy.yml | 21 ++- .github/workflows/build-linux-wheel.yml | 2 +- .github/workflows/test-all-versions.yml | 232 ----------------------- .github/workflows/test-linux-wheel.yml | 2 +- .github/workflows/test-mac-wheel.yml | 70 +++++++ .github/workflows/test_all_versions.yml | 236 ------------------------ 6 files changed, 92 insertions(+), 471 deletions(-) delete mode 100644 .github/workflows/test-all-versions.yml create mode 100644 .github/workflows/test-mac-wheel.yml delete mode 100644 .github/workflows/test_all_versions.yml diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 60ed0099..20f10963 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -45,6 +45,15 @@ jobs: with: python-version: ${{ matrix.python-version }} + wheels-macos: + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + uses: ./.github/workflows/build-mac-wheel.yml + with: + python-version: ${{ matrix.python-version }} + test-wheels-windows: needs: wheels-windows strategy: @@ -83,6 +92,16 @@ jobs: with: python-version: ${{ matrix.python-version }} + test-wheels-macos: + needs: wheels-macos + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + uses: ./.github/workflows/test-mac-wheel.yml + with: + python-version: ${{ matrix.python-version }} + sdist: runs-on: ubuntu-latest steps: @@ -99,7 +118,7 @@ jobs: git config --global user.name "CI Builder" rm -f .gitignore git add . && git commit -m "Update meson files for build" - - run: python -m pip install build meson + - run: python -m pip install build meson, test-wheels-macos - run: python -m build --sdist - uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build-linux-wheel.yml b/.github/workflows/build-linux-wheel.yml index 3516e1e0..23fee1e9 100644 --- a/.github/workflows/build-linux-wheel.yml +++ b/.github/workflows/build-linux-wheel.yml @@ -57,7 +57,7 @@ on: jobs: build-linux: runs-on: ubuntu-latest - timeout-minutes: ${{ inputs.timeout-minutes }} + timeout-minutes: ${{ fromJSON(inputs.timeout-minutes) }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test-all-versions.yml b/.github/workflows/test-all-versions.yml deleted file mode 100644 index 3b62f110..00000000 --- a/.github/workflows/test-all-versions.yml +++ /dev/null @@ -1,232 +0,0 @@ -name: Build and Deploy Packages -on: - push: - tags: - - 'v[0-9]*' - - feature/ci_test - workflow_dispatch: - -jobs: - wheels-windows: - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - include: - - python-version: "3.10" - python-tag: "310" - architecture: "AMD64" - - python-version: "3.11" - python-tag: "311" - architecture: "AMD64" - - python-version: "3.12" - python-tag: "312" - architecture: "AMD64" - - python-version: "3.13" - python-tag: "313" - architecture: "AMD64" - - python-version: "3.14" - python-tag: "314" - architecture: "AMD64" - - - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - uses: bus1/cabuild/action/msdevshell@v1 - with: - architecture: x64 - if: matrix.architecture == 'AMD64' - - uses: bus1/cabuild/action/msdevshell@v1 - with: - architecture: x86 - if: matrix.architecture == 'x86' - - name: Generate meson files - run: | - python scripts/generate_meson.py ./src/dbzero/ core - python scripts/generate_meson_tests.py tests/ - python scripts/generate_meson_dbzero.py dbzero/ - - - name: Configure git - run: | - git config --global user.email "ci@example.com" - git config --global user.name "CI Builder" - rm .gitignore - git add . && git commit -m "Update meson files for build" - - - run: pip3 install pipx - - run: pipx run cibuildwheel - env: - CIBW_BUILD: cp${{ matrix.python-tag }}-* - CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }} - - uses: actions/upload-artifact@v4 - with: - name: wheels-windows-${{ matrix.python-version }} - path: wheelhouse/*.whl - - wheels-linux: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - uses: actions/checkout@v3 - - run: python3 scripts/generate_meson.py ./src/dbzero/ core - - run: python3 scripts/generate_meson_tests.py tests/ - - run: python3 scripts/generate_meson_dbzero.py dbzero/ - - run: git config --global user.email "you@example.com" - - run: git config --global user.name "Your Name" - - run: rm .gitignore - - run: git add . && git commit -m "Update meson files" - - run: pip install build - - run: python3 -m build - env: - CIBW_SKIP: pp* cp36-* *-musllinux* - CIBW_ARCHS_MACOS: x86_64 arm64 - CIBW_ARCHS_LINUX: x86_64 aarch64 - CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }} - - - uses: actions/upload-artifact@v4 - with: - name: wheels-linux-${{ matrix.python-version }} - path: dist/*.whl - - test-wheels-windows: - runs-on: windows-latest - needs: wheels-windows - strategy: - fail-fast: false - matrix: - include: - - python-version: "3.9" - python-tag: "39" - architecture: "AMD64" - - python-version: "3.10" - python-tag: "310" - architecture: "AMD64" - - python-version: "3.11" - python-tag: "311" - architecture: "AMD64" - - python-version: "3.12" - python-tag: "312" - architecture: "AMD64" - - python-version: "3.13" - python-tag: "313" - architecture: "AMD64" - - python-version: "3.14" - python-tag: "314" - architecture: "AMD64" - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Download wheel artifact - uses: actions/download-artifact@v4 - with: - name: wheels-windows-${{ matrix.python-version }} - path: ./wheels/ - - name: Install wheel and dependencies - run: | - pip install pytest - pip install -r requirements.txt - Get-ChildItem -Path "./wheels/*.whl" | ForEach-Object { pip install $_.FullName } - shell: powershell - - name: Run tests - run: | - python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv - - test-wheels-linux: - runs-on: ubuntu-latest - needs: wheels-linux - strategy: - fail-fast: false - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Download wheel artifact - uses: actions/download-artifact@v4 - with: - name: wheels-linux-${{ matrix.python-version }} - path: ./wheels/ - - name: Install wheel and dependencies - run: | - pip install pytest - pip install -r requirements.txt - pip install ./wheels/*.whl - - name: Run tests - run: | - python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv - - sdist: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Generate meson files - run: | - python scripts/generate_meson.py ./src/dbzero/ core - python scripts/generate_meson_tests.py tests/ - python scripts/generate_meson_dbzero.py dbzero/ - - - name: Configure git - run: | - git config --global user.email "ci@example.com" - git config --global user.name "CI Builder" - rm -f .gitignore - git add . && git commit -m "Update meson files for build" - - run: python -m pip install build meson - - run: python -m build --sdist - - uses: actions/upload-artifact@v4 - with: - name: sdist - path: dist/*.tar.gz - - deploy-to-pypi: - name: Deploy to PyPI (Manual) - runs-on: ubuntu-latest - needs: [sdist, test-wheels-linux, test-wheels-windows] - if: github.event_name == 'workflow_dispatch' - environment: pypi-deployment - permissions: - id-token: write - contents: read - steps: - - name: Download all artifacts - uses: actions/download-artifact@v4 - with: - path: ./dist/ - - - name: Flatten artifact structure - run: | - mkdir -p ./upload/ - find ./dist/ -name "*.whl" -exec cp {} ./upload/ \; - find ./dist/ -name "*.tar.gz" -exec cp {} ./upload/ \; - ls -la ./upload/ - - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://nexus.dbzero.io/repository/dbzero_hosted/ - user: admin - password: ${{ secrets.PYPI_API_PASSWORD }} - packages-dir: ./upload/ - verbose: true - skip-existing: true - attestations: false diff --git a/.github/workflows/test-linux-wheel.yml b/.github/workflows/test-linux-wheel.yml index f8f2cf3f..8172534d 100644 --- a/.github/workflows/test-linux-wheel.yml +++ b/.github/workflows/test-linux-wheel.yml @@ -51,7 +51,7 @@ on: jobs: test-wheels-linux: runs-on: ubuntu-latest - timeout-minutes: ${{ inputs.timeout-minutes }} + timeout-minutes: ${{ fromJSON(inputs.timeout-minutes) }} env: REQUIREMENTS_FILE: ${{ inputs.python-version == '3.9' && 'requirements.3.9.txt' || 'requirements.txt' }} steps: diff --git a/.github/workflows/test-mac-wheel.yml b/.github/workflows/test-mac-wheel.yml new file mode 100644 index 00000000..a856a213 --- /dev/null +++ b/.github/workflows/test-mac-wheel.yml @@ -0,0 +1,70 @@ +name: Test macOS Wheel + +on: + workflow_call: + inputs: + python-version: + required: true + type: string + timeout-minutes: + required: false + type: number + default: 15 + pytest-markers: + required: false + type: string + default: "-m 'not integration_test' -m 'not stress_test'" + workflow_dispatch: + inputs: + python-version: + description: 'Python version to test' + required: true + type: choice + options: + - '3.9' + - '3.10' + - '3.11' + - '3.12' + - '3.13' + - '3.14' + default: '3.12' + timeout-minutes: + description: 'Timeout in minutes' + required: false + type: number + default: 15 + pytest-markers: + description: 'Pytest markers (e.g., -m stress_test)' + required: false + type: string + default: "-m 'not integration_test' -m 'not stress_test'" + +jobs: + test-wheels-macos: + runs-on: macos-latest + timeout-minutes: ${{ fromJSON(inputs.timeout-minutes) }} + env: + REQUIREMENTS_FILE: ${{ inputs.python-version == '3.9' && 'requirements.3.9.txt' || 'requirements.txt' }} + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python-version }} + + - name: Download wheel artifact + uses: actions/download-artifact@v4 + with: + name: wheels-macos-${{ inputs.python-version }} + path: ./wheels/ + + - name: Install wheel and dependencies + run: | + pip install pytest + pip install -r $REQUIREMENTS_FILE + pip install ./wheels/*.whl + + - name: Run tests + run: | + python -m pytest ${{ inputs.pytest-markers }} -c pytest.ini --capture=no -vv diff --git a/.github/workflows/test_all_versions.yml b/.github/workflows/test_all_versions.yml deleted file mode 100644 index e40d92b6..00000000 --- a/.github/workflows/test_all_versions.yml +++ /dev/null @@ -1,236 +0,0 @@ -name: Build and Deploy Packages -on: - push: - tags: - - 'v[0-9]*' - - feature/ci_test - workflow_dispatch: - -jobs: - wheels-windows: - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - include: - - python-version: "3.10" - python-tag: "310" - architecture: "AMD64" - - python-version: "3.11" - python-tag: "311" - architecture: "AMD64" - - python-version: "3.12" - python-tag: "312" - architecture: "AMD64" - - python-version: "3.13" - python-tag: "313" - architecture: "AMD64" - - python-version: "3.14" - python-tag: "314" - architecture: "AMD64" - - - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - uses: bus1/cabuild/action/msdevshell@v1 - with: - architecture: x64 - if: matrix.architecture == 'AMD64' - - uses: bus1/cabuild/action/msdevshell@v1 - with: - architecture: x86 - if: matrix.architecture == 'x86' - - name: Generate meson files - run: | - python scripts/generate_meson.py ./src/dbzero/ core - python scripts/generate_meson_tests.py tests/ - python scripts/generate_meson_dbzero.py dbzero/ - - - name: Configure git - run: | - git config --global user.email "ci@example.com" - git config --global user.name "CI Builder" - rm .gitignore - git add . && git commit -m "Update meson files for build" - - - run: pip3 install pipx - - run: pipx run cibuildwheel - env: - CIBW_BUILD: cp${{ matrix.python-tag }}-* - CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }} - - uses: actions/upload-artifact@v4 - with: - name: wheels-windows-${{ matrix.python-version }} - path: wheelhouse/*.whl - - wheels-linux: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - uses: actions/checkout@v3 - - run: python3 scripts/generate_meson.py ./src/dbzero/ core - - run: python3 scripts/generate_meson_tests.py tests/ - - run: python3 scripts/generate_meson_dbzero.py dbzero/ - - run: git config --global user.email "you@example.com" - - run: git config --global user.name "Your Name" - - run: rm .gitignore - - run: git add . && git commit -m "Update meson files" - - run: pip install build - - run: python3 -m build - env: - CIBW_SKIP: pp* cp36-* *-musllinux* - CIBW_ARCHS_MACOS: x86_64 arm64 - CIBW_ARCHS_LINUX: x86_64 aarch64 - CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }} - - - uses: actions/upload-artifact@v4 - with: - name: wheels-linux-${{ matrix.python-version }} - path: dist/*.whl - - test-wheels-windows: - runs-on: windows-latest - needs: wheels-windows - strategy: - fail-fast: false - matrix: - include: - - python-version: "3.9" - python-tag: "39" - architecture: "AMD64" - - python-version: "3.10" - python-tag: "310" - architecture: "AMD64" - - python-version: "3.11" - python-tag: "311" - architecture: "AMD64" - - python-version: "3.12" - python-tag: "312" - architecture: "AMD64" - - python-version: "3.13" - python-tag: "313" - architecture: "AMD64" - - python-version: "3.14" - python-tag: "314" - architecture: "AMD64" - env: - REQUIREMENTS_FILE: ${{ matrix.python-version == '3.9' && 'requirements.3.9.txt' || 'requirements.txt' }} - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Download wheel artifact - uses: actions/download-artifact@v4 - with: - name: wheels-windows-${{ matrix.python-version }} - path: ./wheels/ - - name: Install wheel and dependencies - run: | - pip install pytest - pip install -r $env:REQUIREMENTS_FILE - Get-ChildItem -Path "./wheels/*.whl" | ForEach-Object { pip install $_.FullName } - shell: powershell - - name: Run tests - run: | - python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv - - test-wheels-linux: - runs-on: ubuntu-latest - needs: wheels-linux - strategy: - fail-fast: false - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] - env: - REQUIREMENTS_FILE: ${{ matrix.python-version == '3.9' && 'requirements.3.9.txt' || 'requirements.txt' }} - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Download wheel artifact - uses: actions/download-artifact@v4 - with: - name: wheels-linux-${{ matrix.python-version }} - path: ./wheels/ - - name: Install wheel and dependencies - run: | - pip install pytest - pip install -r $REQUIREMENTS_FILE - pip install ./wheels/*.whl - - name: Run tests - run: | - python -m pytest -m 'not integration_test' -m 'not stress_test' -c pytest.ini --capture=no -vv - - sdist: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Generate meson files - run: | - python scripts/generate_meson.py ./src/dbzero/ core - python scripts/generate_meson_tests.py tests/ - python scripts/generate_meson_dbzero.py dbzero/ - - - name: Configure git - run: | - git config --global user.email "ci@example.com" - git config --global user.name "CI Builder" - rm -f .gitignore - git add . && git commit -m "Update meson files for build" - - run: python -m pip install build meson - - run: python -m build --sdist - - uses: actions/upload-artifact@v4 - with: - name: sdist - path: dist/*.tar.gz - - deploy-to-pypi: - name: Deploy to PyPI (Manual) - runs-on: ubuntu-latest - needs: [sdist, test-wheels-linux, test-wheels-windows] - if: github.event_name == 'workflow_dispatch' - environment: pypi-deployment - permissions: - id-token: write - contents: read - steps: - - name: Download all artifacts - uses: actions/download-artifact@v4 - with: - path: ./dist/ - - - name: Flatten artifact structure - run: | - mkdir -p ./upload/ - find ./dist/ -name "*.whl" -exec cp {} ./upload/ \; - find ./dist/ -name "*.tar.gz" -exec cp {} ./upload/ \; - ls -la ./upload/ - - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://nexus.dbzero.io/repository/dbzero_hosted/ - user: admin - password: ${{ secrets.PYPI_API_PASSWORD }} - packages-dir: ./upload/ - verbose: true - skip-existing: true - attestations: false