Skip to content

Commit

Permalink
chg: dev: update workflows and tox file, actions and newer python
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen L Arnold <nerdboy@gentoo.org>
  • Loading branch information
sarnold committed Dec 19, 2022
1 parent 0c2c7c4 commit eac47af
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 42 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']

steps:
- name: Set git crlf/eol
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true

- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -47,13 +47,11 @@ jobs:
echo "HAVE_LIBDATRIE_PKG is ${HAVE_LIBDATRIE_PKG}"
echo "HAVE_LIBDATRIE_PKG=${HAVE_LIBDATRIE_PKG}" >> $GITHUB_ENV
- name: Install deps with apt helper action
- name: Install deps with apt
if: runner.os == 'Linux'
uses: ryankurte/action-apt@v0.2.0
with:
# architectures to pass to dpkg --add-architecture
#architectures: # optional
packages: pybind11-dev libdatrie-dev
run: |
sudo apt-get -qq update
sudo apt-get install -y libdatrie-dev
- name: Install macos deps with brew
if: runner.os == 'macOS'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-2016, macos-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']

runs-on: ${{ matrix.platform }}

Expand All @@ -23,13 +23,13 @@ jobs:
shell: "bash -l {0}"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true

- name: Cache conda
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key: ${{matrix.os}}-conda-pkgs-${{hashFiles('**/conda.recipe/meta.yaml')}}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

Expand All @@ -25,7 +25,7 @@ jobs:
- name: Check metadata
run: pipx run twine check dist/*

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

Expand All @@ -38,7 +38,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

Expand All @@ -58,7 +58,7 @@ jobs:
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl

Expand All @@ -73,12 +73,12 @@ jobs:
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo ${{ env.VERSION }}
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

# download all artifacts to project dir
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
Expand All @@ -94,7 +94,7 @@ jobs:

- name: Create draft release
id: create_release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -114,7 +114,7 @@ jobs:
## alternatively, to publish when a GitHub Release is created, use the following rule:
## if: github.event_name == 'release' && github.event.action == 'published'
#steps:
#- uses: actions/download-artifact@v2
#- uses: actions/download-artifact@v3
#with:
#name: artifact
#path: dist
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ jobs:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-20.04]
python-version: ["3.6", "3.7", "3.8", "3.9"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]

runs-on: ${{ matrix.platform }}
env:
CMAKE_BUILD_OVERRIDE: Release

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# disabled here so sdist is clean
#with:
#submodules: true
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Check metadata
run: pipx run twine check dist/*

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.tar.gz
Expand All @@ -41,7 +41,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

Expand All @@ -53,15 +53,15 @@ jobs:
CIBW_TEST_SKIP: "*universal2:arm64"
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND: pytest {project}/tests
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.09
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.14
#CIBW_ENVIRONMENT_WINDOWS: 'CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake'

- name: Verify clean directory
run: git diff --exit-code
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: wheelhouse/*.whl
Expand All @@ -71,9 +71,9 @@ jobs:
needs: [build]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3

- name: Check/display number of downloaded artifacts
run: .github/workflows/wheel-check.sh 38
run: .github/workflows/wheel-check.sh 36
shell: bash
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ requires = [
"setuptools>=42",
"wheel",
"Cython>=0.20",
"pybind11>=2.6.1",
"ninja; sys_platform != 'win32' and platform_machine != 'arm64'",
"pybind11>=2.7.1",
"ninja; sys_platform != 'win32'",
"cmake>=3.15",
]

Expand Down
22 changes: 13 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
[tox]
envlist = py3{6,7,8,9}-{linux,macos,windows}
envlist = py3{6,7,8,9,10,11}-{linux,macos,windows}
skip_missing_interpreters = true
#isolated_build = true
skipsdist = true

[gh-actions]
python =
3.6 = py36
3.7 = py37
3.8 = py38
3.9 = py39
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311

[gh-actions:env]
PLATFORM =
Expand Down Expand Up @@ -86,7 +88,7 @@ deps =

commands=
#python -m pip install -e .[test]
python -m pip --use-feature=in-tree-build install --verbose -e .[test]
python -m pip install --verbose -e .[test]
python -m pytest -v []

[testenv:deploy]
Expand Down Expand Up @@ -118,15 +120,17 @@ skip_install = true
passenv =
CI
PYTHONIOENCODING
PIP_DOWNLOAD_CACHE

allowlist_externals =
bash

deps =
pip>=20.0.1
pytest
hypothesis

commands_pre =
pip install datrie --force-reinstall --pre --prefer-binary -f dist/
bash -c 'pip install --pre --force-reinstall dist/*.whl'

commands =
pytest -v
Expand Down Expand Up @@ -173,7 +177,7 @@ commands =
[testenv:clean]
skip_install = true

whitelist_externals =
allowlist_externals =
bash

deps =
Expand Down

0 comments on commit eac47af

Please sign in to comment.