Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches: [main]
tags:
- '*'

env:
FORCE_COLOR: 1

jobs:
Docs:
uses: tskit-dev/.github/.github/workflows/docs-build-template.yml@v1
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ on:
branches: [main, test]
tags: ['*']

env:
FORCE_COLOR: 1

jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v6.0.2
- name: Set up Python
uses: actions/setup-python@v5.4.0
uses: actions/setup-python@v6.1.0
with:
python-version: '3.12'
- name: Install dependencies and set up venv
Expand All @@ -36,10 +39,9 @@ jobs:
python docs/convert_changelog.py python/CHANGELOG.rst > PYTHON-CHANGELOG.txt
- name: Get the version
id: get_version
run:
echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
- name: C Release
uses: softprops/action-gh-release@v2.2.1
uses: softprops/action-gh-release@v2.5.0
if: startsWith(github.ref, 'refs/tags/') && contains(github.event.ref, 'C_')
with:
name: C API ${{ steps.get_version.outputs.VERSION }}
Expand All @@ -48,7 +50,7 @@ jobs:
fail_on_unmatched_files: True
files: build-gcc/meson-dist/*
- name: Python Release
uses: softprops/action-gh-release@v2.2.1
uses: softprops/action-gh-release@v2.5.0
if: startsWith(github.ref, 'refs/tags/') && !contains(github.event.ref, 'C_')
with:
name: Python ${{ steps.get_version.outputs.VERSION }}
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
push:
branches: [main, test]

env:
FORCE_COLOR: 1
jobs:
pre-commit:
name: Lint
Expand All @@ -24,12 +26,12 @@ jobs:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
uses: styfle/cancel-workflow-action@0.13.0
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v6.0.2

- name: Install OSX libs
if: matrix.os == 'macos-latest'
Expand All @@ -47,7 +49,7 @@ jobs:
cp ../c/tskit.h lib/.

- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python }}
version: "0.8.15"
Expand Down Expand Up @@ -78,7 +80,7 @@ jobs:
NUMBA_DISABLE_JIT=1 uv run --no-sync python -m pytest -x --cov=tskit --cov-report=xml --cov-branch -n2 tests/test_jit.py

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.4.0
uses: codecov/codecov-action@v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
working-directory: python
Expand All @@ -96,7 +98,7 @@ jobs:
fi

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.4.0
uses: codecov/codecov-action@v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
working-directory: python
Expand All @@ -114,20 +116,20 @@ jobs:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
uses: styfle/cancel-workflow-action@0.13.0
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v6.0.2

- name: Setup Python
uses: actions/setup-python@v5.4.0
uses: actions/setup-python@v6.1.0
with:
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7
with:
version: "0.8.15"

Expand All @@ -150,7 +152,7 @@ jobs:
uv run --no-sync python -m pytest -x --cov=tskit --cov-report=xml --cov-branch -n2 tests/test_lowlevel.py tests/test_highlevel.py

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.4.0
uses: codecov/codecov-action@v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
working-directory: python
Expand All @@ -172,12 +174,12 @@ jobs:
shell: msys2 {0}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
uses: styfle/cancel-workflow-action@0.13.0
with:
access_token: ${{ github.token }}

- name: 'Checkout'
uses: actions/checkout@v4.2.2
uses: actions/checkout@v6.0.2

- name: Setup MSYS2 ${{matrix.sys}}
uses: msys2/setup-msys2@v2.27.0
Expand Down
51 changes: 30 additions & 21 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@ on:
release:
types: [published]


env:
FORCE_COLOR: 1

jobs:
OSX:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python: ["3.10", 3.11, 3.12, 3.13]
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v6.0.2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5.4.0
uses: actions/setup-python@v6.1.0
with:
python-version: ${{ matrix.python }}
- name: Install deps
Expand All @@ -36,20 +41,21 @@ jobs:
pip install delocate
delocate-wheel -v dist/*.whl
- name: Upload Wheels
uses: actions/upload-artifact@v4.6.1
uses: actions/upload-artifact@v6.0.0
with:
name: osx-wheel-${{ matrix.python }}
path: python/dist

windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python: ["3.10", 3.11, 3.12, 3.13]
wordsize: [64]
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v6.0.2
- name: Install deps
env:
PYTHON: "py -${{ matrix.python }}-${{ matrix.wordsize }}"
Expand All @@ -74,7 +80,7 @@ jobs:
cp ../c/tskit.h lib/.
${PYTHON} -m build --wheel
- name: Upload Wheels
uses: actions/upload-artifact@v4.6.1
uses: actions/upload-artifact@v6.0.0
with:
name: win-wheel-${{ matrix.python }}-${{ matrix.wordsize }}
path: python/dist
Expand All @@ -83,10 +89,10 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v6.0.2

- name: Set up Python 3.10
uses: actions/setup-python@v5.4.0
uses: actions/setup-python@v6.1.0
with:
python-version: "3.10"

Expand All @@ -98,7 +104,7 @@ jobs:
python -m build --sdist

- name: Upload sdist
uses: actions/upload-artifact@v4.6.1
uses: actions/upload-artifact@v6.0.0
with:
name: sdist
path: python/dist
Expand All @@ -109,30 +115,31 @@ jobs:
docker run --rm -v `pwd`:/project -w /project quay.io/pypa/manylinux2014_x86_64 bash .github/workflows/docker/buildwheel.sh

- name: Upload Wheels
uses: actions/upload-artifact@v4.6.1
uses: actions/upload-artifact@v6.0.0
with:
name: linux-wheels
path: python/dist/wheelhouse

OSX-test:
needs: ['OSX']
strategy:
fail-fast: false
matrix:
python: ["3.10", 3.11, 3.12, 3.13]
runner: [macos-14, macos-15]
runner: [macos-15, macos-15-intel]
include:
- runner: macos-14
arch: x86_64
- runner: macos-15
arch: arm64
- runner: macos-15-intel
arch: x86_64
runs-on: ${{ matrix.runner }}
steps:
- name: Download wheels
uses: actions/download-artifact@v4.2.0
uses: actions/download-artifact@v7.0.0
with:
name: osx-wheel-${{ matrix.python }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5.4.0
uses: actions/setup-python@v6.1.0
with:
python-version: ${{ matrix.python }}
- name: Verify architecture
Expand All @@ -154,16 +161,17 @@ jobs:
needs: ['windows']
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python: ["3.10", 3.11, 3.12, 3.13]
wordsize: [64]
steps:
- name: Download wheels
uses: actions/download-artifact@v4.2.0
uses: actions/download-artifact@v7.0.0
with:
name: win-wheel-${{ matrix.python }}-${{ matrix.wordsize }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5.4.0
uses: actions/setup-python@v6.1.0
with:
python-version: ${{ matrix.python }}
- name: Install wheel and test
Expand All @@ -178,6 +186,7 @@ jobs:
runs-on: ubuntu-24.04
needs: ['manylinux']
strategy:
fail-fast: false
matrix:
python: ["3.10", 3.11, 3.12, 3.13]
include:
Expand All @@ -191,11 +200,11 @@ jobs:
wheel: cp313
steps:
- name: Download wheels
uses: actions/download-artifact@v4.2.0
uses: actions/download-artifact@v7.0.0
with:
name: linux-wheels
- name: Set up Python
uses: actions/setup-python@v5.4.0
uses: actions/setup-python@v6.1.0
with:
python-version: ${{ matrix.python }}
- name: Install wheel and test
Expand All @@ -213,16 +222,16 @@ jobs:
id-token: write
steps:
- name: Download all
uses: actions/download-artifact@v4.2.0
uses: actions/download-artifact@v7.0.0
- name: Move to dist
run: |
mkdir dist
cp */*.{whl,gz} dist/.
- name: Publish distribution to Test PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && !contains(github.event.ref, 'C_')
uses: pypa/gh-action-pypi-publish@v1.12.4
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution to PRODUCTION PyPI
if: github.event_name == 'release' && !startsWith(github.event.release.tag_name, 'C_')
uses: pypa/gh-action-pypi-publish@v1.12.4
uses: pypa/gh-action-pypi-publish@v1.13.0