Skip to content

Commit 2b59239

Browse files
chore(deps): use lizardbyte-common for python helpers (#202)
1 parent 981e85b commit 2b59239

6 files changed

Lines changed: 33 additions & 69 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ concurrency:
1212
group: "${{ github.workflow }}-${{ github.ref }}"
1313
cancel-in-progress: true
1414

15+
env:
16+
PYTHON_VERSION: '3.14'
17+
1518
jobs:
1619
setup_release:
1720
name: Setup Release
@@ -117,21 +120,21 @@ jobs:
117120
id: setup-python
118121
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
119122
with:
120-
python-version: '3.14'
123+
python-version: ${{ env.PYTHON_VERSION }}
121124

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

132-
# step output
133-
echo "python-path=${python_path}"
134-
echo "python-path=${python_path}" >> $GITHUB_OUTPUT
130+
- name: Sync Python tools
131+
env:
132+
MSYS2_PATH_TYPE: inherit
133+
UV_PYTHON: ${{ steps.setup-python.outputs.python-path }}
134+
run: |
135+
uv sync --project third-party/lizardbyte-common --locked --only-group test-c \
136+
--no-python-downloads \
137+
--no-install-project
135138
136139
- name: Build
137140
run: |
@@ -163,9 +166,10 @@ jobs:
163166
if: >-
164167
always() &&
165168
(steps.test.outcome == 'success' || steps.test.outcome == 'failure')
169+
env:
170+
MSYS2_PATH_TYPE: inherit
166171
run: |
167-
${{ steps.python-path.outputs.python-path }} -m pip install ".[test]"
168-
${{ steps.python-path.outputs.python-path }} -m gcovr ${CMAKE_BUILD} -r . \
172+
uv run --project third-party/lizardbyte-common --locked --no-sync gcovr ${CMAKE_BUILD} -r . \
169173
--filter src \
170174
--exclude-noncode-lines \
171175
--exclude-throw-branches \

.gitmodules

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
path = third-party/googletest
1313
url = https://github.com/google/googletest.git
1414
shallow = true
15+
[submodule "third-party/lizardbyte-common"]
16+
path = third-party/lizardbyte-common
17+
url = https://github.com/LizardByte/lizardbyte-common.git
18+
branch = master
19+
shallow = true
1520
[submodule "third-party/moonlight-common-c"]
1621
path = third-party/moonlight-common-c
1722
url = https://github.com/ReenigneArcher/moonlight-common-c.git

pyproject.toml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[project]
66
name = "Moonlight-XboxOG"
77
dynamic = ["version"]
8-
description = "Helper scripts for Moonlight-XboxOG"
8+
description = "Python tooling for Moonlight-XboxOG"
99
requires-python = ">=3.14"
1010
license = {text = "GPL-3.0-only"}
1111
authors = [
@@ -14,20 +14,6 @@ authors = [
1414

1515
dependencies = []
1616

17-
[project.optional-dependencies]
18-
lint = [
19-
"clang-format==20.*",
20-
"flake8==7.3.0",
21-
]
22-
23-
locale = [
24-
"Babel==2.18.0",
25-
]
26-
27-
test = [
28-
"gcovr==8.6",
29-
]
30-
3117
[project.urls]
3218
Homepage = "https://app.lizardbyte.dev"
3319
Repository = "https://github.com/LizardByte/Moonlight-XboxOG"

scripts/update_clang_format.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

third-party/lizardbyte-common

Submodule lizardbyte-common added at c049430

uv.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)