Skip to content

Commit 3c9c1ce

Browse files
committed
feat: release Doubao Say 1.0.0
0 parents  commit 3c9c1ce

141 files changed

Lines changed: 12950 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.coveragerc‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[run]
2+
branch = True
3+
source = doubao_input
4+
5+
[report]
6+
# This is an honest whole-package branch-coverage floor. GTK/WebKit and physical
7+
# device paths remain included; raise it as those seams become testable.
8+
exclude_also =
9+
if __name__ == .__main__.:
10+
pragma: no cover
11+
show_missing = True
12+
skip_covered = True
13+
fail_under = 55
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Bug report
2+
description: Report a reproducible application or installation problem
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: "Never attach API keys, cookies, login files, personal transcripts or unreviewed logs. For security concerns, start with a high-level description; see SECURITY.md."
7+
- type: input
8+
id: version
9+
attributes:
10+
label: Version and installation method
11+
placeholder: "1.0.0, app archive or Omarchy plugin"
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: environment
16+
attributes:
17+
label: Environment
18+
description: Distribution, Python version, compositor, keyboard and microphone backend.
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: reproduce
23+
attributes:
24+
label: Reproduction, expected and actual behavior
25+
description: Use a non-sensitive sample sentence and a plain text editor.
26+
validations:
27+
required: true

‎.github/pull_request_template.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Problem and approach
2+
3+
Describe the behavior and why this change belongs in the Doubao-only client.
4+
5+
## Validation
6+
7+
- [ ] `make check` passes
8+
- [ ] Regression tests added where appropriate
9+
- [ ] English/Chinese strings and documentation kept in sync
10+
- [ ] No credentials, personal transcripts, logs or recordings included
11+
- [ ] Manual test scope and untested desktop/platform combinations stated
12+
13+
## Risks / compatibility
14+
15+
Mention settings migration, startup ownership, permissions and packaging impact.

‎.github/workflows/release.yml‎

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ["v*.*.*"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
verify:
13+
name: Verify release source
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 25
16+
steps:
17+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
18+
with:
19+
fetch-depth: 0
20+
persist-credentials: false
21+
- name: Require tag and product versions to match
22+
run: |
23+
if [ "${GITHUB_EVENT_NAME}" = push ]; then
24+
python3 packaging/version_check.py --tag "${GITHUB_REF_NAME}"
25+
else
26+
python3 packaging/version_check.py
27+
fi
28+
- name: Install test environment
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y python3-gi python3-cairo gir1.2-gtk-4.0 python3-venv libportaudio2
32+
/usr/bin/python3 -m venv --system-site-packages .venv
33+
.venv/bin/pip install -r packaging/runtime-requirements.txt -r requirements-dev.txt
34+
- name: Run release gates
35+
run: |
36+
make check
37+
make coverage
38+
- name: Download pinned secret scanner
39+
working-directory: ${{ runner.temp }}
40+
run: |
41+
curl --fail --location --proto '=https' --tlsv1.2 --output gitleaks.tar.gz https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz
42+
echo '551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb gitleaks.tar.gz' | sha256sum --check
43+
tar -xzf gitleaks.tar.gz gitleaks
44+
- name: Scan history and checkout
45+
run: |
46+
"$RUNNER_TEMP/gitleaks" git . --log-opts=--all --redact --no-banner
47+
"$RUNNER_TEMP/gitleaks" dir . --redact --no-banner
48+
49+
build:
50+
name: Build / Python ${{ matrix.python }}
51+
needs: verify
52+
runs-on: ubuntu-latest
53+
timeout-minutes: 20
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
python: ["3.11", "3.12", "3.13", "3.14"]
58+
steps:
59+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
60+
with:
61+
persist-credentials: false
62+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
63+
with:
64+
python-version: ${{ matrix.python }}
65+
cache: pip
66+
- name: Build offline app and plugin archives
67+
run: |
68+
python -m pip wheel --wheel-dir dist/wheelhouse -r packaging/runtime-requirements.txt
69+
python packaging/build-release.py
70+
- name: Verify archive checksums
71+
working-directory: dist
72+
run: sha256sum --check SHA256SUMS
73+
- name: Upload archives
74+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
75+
with:
76+
name: release-python-${{ matrix.python }}
77+
path: dist/doubao-say-*.tar.gz
78+
if-no-files-found: error
79+
retention-days: 14
80+
81+
smoke-install:
82+
name: Install built Python 3.12 archive
83+
needs: build
84+
runs-on: ubuntu-latest
85+
timeout-minutes: 15
86+
steps:
87+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
88+
with:
89+
persist-credentials: false
90+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
91+
with:
92+
name: release-python-3.12
93+
path: dist
94+
- name: Install desktop runtime dependencies
95+
run: |
96+
sudo apt-get update
97+
sudo apt-get install -y \
98+
gir1.2-gtk-4.0 gir1.2-webkit-6.0 gobject-introspection \
99+
libgirepository1.0-dev libgtk-4-dev libportaudio2 libwayland-dev \
100+
meson ninja-build pipewire-bin python3-cairo python3-gi python3-venv \
101+
wayland-protocols wl-clipboard
102+
layer_dir="$RUNNER_TEMP/gtk4-layer-shell"
103+
mkdir -p "$layer_dir"
104+
curl --fail --location --proto '=https' --tlsv1.2 \
105+
--output "$layer_dir/source.tar.gz" \
106+
https://github.com/wmww/gtk4-layer-shell/archive/536ff516ed68b9bb34afc4c07f942a54b2b4b03f.tar.gz
107+
echo 'f4c4fd455f5605c7b93b305b6be28990f0f7170968fb2714bf362477f918c4bc source.tar.gz' \
108+
| (cd "$layer_dir" && sha256sum --check)
109+
tar -xzf "$layer_dir/source.tar.gz" -C "$layer_dir"
110+
meson setup "$layer_dir/build" \
111+
"$layer_dir/gtk4-layer-shell-536ff516ed68b9bb34afc4c07f942a54b2b4b03f" \
112+
--prefix=/usr -Ddocs=false -Dexamples=false -Dtests=false -Dvapi=false
113+
sudo meson install -C "$layer_dir/build"
114+
- name: Install, upgrade and uninstall in isolated user directories
115+
working-directory: dist
116+
run: |
117+
app_archive=(doubao-say-*-app-linux-*.tar.gz)
118+
test "${#app_archive[@]}" -eq 1
119+
/usr/bin/python3 ../tests/manual_clean_install.py "${app_archive[0]}"
120+
121+
publish:
122+
name: Publish GitHub release
123+
if: github.event_name == 'push'
124+
needs: [build, smoke-install]
125+
runs-on: ubuntu-latest
126+
timeout-minutes: 10
127+
permissions:
128+
contents: write
129+
steps:
130+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
131+
with:
132+
persist-credentials: false
133+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
134+
with:
135+
pattern: release-python-*
136+
path: release-assets
137+
merge-multiple: true
138+
- name: Create checksums
139+
working-directory: release-assets
140+
run: sha256sum doubao-say-*.tar.gz > SHA256SUMS
141+
- name: Publish immutable tag assets
142+
env:
143+
GH_TOKEN: ${{ github.token }}
144+
run: |
145+
gh release create "${GITHUB_REF_NAME}" release-assets/* \
146+
--verify-tag --title "Doubao Say ${GITHUB_REF_NAME#v}" --generate-notes

‎.github/workflows/secrets.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Secret scanning
2+
on: [push, pull_request]
3+
permissions:
4+
contents: read
5+
jobs:
6+
secrets:
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 10
9+
steps:
10+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
11+
with:
12+
fetch-depth: 0
13+
persist-credentials: false
14+
- name: Download pinned scanner and verify checksum
15+
working-directory: ${{ runner.temp }}
16+
run: |
17+
curl --fail --location --proto '=https' --tlsv1.2 --output gitleaks.tar.gz https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz
18+
echo '551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb gitleaks.tar.gz' | sha256sum --check
19+
tar -xzf gitleaks.tar.gz gitleaks
20+
- name: Scan history and checkout (redacted; no reports uploaded)
21+
run: |
22+
"$RUNNER_TEMP/gitleaks" git . --log-opts=--all --redact --no-banner
23+
"$RUNNER_TEMP/gitleaks" dir . --redact --no-banner

‎.github/workflows/tests.yml‎

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
concurrency:
9+
group: tests-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
core-compatibility:
14+
name: Core / Python ${{ matrix.python }}
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 15
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python: ["3.11", "3.12", "3.13", "3.14"]
21+
steps:
22+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
23+
with:
24+
persist-credentials: false
25+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
26+
with:
27+
python-version: ${{ matrix.python }}
28+
cache: pip
29+
- name: Install core dependencies
30+
run: python -m pip install -r packaging/runtime-requirements.txt
31+
- name: Test platform-independent behavior
32+
env:
33+
PYTHONPATH: src:tests
34+
run: |
35+
python -m unittest -v \
36+
tests.test_delivery tests.test_gesture tests.test_input_worker \
37+
tests.test_manual_safety tests.test_plugin_launch tests.test_polish \
38+
tests.test_polish_preview tests.test_reasoning tests.test_settings \
39+
tests.test_updates tests.test_version_check tests.test_voice_motion
40+
python -m compileall -q src/doubao_input packaging
41+
42+
full-suite:
43+
name: Full suite and coverage
44+
runs-on: ubuntu-latest
45+
timeout-minutes: 20
46+
steps:
47+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
48+
with:
49+
persist-credentials: false
50+
- name: Install GTK test environment
51+
run: |
52+
sudo apt-get update
53+
sudo apt-get install -y python3-gi python3-cairo gir1.2-gtk-4.0 python3-venv libportaudio2
54+
/usr/bin/python3 -m venv --system-site-packages .venv
55+
.venv/bin/pip install -r packaging/runtime-requirements.txt -r requirements-dev.txt
56+
- name: Lint, test and enforce branch coverage
57+
run: |
58+
make lint
59+
make coverage
60+
make compile
61+
git show --format= --check HEAD
62+
- name: Upload coverage report
63+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
64+
with:
65+
name: coverage-xml
66+
path: coverage.xml
67+
if-no-files-found: error
68+
retention-days: 14
69+
70+
source-package:
71+
name: Source and package contract
72+
runs-on: ubuntu-latest
73+
timeout-minutes: 10
74+
steps:
75+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
76+
with:
77+
persist-credentials: false
78+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
79+
with:
80+
python-version: "3.11"
81+
- name: Validate version and package tests
82+
env:
83+
PYTHONPATH: src:packaging
84+
run: |
85+
python packaging/version_check.py
86+
python -m unittest -v tests.test_release tests.test_marketplace tests.test_version_check

0 commit comments

Comments
 (0)