diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index eb0ac5583cb9a5f3d15d7cd4c604fc49c2bcbdcf..0000000000000000000000000000000000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: CI -run-name: ${{ github.actor }} -on: [ push ] -jobs: - tests: - runs-on: ubuntu-20.04 - strategy: - matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] - steps: - - uses: actions/checkout@main - - uses: actions/setup-python@main - with: - python-version: ${{ matrix.python-version }} - cache: pip - - name: Install everything - run: | - sudo apt-get update - sudo apt-get install -y python3-setuptools python3-yaml python3-dev - pip install -U pip pytest coverage pytest-cov Cython setuptools - - name: Before the coverage - run: | - wget https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 - chmod ugo+x test-reporter-latest-linux-amd64 - ./test-reporter-latest-linux-amd64 before-build - env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - - name: Test - run: | - python setup.py install - pytest -vv --cov=minijson - env: - DEBUG: '1' - - name: Submit the code coverage - run: | - coverage xml - ./test-reporter-latest-linux-amd64 after-build -t coverage.py - ./test-reporter-latest-linux-amd64 format-coverage -t coverage.py -o codeclimate.json - ./test-reporter-latest-linux-amd64 upload-coverage -i codeclimate.json - env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 239222d3f652f22cb3d975a9a4da59d31e0c2ea4..40fa5fbc14ca296450919640118a4acbd8f24230 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ __pycache__/ # Distribution / packaging .Python build/ +*.egg-info +minijson.c +docs/_build/ develop-eggs/ dist/ downloads/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..d20b5099483508a72c8453621698c0b49b620b01 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,91 @@ +stages: + - test + - build + +pages: + stage: build + image: zoo.smok.co/build/build:pages + before_script: + - pip install --upgrade Cython setuptools pip + - pip install -r requirements.txt + - python setup.py build_ext --inplace + script: + - cd docs + - make html + - cp _build/html public + artifacts: + paths: + - "public" + +.test_python: + stage: test + before_script: + - pip install --upgrade Cython setuptools pip coverage nose2 + - pip install -r requirements.txt + - python setup.py build_ext --inplace + variables: + CI: "1" + script: + - python -m coverage run -m nose2 -vv -F + - python -m coverage report + coverage: /TOTAL.*\s+(\d+\%)/ + + +test_python38: + extends: .test_python + image: python:3.8 + + + +test_python39: + extends: .test_python + image: python:3.9 + + +test_python310: + extends: .test_python + image: python:3.10 + + + +test_python311: + extends: .test_python + image: python:3.11 + + +.build_python: + only: + - master + stage: build + script: + - pip install --break-system-packages --upgrade Cython setuptools pip + - pip install --break-system-packages -r requirements.txt + - python setup.py bdist_wheel + - cp dist/*.whl . + artifacts: + paths: + - "*.whl" + + +build_python38: + extends: .build_python + image: python:3.8 + +build_python39: + extends: .build_python + image: python:3.9 + + +build_python310: + extends: .build_python + image: python:3.10 + + +build_python311: + extends: .build_python + image: python:3.11 + + +build_python311_armv7l: + extends: .build_python + image: zoo.smok.co/build/build:armv7l-python311 diff --git a/docs/changelog.rst b/docs/changelog.rst index 3757558503f91770ab1fc6d6a240dffb0c9d0fc9..aa8ddeaacca97b8a6396f3ac07c7d339d1b6ff31 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,11 @@ Changelog ========= +v3.1.0 +------ + +Moved entirely to SMOKs' build architecture. + v3.0.1 ------ diff --git a/setup.cfg b/setup.cfg index 07163fb38f499db7d9e48a58dc81c09de5b88da6..bf14196164762339034e212669577330da3514af 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ # coding: utf-8 [metadata] -version = 3.0.1 +version = 3.1.0 name = minijson long_description = file: README.md long_description_content_type = text/markdown; charset=UTF-8 @@ -12,8 +12,8 @@ description = A library for serializing JSON in a small binary format url = https://github.com/smok-serwis/minijson project_urls = Documentation = https://minijson.readthedocs.io/ - Code = https://github.com/smok-serwis/minijson - Issue tracker = https://github.com/smok-serwis/minijson/issues + Code = https://git.dms-serwis.com.pl/smokserwis/minijson + Issue tracker = https://git.dms-serwis.com.pl/smokserwis/minijson/-/issues classifier = Development Status :: 5 - Production/Stable Programming Language :: Python diff --git a/setup.py b/setup.py index d1ce8c0830a8ac3fdaf2f5c375600a3a7824e3c0..0c145e1f9ac7b9c45af8a32b2e8b2de290eb2b97 100644 --- a/setup.py +++ b/setup.py @@ -10,12 +10,12 @@ from setuptools import setup, Extension directive_defaults = get_directive_defaults() directive_defaults['language_level'] = '3' macros = [] -if 'DEBUG' in os.environ: +if 'DEBUG' in os.environ or 'CI' in os.environ: print('Enabling debug mode') directive_defaults['linetrace'] = True directive_defaults['profiling'] = True directive_defaults['binding'] = True - macros = [('CYTHON_TRACE', '1')] + macros = [('CYTHON_TRACE', '1'), ('CYTHON_TRACE_NOGIL', '1')] setup(ext_modules=cythonize([Extension("minijson", ["minijson.pyx"], define_macros=macros)]))