Skip to content

Commit fa27740

Browse files
author
ryu-mirror[bot]
committed
mirror: ryu-predict source @ 1ec31ba8
0 parents  commit fa27740

16 files changed

Lines changed: 3093 additions & 0 deletions

File tree

.env.example

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Ryu Predict (apps-store/predict) — environment configuration
2+
#
3+
# System-wide predictive-typing companion (Win32/UIA): inline ghost text, Tab to
4+
# accept. Core owns the brain (/api/predict/complete). EVERYTHING here is
5+
# OPTIONAL.
6+
7+
# Local Core node base URL. Default: http://127.0.0.1:7980
8+
# RYU_CORE_URL=http://127.0.0.1:7980
9+
10+
# Bearer token when Core node auth is enabled (same as RYU_TOKEN on the node).
11+
# RYU_TOKEN=

.github/workflows/canary.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# GENERATED by tools/mirror-satellites.sh — edit there, not here.
2+
name: canary
3+
4+
on:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
concurrency:
13+
group: canary
14+
cancel-in-progress: true
15+
16+
jobs:
17+
prepare:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Reset the rolling canary prerelease
22+
env:
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
set -euo pipefail
26+
gh release delete canary --yes --cleanup-tag || true
27+
{
28+
printf '## Canary build `%s`\n\n' "${GITHUB_SHA:0:7}"
29+
printf 'Rolling **canary** build of `ryu-predict` from `main` — not a stable release.\n\n'
30+
printf 'Built from commit %s.\n\n' "${GITHUB_SHA}"
31+
printf 'Installed Ryu nodes never auto-update onto rolling builds; the updater only\n'
32+
printf 'tracks the latest tagged v* release. Use the tagged releases for anything real.\n'
33+
} > notes.md
34+
gh release create canary --prerelease --target "$GITHUB_SHA" \
35+
--title "Canary (${GITHUB_SHA:0:7})" --notes-file notes.md
36+
37+
build:
38+
needs: prepare
39+
name: ${{ matrix.os }}
40+
runs-on: ${{ matrix.os }}
41+
env:
42+
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
os: [ubuntu-latest, macos-latest, windows-latest]
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: dtolnay/rust-toolchain@stable
50+
- uses: Swatinem/rust-cache@v2
51+
with:
52+
workspaces: .
53+
- name: Linux build deps
54+
if: runner.os == 'Linux'
55+
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
56+
- name: Build
57+
run: cargo build --release --manifest-path Cargo.toml
58+
- name: Package
59+
shell: bash
60+
run: |
61+
set -euo pipefail
62+
ext=""; [ "${{ runner.os }}" = "Windows" ] && ext=".exe"
63+
case "${{ runner.os }}" in
64+
Linux) plat="linux-x86_64" ;;
65+
macOS) plat="macos-aarch64" ;;
66+
Windows) plat="windows-x86_64" ;;
67+
esac
68+
mkdir -p dist
69+
cp "target/release/ryu-predict${ext}" "dist/ryu-predict-${plat}${ext}"
70+
( cd dist
71+
if command -v sha256sum >/dev/null 2>&1; then sha256sum "ryu-predict-${plat}${ext}" > "ryu-predict-${plat}${ext}.sha256"
72+
elif command -v shasum >/dev/null 2>&1; then shasum -a 256 "ryu-predict-${plat}${ext}" > "ryu-predict-${plat}${ext}.sha256"; fi )
73+
# gh release upload, NOT softprops: softprops PATCHes the release even
74+
# when it is only ADDING assets, and that PATCH is refused for the App
75+
# token ("Resource not accessible by integration") despite Contents:
76+
# write. The assets endpoint on its own is permitted.
77+
- name: Upload to release
78+
env:
79+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
TAG: canary
81+
shell: bash
82+
run: |
83+
set -euo pipefail
84+
shopt -s nullglob
85+
files=(dist/*)
86+
if [ ${#files[@]} -eq 0 ]; then
87+
echo "no files matched" >&2; exit 1
88+
fi
89+
gh release upload "$TAG" "${files[@]}" --clobber

.github/workflows/nightly.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# GENERATED by tools/mirror-satellites.sh — edit there, not here.
2+
name: nightly
3+
4+
on:
5+
schedule:
6+
- cron: "0 3 * * *"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
concurrency:
13+
group: nightly
14+
cancel-in-progress: true
15+
16+
jobs:
17+
prepare:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Reset the rolling nightly prerelease
22+
env:
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
set -euo pipefail
26+
gh release delete nightly --yes --cleanup-tag || true
27+
{
28+
printf '## Nightly build `%s`\n\n' "${GITHUB_SHA:0:7}"
29+
printf 'Rolling **nightly** build of `ryu-predict` from `main` — not a stable release.\n\n'
30+
printf 'Built from commit %s.\n\n' "${GITHUB_SHA}"
31+
printf 'Installed Ryu nodes never auto-update onto rolling builds; the updater only\n'
32+
printf 'tracks the latest tagged v* release. Use the tagged releases for anything real.\n'
33+
} > notes.md
34+
gh release create nightly --prerelease --target "$GITHUB_SHA" \
35+
--title "Nightly (${GITHUB_SHA:0:7})" --notes-file notes.md
36+
37+
build:
38+
needs: prepare
39+
name: ${{ matrix.os }}
40+
runs-on: ${{ matrix.os }}
41+
env:
42+
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
os: [ubuntu-latest, macos-latest, windows-latest]
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: dtolnay/rust-toolchain@stable
50+
- uses: Swatinem/rust-cache@v2
51+
with:
52+
workspaces: .
53+
- name: Linux build deps
54+
if: runner.os == 'Linux'
55+
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
56+
- name: Build
57+
run: cargo build --release --manifest-path Cargo.toml
58+
- name: Package
59+
shell: bash
60+
run: |
61+
set -euo pipefail
62+
ext=""; [ "${{ runner.os }}" = "Windows" ] && ext=".exe"
63+
case "${{ runner.os }}" in
64+
Linux) plat="linux-x86_64" ;;
65+
macOS) plat="macos-aarch64" ;;
66+
Windows) plat="windows-x86_64" ;;
67+
esac
68+
mkdir -p dist
69+
cp "target/release/ryu-predict${ext}" "dist/ryu-predict-${plat}${ext}"
70+
( cd dist
71+
if command -v sha256sum >/dev/null 2>&1; then sha256sum "ryu-predict-${plat}${ext}" > "ryu-predict-${plat}${ext}.sha256"
72+
elif command -v shasum >/dev/null 2>&1; then shasum -a 256 "ryu-predict-${plat}${ext}" > "ryu-predict-${plat}${ext}.sha256"; fi )
73+
# gh release upload, NOT softprops: softprops PATCHes the release even
74+
# when it is only ADDING assets, and that PATCH is refused for the App
75+
# token ("Resource not accessible by integration") despite Contents:
76+
# write. The assets endpoint on its own is permitted.
77+
- name: Upload to release
78+
env:
79+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
TAG: nightly
81+
shell: bash
82+
run: |
83+
set -euo pipefail
84+
shopt -s nullglob
85+
files=(dist/*)
86+
if [ ${#files[@]} -eq 0 ]; then
87+
echo "no files matched" >&2; exit 1
88+
fi
89+
gh release upload "$TAG" "${files[@]}" --clobber

.github/workflows/release.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# GENERATED by tools/mirror-satellites.sh — edit there, not here.
2+
name: release
3+
4+
on:
5+
push:
6+
tags: ['v*']
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: 'Release tag (e.g. v0.0.6)'
11+
required: true
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
notes:
18+
name: Release notes
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
# The changelog diffs against the previous tag — needs full history.
24+
fetch-depth: 0
25+
- name: Publish release with standardized notes
26+
env:
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
TAG: ${{ inputs.tag || github.ref_name }}
29+
run: |
30+
set -euo pipefail
31+
# Notes are built into a file rather than passed as a multi-line
32+
# --notes string: inside a `run: |` block scalar EVERY line must stay
33+
# indented, and a quoted string continuing at column 0 silently ends
34+
# the block and makes the whole workflow file invalid.
35+
if [ -f scripts/release-notes.mjs ]; then
36+
node scripts/release-notes.mjs --tag "$TAG" --channel release --repo "$GITHUB_REPOSITORY" > release-notes.md
37+
else
38+
{
39+
printf '## %s\n\n' "$TAG"
40+
printf 'Source mirror of `%s` at %s.\n\n' "predict" "$TAG"
41+
printf 'Developed in https://github.com/amajorai/ryu — this repository is a read-only mirror.\n'
42+
} > release-notes.md
43+
fi
44+
if gh release view "$TAG" >/dev/null 2>&1; then
45+
gh release edit "$TAG" --notes-file release-notes.md
46+
else
47+
gh release create "$TAG" --title "ryu-predict $TAG" --target "$GITHUB_SHA" --notes-file release-notes.md
48+
fi
49+
50+
build:
51+
needs: notes
52+
name: ${{ matrix.os }}
53+
runs-on: ${{ matrix.os }}
54+
env:
55+
CMAKE_POLICY_VERSION_MINIMUM: "3.5"
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
os: [ubuntu-latest, macos-latest, windows-latest]
60+
steps:
61+
- uses: actions/checkout@v4
62+
- uses: dtolnay/rust-toolchain@stable
63+
- uses: Swatinem/rust-cache@v2
64+
with:
65+
workspaces: .
66+
- name: Linux build deps
67+
if: runner.os == 'Linux'
68+
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
69+
- name: Build
70+
run: cargo build --release --manifest-path Cargo.toml
71+
- name: Package
72+
shell: bash
73+
run: |
74+
set -euo pipefail
75+
ext=""; [ "${{ runner.os }}" = "Windows" ] && ext=".exe"
76+
case "${{ runner.os }}" in
77+
Linux) plat="linux-x86_64" ;;
78+
macOS) plat="macos-aarch64" ;;
79+
Windows) plat="windows-x86_64" ;;
80+
esac
81+
mkdir -p dist
82+
cp "target/release/ryu-predict${ext}" "dist/ryu-predict-${plat}${ext}"
83+
( cd dist
84+
if command -v sha256sum >/dev/null 2>&1; then sha256sum "ryu-predict-${plat}${ext}" > "ryu-predict-${plat}${ext}.sha256"
85+
elif command -v shasum >/dev/null 2>&1; then shasum -a 256 "ryu-predict-${plat}${ext}" > "ryu-predict-${plat}${ext}.sha256"; fi )
86+
# gh release upload, NOT softprops: softprops PATCHes the release even
87+
# when it is only ADDING assets, and that PATCH is refused for the App
88+
# token ("Resource not accessible by integration") despite Contents:
89+
# write. The assets endpoint on its own is permitted.
90+
- name: Upload to release
91+
env:
92+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
TAG: ${{ inputs.tag || github.ref_name }}
94+
shell: bash
95+
run: |
96+
set -euo pipefail
97+
shopt -s nullglob
98+
files=(dist/*)
99+
if [ ${#files[@]} -eq 0 ]; then
100+
echo "no files matched" >&2; exit 1
101+
fi
102+
gh release upload "$TAG" "${files[@]}" --clobber

0 commit comments

Comments
 (0)