Skip to content

Commit

Permalink
actions{cache,checkout,setup-python} upgrades (#2856)
Browse files Browse the repository at this point in the history
* CI: use `pip` directly (instead of `python -m pip`)

* CI: checkout@v4, setup-python@v5 cache@v4

* disable setup-python cache for lint/pre-commit

See actions/setup-python#919; setup-python cache likely doesn't help much here, as we only `pip install pre-commit`, and cache `~/.cache/pre-commit` separately using `actions/cache`.

* bump to codecov-action@v4

rm coverage/uploader pin added in #2827, per codecov/uploader#1673 (comment)

* `s/MacOS/macOS/

* fix typo from #2854
  • Loading branch information
ryan-williams committed Aug 8, 2024
1 parent 3fae283 commit 7742bff
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/libtiledb-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: macos-latest
steps:
- name: Checkout TileDB-SOMA
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build libTileDB-SOMA
run: TILEDBSOMA_COVERAGE="--coverage" ./scripts/bld --no-tiledb-deprecated=true
- name: Run libTileDB-SOMA unittests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v1
with:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/python-ci-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ jobs:
run: |
python --version
python -m venv ./venv-soma
./venv-soma/bin/python -m pip install --prefer-binary pybind11-global typeguard sparse wheel
./venv-soma/bin/python -m pip list
./venv-soma/bin/pip install --prefer-binary pybind11-global typeguard sparse wheel
./venv-soma/bin/pip list
- name: Build wheel
run: |
echo env vars: $LD_LIBRARY_PATH $PKG_CONFIG_PATH $TILEDB_PATH $TILEDBSOMA_PATH
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
exit 1
fi
- name: Install wheel
run: ./venv-soma/bin/python -m pip install --prefer-binary apis/python/dist/tiledbsoma-*.whl
run: ./venv-soma/bin/pip install --prefer-binary apis/python/dist/tiledbsoma-*.whl
- name: Check linking and RPATH
run: |
ldd ./venv-soma/lib/python*/site-packages/tiledbsoma/pytiledbsoma.*.so
Expand Down Expand Up @@ -201,8 +201,8 @@ jobs:
run: |
python --version
python -m venv ./venv-soma
./venv-soma/bin/python -m pip install --prefer-binary pybind11-global typeguard sparse wheel setuptools
./venv-soma/bin/python -m pip list
./venv-soma/bin/pip install --prefer-binary pybind11-global typeguard sparse wheel setuptools
./venv-soma/bin/pip list
- name: Build wheel
run: |
echo env vars: $DYLD_LIBRARY_PATH $PKG_CONFIG_PATH $TILEDB_PATH $TILEDBSOMA_PATH
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
exit 1
fi
- name: Install wheel
run: ./venv-soma/bin/python -m pip install --prefer-binary apis/python/dist/tiledbsoma-*.whl
run: ./venv-soma/bin/pip install --prefer-binary apis/python/dist/tiledbsoma-*.whl
- name: Check linking and RPATH
run: otool -L ./venv-soma/lib/python*/site-packages/tiledbsoma/pytiledbsoma.*.so
- name: Runtime test
Expand Down Expand Up @@ -302,8 +302,8 @@ jobs:
run: |
python --version
python -m venv ./venv-soma
./venv-soma/bin/python -m pip install --prefer-binary pybind11-global typeguard sparse wheel setuptools
./venv-soma/bin/python -m pip list
./venv-soma/bin/pip install --prefer-binary pybind11-global typeguard sparse wheel setuptools
./venv-soma/bin/pip list
- name: Install TileDB-SOMA-Py with setuptools and --libtiledbsoma
run: |
cd apis/python
Expand All @@ -323,7 +323,7 @@ jobs:
otool -L ./venv-soma/lib/python*/site-packages/tiledbsoma/pytiledbsoma.*.so
otool -l ./venv-soma/lib/python*/site-packages/tiledbsoma/pytiledbsoma.*.so
- name: Install runtime dependencies
run: ./venv-soma/bin/python -m pip install --prefer-binary `grep -v '^\[' apis/python/src/tiledbsoma.egg-info/requires.txt`
run: ./venv-soma/bin/pip install --prefer-binary `grep -v '^\[' apis/python/src/tiledbsoma.egg-info/requires.txt`
- name: Runtime test
run: ./venv-soma/bin/python -c "import tiledbsoma; print(tiledbsoma.pytiledbsoma.version())"

Expand Down Expand Up @@ -363,7 +363,7 @@ jobs:
with:
python-version: "3.11"
- name: Install dependencies
run: python -m pip install --prefer-binary pybind11 wheel
run: pip install --prefer-binary pybind11 wheel
- name: Build source tarball (sdist)
run: |
cd TileDB-SOMA/apis/python
Expand All @@ -378,5 +378,5 @@ jobs:
python setup.py bdist_wheel
- name: Install wheel
run: |
python -m pip install --prefer-binary tiledbsoma-*/dist/tiledbsoma-*.whl
pip install --prefer-binary tiledbsoma-*/dist/tiledbsoma-*.whl
python -c "import tiledbsoma; print(tiledbsoma.pytiledbsoma.version())"
25 changes: 11 additions & 14 deletions .github/workflows/python-ci-single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,24 @@ jobs:
runs-on: ${{ inputs.os }}
steps:
- name: Checkout TileDB-SOMA
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
cache: pip
cache-dependency-path: ./.github/workflows/python-ci-single.yml

- name: Restore pre-commit cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ inputs.os }}-${{ inputs.python_version }}-${{ hashFiles('.github/workflows/python-ci-single.yml', '.pre-commit-config.yaml') }}

- name: Install pre-commit
run: python -m pip -v install pre-commit
run: pip -v install pre-commit

- name: Log pip dependencies
run: python -m pip list
run: pip list

- name: Run pre-commit hooks on all files
run: pre-commit run -a -v
Expand Down Expand Up @@ -86,28 +84,28 @@ jobs:
xcode-version: '13.4'

- name: Checkout TileDB-SOMA
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # ensure we get all tags to inform package version determination

- name: Set up Python ${{ inputs.python_version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
cache: pip
cache-dependency-path: ./apis/python/setup.py

# Experiment for MacOS CI false negatives ...
# Experiment for macOS CI false negatives ...
# - name: Cache native libraries
# uses: actions/cache@v3
# uses: actions/cache@v4
# with:
# path: |
# build
# dist
# key: libtiledbsoma-build-dist-${{ inputs.os }}-${{ inputs.python_version }}-${{ hashFiles('libtiledbsoma', 'scripts/bld') }}

- name: Install tiledbsoma
run: python -m pip -v install -e apis/python[dev] -C "--build-option=--no-tiledb-deprecated"
run: pip -v install -e apis/python[dev] -C "--build-option=--no-tiledb-deprecated"
env:
CC: ${{ inputs.cc }}
CXX: ${{ inputs.cxx }}
Expand Down Expand Up @@ -140,7 +138,7 @@ jobs:

- name: Report coverage to Codecov
if: inputs.report_codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
flags: python
# Although Codecov isn't supposed to require an auth token for public repos like this one,
Expand All @@ -149,4 +147,3 @@ jobs:
# As of this writing (8 Nov 2022) the CODECOV_TOKEN was generated by @aaronwolen in his
# Codecov settings page for this repo, then filled into the GitHub Actions secrets.
token: ${{ secrets.CODECOV_TOKEN }}
version: 'v0.7.3'
4 changes: 2 additions & 2 deletions .github/workflows/python-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
echo matrix.platform: ${{ matrix.platform }}
echo matrix.arch: ${{ matrix.arch }}
# This bit is crucial since it's used to match up to a component of the wheel-file name
python -m pip install setuptools
pip install setuptools
python -c 'from distutils import util; print("distutil.util.get_platform:", util.get_platform())'
python -c 'import platform; print("platform.platform()", platform.platform())'
- name: Build wheels
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
fail-fast: false
steps:
- name: Set up Python ${{ matrix.python.dotted-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python.dotted-version }}
- name: Download artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/r-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- '!.pre-commit-config.yaml'
- '!apis/python/**'
- '!docs/**'
- '!LICENSE''
- '!LICENSE'
push:
branches:
- main
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Show matrix OS
run: echo "matrix.os:" ${{ matrix.os }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/r-python-interop-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout TileDB-SOMA
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # ensure we get all tags to inform package version determination

Expand Down Expand Up @@ -93,14 +93,14 @@ jobs:
run: Rscript -e 'tiledbsoma::show_package_versions()'

- name: Set up Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: ./apis/python/setup.py

- name: Install tiledbsoma
run: python -m pip -v install -e apis/python[dev] -C "--build-option=--no-tiledb-deprecated"
run: pip -v install -e apis/python[dev] -C "--build-option=--no-tiledb-deprecated"

- name: Show Python package versions
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/r-valgrind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
container:
image: rocker/r2u:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: SessionInfo
run: R -q -e 'sessionInfo()'
Expand Down

0 comments on commit 7742bff

Please sign in to comment.