-
Notifications
You must be signed in to change notification settings - Fork 2
128 lines (117 loc) · 3.79 KB
/
Copy pathrust.yml
File metadata and controls
128 lines (117 loc) · 3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Rust
on:
push:
branches: [ "master", "release/*" ]
tags:
- 'v*'
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Bash syntax check
run: |
for f in dictee dictee-switch-backend dictee-test-rules; do
echo "Checking $f..."
bash -n "$f"
done
- name: Python syntax check
run: |
for f in dictee-setup.py dictee-tray.py dictee-ptt.py dictee-postprocess.py dictee-transcribe.py dictee_models.py; do
echo "Checking $f..."
python3 -m py_compile "$f"
done
- name: Gettext locale check
run: |
sudo apt-get install -y gettext > /dev/null
for f in po/*.po; do
echo "Checking $f..."
msgfmt --check --output=/dev/null "$f"
done
test-postprocess:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Python test deps
run: python3 -m pip install --user text2num
- name: Run postprocess tests
run: python3 tests/test-postprocess.py -v
env:
XDG_CONFIG_HOME: /tmp/dictee-ci-noconfig
test-apply-continuation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Run apply_continuation tests
run: bash tests/test-apply-continuation.sh
test-transcribe-routing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Run dictee-transcribe routing tests
run: python3 tests/test-transcribe-routing.py -v
packaging-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install PyYAML
run: python3 -m pip install --user pyyaml
- name: Audit packaging deps manifest vs builders
run: python3 packaging/audit-deps.py
test-install-arch-source:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Verify the Arch installer resolves to an existing source tarball
# Guards against issue #17: the Arch install path must clone a ref
# whose PKGBUILD _tag points at a tarball that actually exists (HTTP
# 200). Catches a master bump to an unreleased version, a stale
# hard-coded branch, or any tag/_tag mismatch — before users hit it.
run: bash tests/test-install-arch-source.sh
test-x86:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
test-arm64:
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
release:
needs: [lint, test-postprocess, test-apply-continuation, test-transcribe-routing, packaging-audit, test-install-arch-source, test-x86, test-arm64]
# Disabled: dictee ships locally-built CUDA assets that CI cannot produce,
# so a tag push must NOT auto-publish an empty release (it would also flip
# the GitHub "Latest" pointer and break install.sh's asset lookup for
# everyone). Releases are published manually via `gh` with the local
# .dev/dist/ assets. Re-enable only once CI can build+upload the assets.
if: false && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Create Release
uses: softprops/action-gh-release@v3
with:
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}