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
31 changes: 16 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

env:
PYTHON_VERSION: '3.14'

jobs:
setup_release:
name: Setup Release
Expand Down Expand Up @@ -173,21 +176,18 @@ jobs:
id: setup-python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.14'
python-version: ${{ env.PYTHON_VERSION }}

- name: Python Path
id: python-path
run: |
if [ "${{ runner.os }}" = "Windows" ]; then
# replace backslashes with double backslashes
python_path=$(echo "${{ steps.setup-python.outputs.python-path }}" | sed 's/\\/\\\\/g')
else
python_path=${{ steps.setup-python.outputs.python-path }}
fi
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true

# step output
echo "python-path=${python_path}"
echo "python-path=${python_path}" >> "${GITHUB_OUTPUT}"
- name: Sync Python tools
env:
MSYS2_PATH_TYPE: inherit
UV_PYTHON: ${{ steps.setup-python.outputs.python-path }}
run: uv sync --locked

- name: Configure
run: |
Expand Down Expand Up @@ -271,9 +271,10 @@ jobs:
always() &&
(steps.test.outcome == 'success' || steps.test.outcome == 'failure')
working-directory: build
env:
MSYS2_PATH_TYPE: inherit
run: |
${{ steps.python-path.outputs.python-path }} -m pip install gcovr
${{ steps.python-path.outputs.python-path }} -m gcovr . -r ../src \
uv run --locked gcovr . -r ../src \
--exclude-noncode-lines \
--exclude-throw-branches \
--exclude-unreachable-branches \
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
# VSCode IDE
.vscode/

# Python
.venv/

# build directories
build/
cmake-*/
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ cmake -G Ninja -B build -S .
ninja -C build
```

## Python Tooling

Install [uv](https://docs.astral.sh/uv/) to sync and run the Python tools:

```bash
uv sync
uv run python scripts/update_clang_format.py
```

## Demo

Execute the `tray_example` application:
Expand Down
13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[project]
name = "tray"
version = "0.0.0"
description = "A cross-platform system tray library"
readme = "README.md"
requires-python = ">=3.14"
dependencies = []

[dependency-groups]
dev = [
"clang-format==21.*",
"gcovr==8.6",
]
1 change: 0 additions & 1 deletion scripts/requirements.txt

This file was deleted.

Loading
Loading