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
6 changes: 4 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ on:
env:
FORCE_COLOR: 1

permissions:
contents: read

jobs:
Docs:
uses: tskit-dev/.github/.github/workflows/docs.yml@v17
uses: tskit-dev/.github/.github/workflows/docs.yml@v20
with:
pyproject-directory: python
additional-apt-packages: doxygen
pre-build-command: cd docs/doxygen && doxygen
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ name: Lint
on:
pull_request:

permissions:
contents: read

jobs:
Lint:
uses: tskit-dev/.github/.github/workflows/lint.yml@v17
uses: tskit-dev/.github/.github/workflows/lint.yml@v19
with:
pyproject-directory: python
16 changes: 13 additions & 3 deletions .github/workflows/release-c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@ name: Publish C API release

on: push

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libcunit1-dev

- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
version: "0.10.0"
enable-cache: false

- name: Install meson
run: uv tool install meson==1.10.1
Expand All @@ -36,7 +44,9 @@ jobs:
meson dist

- name: Release
uses: softprops/action-gh-release@v2.2.1
# zizmor: ignore[superfluous-actions] this action handles draft
# releases and glob-based multi-file uploads beyond plain `gh release`.
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
if: startsWith(github.ref, 'refs/tags/') && contains(github.event.ref, 'C_')
with:
draft: True
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,45 @@ on:
branches: [main, test]
merge_group:

permissions:
contents: read

jobs:

packaging:
name: Python packaging
uses: tskit-dev/.github/.github/workflows/python-packaging.yml@v17
uses: tskit-dev/.github/.github/workflows/python-packaging.yml@v19
with:
pyproject-directory: python
cli-test-cmd: kastore --help

test-c:
name: C tests
uses: tskit-dev/.github/.github/workflows/c-tests.yml@v17
uses: tskit-dev/.github/.github/workflows/c-tests.yml@v19
with:
library-directory: c
secrets: inherit
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test-python-c:
name: Python-C tests
uses: tskit-dev/.github/.github/workflows/python-c-tests.yml@v17
uses: tskit-dev/.github/.github/workflows/python-c-tests.yml@v19
with:
tests: python/tests/test_python_c.py
pyproject-directory: python
secrets: inherit
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test:
name: Python
uses: tskit-dev/.github/.github/workflows/python-tests.yml@v17
uses: tskit-dev/.github/.github/workflows/python-tests.yml@v19
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python }}
pyproject-directory: python
coverage-directory: python/kastore
secrets: inherit
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
strategy:
matrix:
python: [ 3.11, 3.14 ]
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ on:
release:
types: [published]

permissions:
contents: read

jobs:
build-wheels:
if: "!startsWith(github.ref, 'refs/tags/C_')"
uses: tskit-dev/.github/.github/workflows/build-wheels.yml@v17
uses: tskit-dev/.github/.github/workflows/build-wheels.yml@v19
with:
pyproject-directory: python

Expand All @@ -21,7 +24,7 @@ jobs:
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v7.0.0
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: build-*
path: dist
Expand All @@ -32,11 +35,11 @@ jobs:

- name: Publish distribution to Test PyPI
if: github.event_name == 'push' && github.ref_name == 'test-publish'
uses: pypa/gh-action-pypi-publish@v1.13.0
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
repository-url: https://test.pypi.org/legacy/
verbose: true

- name: Publish distribution to Production PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@v1.13.0
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
9 changes: 9 additions & 0 deletions .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# zizmor configuration for tskit-dev repos.
# Third-party actions must be hash-pinned; first-party tskit-dev reusable
# workflows are trusted and may stay pinned to a version tag (e.g. @v17).
rules:
unpinned-uses:
config:
policies:
tskit-dev/*: ref-pin
"*": hash-pin
13 changes: 13 additions & 0 deletions prek.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,16 @@ hooks = [
verbose = true,
},
]

[[repos]]
repo = "local"
hooks = [
{
id = "zizmor",
name = "zizmor",
language = "system",
entry = "uv run --project=python --only-group=lint zizmor",
files = "^\\.github/workflows/.*\\.ya?ml$",
pass_filenames = true,
},
]
1 change: 1 addition & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ lint = [
"clang-format==21.1.8",
"ruff==0.15.1",
"prek==0.3.3",
"zizmor==1.26.1",
]

packaging = [
Expand Down
22 changes: 22 additions & 0 deletions python/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading