Initial commit

This commit is contained in:
Xuc Pan committed 2026-09-05 13:04:29 +08:00
commit 611383544b
91 files changed
+12958

No files matched your search

+83
View File
@@ -0,0 +1,83 @@
name: ci
on:
push:
branches: [master]
pull_request:
jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Rust checks
run: |
cargo fmt --check
cargo clippy --locked --all-targets -- -D warnings
cargo test --locked --all-targets
cc -std=c11 -O2 -Wall -Wextra -Werror tests/frame-protocol.c -o /tmp/frame-protocol
/tmp/frame-protocol
- name: Build
run: cargo build --locked --release
hook:
runs-on: ubuntu-latest
container: archlinux:base-devel
steps:
- uses: actions/checkout@v4
- name: Install mingw toolchain
run: |
pacman -Syu --noconfirm mingw-w64-gcc mingw-w64-binutils
- name: Build PE components
run: ./hook/build.sh
- uses: actions/upload-artifact@v4
with:
name: uur-hook-pe
path: build/hook/*.dll
package-layout:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install native and PE build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
appstream binutils-mingw-w64-x86-64 desktop-file-utils \
gcc gcc-mingw-w64-x86-64 libpipewire-0.3-dev pkg-config \
wine xvfb
- name: Build and stage
run: |
cargo build --release --locked
./hook/build.sh
./capture/build.sh
stage="$(mktemp -d)"
./packaging/stage.sh "$stage"
test -x "$stage/usr/bin/uur"
test -x "$stage/usr/lib/uur/uur-pw-capture"
test -f "$stage/usr/lib/uur/hook/winlogon.exe"
desktop-file-validate "$stage/usr/share/applications/uur.desktop"
appstreamcli validate --no-net "$stage/usr/share/metainfo/io.github.panxuc.uur.metainfo.xml"
./tests/hook-smoke.sh
./tests/terminal-smoke.sh
alpine-musl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and test the musl package layout
run: docker build --target build -f packaging/alpine/Dockerfile .
nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- name: Evaluate and build the flake
run: |
nix flake check --no-build
nix build .#uur
+67
View File
@@ -0,0 +1,67 @@
name: release
on:
push:
tags: ['v*']
workflow_dispatch:
permissions:
contents: write
jobs:
packages:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
binutils-mingw-w64-x86-64 gcc libpipewire-0.3-dev \
gcc-mingw-w64-x86-64 pkg-config zstd
- name: Install nFPM
uses: goreleaser/nfpm-action@v2
with:
version: latest
- name: Build distribution packages
run: ./packaging/build-packages.sh
- name: Publish GitHub release assets
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload "${GITHUB_REF_NAME}" \
dist/*.tar.zst dist/*.deb dist/*.rpm dist/SHA256SUMS \
--clobber
aur:
needs: packages
runs-on: ubuntu-latest
container: archlinux:base-devel
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v4
- name: Install publication tools
run: pacman -Syu --noconfirm curl git openssh
- name: Publish AUR metadata
env:
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
run: |
install -Dm0600 /dev/null ~/.ssh/aur
printf '%s\n' "$AUR_SSH_PRIVATE_KEY" > ~/.ssh/aur
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
git clone ssh://[email protected]/uur.git aur
cp packaging/aur/PKGBUILD packaging/aur/uur.install aur/
version="${GITHUB_REF_NAME#v}"
sed -i "s/^pkgver=.*/pkgver=$version/" aur/PKGBUILD
source_url="https://github.com/${GITHUB_REPOSITORY}/archive/refs/tags/${GITHUB_REF_NAME}.tar.gz"
digest="$(curl -fsSL "$source_url" | sha256sum | cut -d' ' -f1)"
sed -i "s/^sha256sums=.*/sha256sums=('$digest')/" aur/PKGBUILD
useradd --create-home builder
chown -R builder:builder aur
runuser -u builder -- bash -lc 'cd "$1" && makepkg --printsrcinfo > .SRCINFO' _ "$PWD/aur"
git -C aur config user.name uur-release-bot
git -C aur config user.email [email protected]
git -C aur add PKGBUILD uur.install .SRCINFO
git -C aur commit -m "uur $version"
GIT_SSH_COMMAND='ssh -i ~/.ssh/aur -o IdentitiesOnly=yes' git -C aur push
+68
View File
@@ -0,0 +1,68 @@
name: upstream-watch
# Periodically check NetEase's official release feed. When a new UU Remote
# version appears this workflow runs the version-independent adapter probe and
# records the result. See docs/upstream-adaptation.md for the release split.
on:
schedule:
- cron: "0 3 * * *" # daily, 03:00 UTC
workflow_dispatch:
permissions:
issues: write
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Query the official release feed
id: feed
run: |
url="$(./scripts/latest-installer-url.sh)"
filename="$(basename "${url%%\?*}")"
version="$(./scripts/extract-version.sh "$filename")"
echo "url=$url" >> "$GITHUB_OUTPUT"
echo "filename=$filename" >> "$GITHUB_OUTPUT"
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Download and probe stable API contracts
id: probe
continue-on-error: true
env:
URL: ${{ steps.feed.outputs.url }}
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
binutils osslsigncode p7zip-full wine xvfb
curl -fL --retry 3 -o upstream.exe "$URL"
./scripts/probe-upstream.sh upstream.exe
- name: Open or update a tracking issue when upstream moved
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.feed.outputs.version }}
FILENAME: ${{ steps.feed.outputs.filename }}
PROBE: ${{ steps.probe.outcome }}
run: |
gh label create upstream-release --description "Official UU Remote changed" \
--color 1d76db --force
existing="$(gh issue list --label upstream-release \
--state open --json number --jq '.[0].number' || true)"
body="$(cat <<EOF
NetEase published or currently serves **${VERSION}** (${FILENAME}).
Static adapter probe: **${PROBE}**.
- [x] Download and run the static API-contract probe
- [ ] Run the Wine hook and frame canary against the real binaries
- [ ] Confirm the wevtapi/uur-hook preload chain still loads
- [ ] If adaptation code changes: tag uur and publish all package formats
- [ ] If probes fail: document which contract changed
EOF
)"
if [[ -n "$existing" ]]; then
gh issue comment "$existing" --body "Still tracking: ${VERSION} (${FILENAME})"
else
gh issue create --label upstream-release \
--title "Upstream UU Remote ${VERSION} detected" --body "$body"
fi