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
78 changes: 78 additions & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build and Deploy to TestPyPI

on: workflow_dispatch

jobs:
build_wheels:
name: Build wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-15-intel is an Intel runner, macos-14 is Apple silicon
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
windows-latest,
windows-11-arm,
macos-15-intel,
macos-14,
]

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- name: Build wheels
uses: pypa/cibuildwheel@v3.4.0
with:
extras: "uv"

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build Source Distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false

- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
with:
version: "0.11.20"

- name: Build sdist
run: uvx --from build pyproject-build
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

upload_pypi:
name: Publish to PyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/respondpy/
permissions:
id-token: write
steps:
- name: Download wheel artifacts
uses: actions/download-artifact@v5
with:
path: dist
pattern: cibw-*
merge-multiple: true

- name: Publish distributions to PyPI with attestations
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist
attestations: true
95 changes: 95 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Smoke Testing, Unit Testing, and Code Coverage

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
smoke-testing:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.shell }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
shell: bash
- os: windows-latest
shell: pwsh
- os: macos-latest
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v6

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

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install dependencies
run: uv sync --group github

- name: Run smoke tests
run: uv run pytest -m smoke

unit-testing:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

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

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install dependencies
run: uv sync --group github

- name: Run tests
run: uv run pytest -m unit

code-coverage:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

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

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Install dependencies
run: uv sync --group github

- name: Run tests with coverage
run: uv run pytest --cov=respondpy --cov-report=term-missing --cov-report=xml tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: SyndemicsLab/respondpy
40 changes: 0 additions & 40 deletions .github/workflows/tests.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.vscode
None
wheelhouse
_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(RESPONDPY LANGUAGES CXX)

include(FetchContent)

set(CMAKE_CXX_STANDARD 17 CACHE STRING "The C++ standard to compile with, 17")
set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to compile with, 20")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down Expand Up @@ -62,7 +62,7 @@ set(SPDLOG_INSTALL ON)
FetchContent_Declare(
respond
GIT_REPOSITORY https://github.com/SyndemicsLab/respond.git
GIT_TAG 6a134d60fefd54b00f433c4814f4c4bcb9eace9a
GIT_TAG dde215f20e921e0d52a9f749cd14e91c925b18ac
OVERRIDE_FIND_PACKAGE
)
set(RESPOND_BUILD_DOCS OFF)
Expand Down
Loading
Loading