diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6370270f7fdbb3b0be543b9a0402daef976defa..a40b20340fd5552f2303059483682969991583fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,10 @@ name: 'Build' on: + pull_request: push: + branches: + - main jobs: # Build the RocksDB C library and cache the result. diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml new file mode 100644 index 0000000000000000000000000000000000000000..2a7c68d950785a68d34d39c21180a767acf9ca6a --- /dev/null +++ b/.github/workflows/debian.yml @@ -0,0 +1,42 @@ +name: debian + +on: + pull_request: + push: + branches: + - main + - workflows/debian # For debugging. + +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-dev python3-pip python3-pytest \ + libsnappy-dev libbz2-dev liblz4-dev libz-dev + + - name: Symlink pytest + run: | + ln -s /usr/bin/pytest-3 /usr/local/bin/pytest + + - name: Build pyrocksdb + run: | + python3 -m pip install '.[test]' + + - name: Run tests + run: | + pytest --pyargs rocksdb