6 Commits

Author SHA1 Message Date
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
2 changed files with 24 additions and 31 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: |
@@ -57,12 +40,21 @@ jobs:
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 --platform linux/amd64 \
cross build --target mips-unknown-linux-musl --release -Z build-std=std,panic_abort -v "$PWD":/project \
-v cargo-cache:/usr/local/cargo/registry \
-w /project \
rust:latest \
bash -c '
rustup toolchain install nightly --component rust-src &&
apt-get update -qq && apt-get install -y -qq musl-tools wget >/dev/null 2>&1 &&
wget -qO- https://musl.cc/mips-linux-musl-cross.tgz | tar xz -C /opt/ &&
export PATH="/opt/mips-linux-musl-cross/bin:$PATH" &&
export CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-linux-musl-gcc &&
cd backend &&
cargo +nightly build --target mips-unknown-linux-musl --release -Z build-std=std,panic_abort
'
- 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 +65,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 +73,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 +94,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