From 32c34a46c1e93485f2536b2615b1c3dcd43c5650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <pmaslanka@smok.co> Date: Sat, 3 Aug 2024 21:46:46 +0200 Subject: [PATCH] fix --- .github/workflows/build.yml | 104 --------------------------------- .github/workflows/debian.yml | 43 -------------- .github/workflows/dist.yml | 108 ----------------------------------- .travis.yml | 18 ------ 4 files changed, 273 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/debian.yml delete mode 100644 .github/workflows/dist.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 4e49a6a..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,104 +0,0 @@ -# vim:ts=2:sw=2:et:ai:sts=2 -name: 'Build' - -on: - pull_request: - push: - branches: - - 'main' - - 'force_ci/all/**' # For development, forcing all workflows to run. - - 'force_ci/build/**' # For debugging and/or only forcing this workflow. - -jobs: - # Build the RocksDB C library and cache the result. - librocksdb: - name: 'Build librocksdb' - runs-on: ${{ matrix.os }} - env: - LIBROCKSDB_PATH: /opt/rocksdb-${{ matrix.rocksdb_ver }} - strategy: - matrix: - os: [ubuntu-latest] - rocksdb_ver: ['v6.29.5', 'v7.10.2', 'v8.9.1'] - - steps: - - uses: actions/cache@v2 - id: cache-librocksdb - with: - key: ${{ matrix.os }}-librocksdb-${{ matrix.rocksdb_ver }} - path: ${{ env.LIBROCKSDB_PATH }} - - - name: 'Install dependencies' - if: steps.cache-librocksdb.outputs.cache-hit != 'true' - run: > - sudo apt install -y libsnappy-dev libbz2-dev liblz4-dev libz-dev - libgflags-dev libzstd-dev - - - name: 'Clone & build RocksDB ${{ matrix.rocksdb_ver }}' - if: steps.cache-librocksdb.outputs.cache-hit != 'true' - run: > - git clone https://github.com/facebook/rocksdb --depth 1 - --branch ${{ matrix.rocksdb_ver }} ${{ env.LIBROCKSDB_PATH }} && - pushd ${{ env.LIBROCKSDB_PATH }} && - CXXFLAGS='-flto -Os -s' PORTABLE=1 make shared_lib -j 4 && - popd - - test: - name: 'Build and test python-rocksdb' - needs: librocksdb - runs-on: ${{ matrix.os }} - env: - LIBROCKSDB_PATH: /opt/rocksdb-${{ matrix.rocksdb_ver }} - strategy: - matrix: - os: [ubuntu-latest] - py_ver: ['3.10', '3.11', '3.12'] - rocksdb_ver: ['v6.29.5', 'v7.10.2', 'v8.9.1'] - - steps: - - uses: actions/checkout@v2 - name: 'Checkout source repository' - - - uses: actions/setup-python@v2 - name: 'Set up Python ${{ matrix.py_ver }}' - with: - python-version: ${{ matrix.py_ver }} - - - name: 'Install C libraries' - # XXX(Tina): The non-development versions are sufficient, but package - # names are difficult to predict. - run: > - sudo apt install -y libsnappy-dev libbz2-dev liblz4-dev libz-dev - libgflags-dev libzstd-dev - - # Recover the pre-built C library. - - uses: actions/cache@v2 - id: cache-librocksdb - with: - key: ${{ matrix.os }}-librocksdb-${{ matrix.rocksdb_ver }} - path: ${{ env.LIBROCKSDB_PATH }} - - - name: 'Install RocksDB ${{ matrix.rocksdb_ver }}' - if: steps.cache-librocksdb.outputs.cache-hit == 'true' - # DO NOT FORGET to call `ldconfig`! - run: | - pushd ${{ env.LIBROCKSDB_PATH }} && - sudo make install-shared && - sudo ldconfig && - popd - - - name: Build and install python-rocksdb - # Use `pip install` instead of `setup.py` so build-dependencies from - # `pyproject.toml` are installed, in particular `Cython`, without which - # the build fails in confusing ways. - run: | - python3 -m pip install '.[test]' - - - name: Run tests - # Use `--pyargs` to interpret parameter as module to import, not as a - # path, and do not use `python3 -m pytest`. This way we prevent - # importing the module from the current directory instead of the - # installed package, and failing when it cannot find the shared - # library. - run: | - pytest --pyargs rocksdb diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml deleted file mode 100644 index 1d88560..0000000 --- a/.github/workflows/debian.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: debian - -on: - pull_request: - push: - branches: - - 'main' - - 'force_ci/all/**' # For development, forcing all workflows to run. - - 'force_ci/debian/**' # For debugging and/or only forcing this workflow. - -jobs: - debian-build: - name: ${{ matrix.dist }} - runs-on: ubuntu-latest - container: debian:${{ matrix.dist }}-slim - strategy: - fail-fast: false - matrix: - dist: [bullseye, bookworm] - steps: - - uses: actions/checkout@v2 - - - name: Install build-dependencies - # TODO(dato): find out why setup.py links to compression libraries - # by hand (and hence their development packages needed here). - run: | - apt-get update - apt-get install --no-install-recommends -y \ - build-essential librocksdb-dev cython3 python3-pkgconfig \ - python3-dev python3-pip python3-pytest \ - libsnappy-dev libbz2-dev liblz4-dev libz-dev - - - name: Build pyrocksdb - # TODO(dato): consider using pypa/build --no-isolaiton, to - # build the package using a tool specifically designed for - # that, rather than trusting it to a tool that does a lot - # more (pip). - run: | - python3 -m pip install --no-build-isolation -v '.[test]' - - - name: Run tests - run: | - pytest-3 --pyargs rocksdb diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml deleted file mode 100644 index ed31d87..0000000 --- a/.github/workflows/dist.yml +++ /dev/null @@ -1,108 +0,0 @@ -# vim:ts=2:sw=2:et:ai:sts=2 -name: 'Build distribution' - -on: - # Only run when pushing to main/merging PRs. - push: - branches: - - main - -jobs: - build_wheels: - name: 'Build wheels' - runs-on: ${{ matrix.os }} - env: - LIBROCKSDB_PATH: /opt/rocksdb-${{ matrix.rocksdb_ver }} - strategy: - matrix: - os: [ubuntu-latest] - rocksdb_ver: ['v6.14.6'] - - steps: - - uses: actions/checkout@v2 - name: 'Checkout source repository' - - - uses: actions/setup-python@v2 - name: 'Set up Python 3.9' - with: - python-version: '3.9' - - - name: 'Install cibuildwheel' - run: | - python3 -m pip install cibuildwheel==1.7.1 - - - name: 'Build wheels' - run: | - python3 -m cibuildwheel --output-dir dist - env: - CIBW_MANYLINUX_X86_64_IMAGE: 'manylinux2014' - CIBW_BUILD: 'cp3*' - CIBW_SKIP: '*-manylinux_i686' - # Install python package and test-deps. - CIBW_TEST_REQUIRES: '.[test] pytest' - # Use `--pyargs` to interpret parameter as module to import, not as a - # path, and do not use `python3 -m pytest`. This way we prevent - # importing the module from the current directory instead of the - # installed package, and failing when it cannot find the shared - # library. - CIBW_TEST_COMMAND: 'pytest --pyargs rocksdb' - # Avoid re-building the C library in every iteration by testing for - # the build directory. - CIBW_BEFORE_BUILD: > - yum install -y python3-pkgconfig bzip2-devel lz4-devel snappy-devel zlib-devel - python3-Cython && - test -d ${{ env.LIBROCKSDB_PATH }} || ( - git clone https://github.com/facebook/rocksdb --depth 1 - --branch ${{ matrix.rocksdb_ver }} ${{ env.LIBROCKSDB_PATH }} && - cd ${{ env.LIBROCKSDB_PATH }} && - CXXFLAGS='-flto -Os -s' PORTABLE=1 make shared_lib -j 4 - ) && - pushd ${{ env.LIBROCKSDB_PATH }} && - make install-shared && - ldconfig && - popd - - - uses: actions/upload-artifact@v2 - name: 'Upload build artifacts' - with: - path: 'dist/*.whl' - - build_sdist: - name: 'Build source distribution' - runs-on: 'ubuntu-latest' - steps: - - uses: actions/checkout@v2 - name: 'Checkout source repository' - - - uses: actions/setup-python@v2 - name: 'Set up Python 3.9' - with: - python-version: '3.9' - - - name: 'Build sdist' - run: | - python3 setup.py sdist - - - uses: actions/upload-artifact@v2 - name: 'Upload build artifacts' - with: - path: 'dist/*.tar.gz' - - -# upload_pypi: -# name: 'Upload packages' -# needs: ['build_wheels', 'build_sdist'] -# runs-on: 'ubuntu-latest' -# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') -# steps: -# - uses: actions/download-artifact@v2 -# name: 'Download artifacts' -# with: -# name: 'artifact' -# path: 'dist' -# -# - uses: pypa/gh-action-pypi-publish@master -# name: 'Publish built packages' -# with: -# user: '__token__' -# password: '${{ secrets.PYPI_API_TOKEN }}' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7c0446d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -sudo: required -dist: trusty -language: generic -services: - - docker - -cache: - directories: - - ~/.cache/pip - -install: - docker build . -t ci-image; -script: - docker run -v ~/.cache/pip:/home/tester/.cache/pip -v $(pwd):/home/tester/src ci-image:latest tox -e ${TOXENV} ; -env: - - TOXENV=py27 - - TOXENV=py36 - - TOXENV=docs -- GitLab