[python] Merge the somacore library directly into the tiledbsom python library
#747
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: TileDB-SOMA R-Python Interop CI | |
| on: | |
| pull_request: | |
| paths: | |
| - 'libtiledbsoma/**' | |
| - 'apis/**' | |
| - '!**.md' | |
| - '.github/workflows/r-python-interop-testing.yml' | |
| - '.github/actions/setup-r/**' | |
| - ".github/workflows/build-cpp.yml" | |
| push: | |
| branches: | |
| - main | |
| - "release-*" | |
| workflow_dispatch: | |
| jobs: | |
| build-cpp-release: | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| uses: ./.github/workflows/build-cpp.yml | |
| with: | |
| os: ${{ matrix.os }} | |
| build_type: 'Release' | |
| ci: | |
| needs: build-cpp-release | |
| strategy: | |
| matrix: | |
| include: | |
| - { os: ubuntu-latest } | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout TileDB-SOMA | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required to fetch tags: https://github.com/actions/checkout/issues/2199 | |
| fetch-tags: true # Tags used for Python package version. | |
| - name: Download pre-built C++ library | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: cpp-build-Release-${{ matrix.os }} | |
| - name: Restore Permissions | |
| run: chmod +x build/libtiledbsoma/test/* | |
| - name: Set Up Test Data | |
| run: make data | |
| - uses: ./.github/actions/setup-r | |
| with: | |
| os: ${{ matrix.os }} | |
| - name: Build Package | |
| run: cd apis/r && R CMD build --no-build-vignettes --no-manual . | |
| env: | |
| PKG_CONFIG_PATH: ${{ github.workspace }}/dist/lib/pkgconfig:${{ github.workspace }}/build/vcpkg_installed/lib/pkgconfig | |
| LDFLAGS: "-Wl,-rpath,${{ github.workspace }}/dist/lib -Wl,-rpath,${{ github.workspace }}/build/vcpkg_installed/lib" | |
| # Uncomment these next two stanzas as needed whenever we've just released a new tiledb-r for | |
| # which source is available but CRAN releases (and hence update r2u binaries) are not yet: | |
| # | |
| # IMPORTANT: these two stanzas should remain uncommented _only_ during the propagation time | |
| # between (a) publication of source for a new TileDB-R _upon which_ TileDB-SOMA depends in its | |
| # apis/R/DESCRIPTION file and (b) appearance of binaries. | |
| # | |
| # Please see https://github.com/single-cell-data/TileDB-SOMA/wiki/Branches-and-releases which | |
| # is crucial for anyone doing releases of TileDB-SOMA. | |
| # | |
| # Please edit both files in the same way: | |
| # * test-r.yml | |
| # * ci-r-python-interop.yml | |
| # | |
| # Do not remove these comments until such time as we have eliminated our dependency on | |
| # the TileDB-R package. | |
| #- name: Install r-universe build of tiledb-r (macOS) | |
| # if: ${{ matrix.os == 'macOS-latest' }} | |
| # run: cd apis/r && Rscript -e "install.packages('tiledb', repos = c('https://eddelbuettel.r-universe.dev', 'https://cloud.r-project.org'))" | |
| #- name: Install r-universe build of tiledb-r (linux) | |
| # if: ${{ matrix.os != 'macOS-latest' }} | |
| # run: cd apis/r && Rscript -e "options(bspm.version.check=TRUE); install.packages('tiledb', repos = c('https://eddelbuettel.r-universe.dev/bin/linux/jammy/4.3/', 'https://cloud.r-project.org'))" | |
| - name: Install Package | |
| run: cd apis/r && R CMD INSTALL $(ls -1tr *.tar.gz | tail -1) | |
| env: | |
| PKG_CONFIG_PATH: ${{ github.workspace }}/dist/lib/pkgconfig:${{ github.workspace }}/build/vcpkg_installed/lib/pkgconfig | |
| LDFLAGS: "-Wl,-rpath,${{ github.workspace }}/dist/lib -Wl,-rpath,${{ github.workspace }}/build/vcpkg_installed/lib" | |
| - name: Show R package versions | |
| run: Rscript -e 'tiledbsoma::show_package_versions()' | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| cache-dependency-path: ./apis/python/setup.py | |
| - name: Install tiledbsoma | |
| run: pip -v install -e apis/python[all] -C "--build-option=--no-tiledb-deprecated " | |
| - name: Show Python package versions | |
| run: | | |
| python -c 'import tiledbsoma; tiledbsoma.show_package_versions()' | |
| python scripts/show-versions.py | |
| - name: Interop tests | |
| run: python -m pytest apis/system/tests/ | |
| env: | |
| TILEDB_SOMA_INIT_BUFFER_BYTES: 33554432 # accommodate tiny runners | |
| _R_CHECK_TESTS_NLINES_: 0 |