10 Commits

Author SHA1 Message Date
spinline
e329275956 ci: use cross-rs image with Rust for proper sysroot, cache builder image
All checks were successful
Build MIPS Binary / build (push) Successful in 7m39s
2026-02-06 19:10:57 +03:00
spinline
1f7af5fe30 ci: remove RUSTFLAGS, musl target is static by default
All checks were successful
Build MIPS Binary / build (push) Successful in 13m49s
2026-02-06 18:51:49 +03:00
spinline
bf54d2699e ci: force static linking with crt-static and -static flags
Some checks failed
Build MIPS Binary / build (push) Failing after 10m7s
2026-02-06 18:39:40 +03:00
spinline
46d61b5562 fix: suppress unused_assignments warning for got_first_message
Some checks failed
Build MIPS Binary / build (push) Has been cancelled
2026-02-06 18:33:18 +03:00
spinline
103d353422 ci: use rust:latest + rustup nightly (rust:nightly tag doesn't exist)
All checks were successful
Build MIPS Binary / build (push) Successful in 12m22s
2026-02-06 18:08:40 +03:00
spinline
b8f8c60c22 ci: use rust:nightly image with musl.cc cross-compiler for self-contained MIPS build
Some checks failed
Build MIPS Binary / build (push) Failing after 30s
2026-02-06 18:07:33 +03:00
spinline
03a07a9075 ci: use Docker directly instead of cross to avoid host toolchain resolution
Some checks failed
Build MIPS Binary / build (push) Failing after 31s
2026-02-06 18:04:41 +03:00
spinline
861ad445fc ci: use +nightly flag instead of RUSTUP_TOOLCHAIN env var
Some checks failed
Build MIPS Binary / build (push) Failing after 30s
2026-02-06 18:00:53 +03:00
spinline
1aeb33fbf4 ci: use shell commands instead of GitHub Actions for host runner
Some checks failed
Build MIPS Binary / build (push) Failing after 30s
2026-02-06 17:59:17 +03:00
spinline
dd025bd185 fix: use RELEASE_TOKEN secret (GITEA_ prefix reserved), add .runner to gitignore
Some checks failed
Build MIPS Binary / build (push) Failing after 45s
2026-02-06 17:57:25 +03:00
3 changed files with 30 additions and 35 deletions

View File

@@ -14,29 +14,12 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup Node.js - name: Setup Rust
uses: actions/setup-node@v4 run: |
with: rustup toolchain install nightly --profile minimal
node-version: '20' rustup target add wasm32-unknown-unknown --toolchain nightly
rustup component add rust-src --toolchain nightly
- name: Install Rust rustc +nightly --version
uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-unknown-unknown
components: rust-src
- name: Rust Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-mips-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-mips-
- name: Install Trunk - name: Install Trunk
run: | run: |
@@ -50,19 +33,30 @@ jobs:
npm install npm install
trunk build --release trunk build --release
- name: Install Cross - name: Build MIPS Builder Image
run: | run: |
if ! command -v cross &> /dev/null; then if ! docker image inspect vibetorrent-mips-builder >/dev/null 2>&1; then
cargo install cross --locked docker build --platform linux/amd64 -t vibetorrent-mips-builder -f - . <<'DOCKERFILE'
FROM ghcr.io/cross-rs/mips-unknown-linux-musl:main
RUN apt-get update -qq && \
apt-get install -y -qq curl ca-certificates && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly --component rust-src && \
rm -rf /var/lib/apt/lists/*
ENV PATH="/root/.cargo/bin:${PATH}"
DOCKERFILE
fi fi
- name: Build Backend (MIPS) - name: Build Backend (MIPS)
env:
RUSTUP_TOOLCHAIN: nightly
CROSS_NO_WARNINGS: 0
run: | run: |
cd backend docker run --rm \
cross build --target mips-unknown-linux-musl --release -Z build-std=std,panic_abort -v "$PWD":/project \
-v cargo-mips-registry:/root/.cargo/registry \
-w /project/backend \
vibetorrent-mips-builder \
bash -c '
cargo build --target mips-unknown-linux-musl --release -Z build-std=std,panic_abort &&
file /project/target/mips-unknown-linux-musl/release/backend
'
- name: Rename Binary - name: Rename Binary
run: mv target/mips-unknown-linux-musl/release/backend target/mips-unknown-linux-musl/release/vibetorrent-mips run: mv target/mips-unknown-linux-musl/release/backend target/mips-unknown-linux-musl/release/vibetorrent-mips
@@ -73,7 +67,7 @@ jobs:
- name: Create Release - name: Create Release
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: | run: |
TAG="${{ steps.tag.outputs.release_tag }}" TAG="${{ steps.tag.outputs.release_tag }}"
REPO="admin/vibetorrent" REPO="admin/vibetorrent"
@@ -81,7 +75,7 @@ jobs:
# Create release # Create release
RELEASE_RESPONSE=$(curl -s -X POST "${API_URL}/repos/${REPO}/releases" \ RELEASE_RESPONSE=$(curl -s -X POST "${API_URL}/repos/${REPO}/releases" \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${RELEASE_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{ -d "{
\"tag_name\": \"${TAG}\", \"tag_name\": \"${TAG}\",
@@ -102,7 +96,7 @@ jobs:
# Upload binary as release asset # Upload binary as release asset
curl -s -X POST "${API_URL}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=vibetorrent-mips" \ curl -s -X POST "${API_URL}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=vibetorrent-mips" \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${RELEASE_TOKEN}" \
-H "Content-Type: application/octet-stream" \ -H "Content-Type: application/octet-stream" \
--data-binary @target/mips-unknown-linux-musl/release/vibetorrent-mips --data-binary @target/mips-unknown-linux-musl/release/vibetorrent-mips

1
.gitignore vendored
View File

@@ -5,3 +5,4 @@ result.xml
**/node_modules **/node_modules
frontend/dist frontend/dist
backend.log backend.log
.runner

View File

@@ -145,7 +145,7 @@ pub fn provide_torrent_store() {
let max_backoff_ms: u32 = 30000; // Max 30 seconds let max_backoff_ms: u32 = 30000; // Max 30 seconds
let mut was_connected = false; let mut was_connected = false;
let mut disconnect_notified = false; // Track if we already showed disconnect toast let mut disconnect_notified = false; // Track if we already showed disconnect toast
let mut got_first_message = false; // Only count as "connected" after receiving data let mut got_first_message; // Only count as "connected" after receiving data
loop { loop {
let es_result = EventSource::new("/api/events"); let es_result = EventSource::new("/api/events");