Compare commits
6 Commits
6554c4248c
...
release-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
103d353422 | ||
|
|
b8f8c60c22 | ||
|
|
03a07a9075 | ||
|
|
861ad445fc | ||
|
|
1aeb33fbf4 | ||
|
|
dd025bd185 |
@@ -14,29 +14,12 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install Rust
|
||||
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: Setup Rust
|
||||
run: |
|
||||
rustup toolchain install nightly --profile minimal
|
||||
rustup target add wasm32-unknown-unknown --toolchain nightly
|
||||
rustup component add rust-src --toolchain nightly
|
||||
rustc +nightly --version
|
||||
|
||||
- name: Install Trunk
|
||||
run: |
|
||||
@@ -57,12 +40,21 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Build Backend (MIPS)
|
||||
env:
|
||||
RUSTUP_TOOLCHAIN: nightly
|
||||
CROSS_NO_WARNINGS: 0
|
||||
run: |
|
||||
cd backend
|
||||
cross build --target mips-unknown-linux-musl --release -Z build-std=std,panic_abort
|
||||
docker run --rm --platform linux/amd64 \
|
||||
-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
|
||||
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
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
run: |
|
||||
TAG="${{ steps.tag.outputs.release_tag }}"
|
||||
REPO="admin/vibetorrent"
|
||||
@@ -81,7 +73,7 @@ jobs:
|
||||
|
||||
# Create release
|
||||
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" \
|
||||
-d "{
|
||||
\"tag_name\": \"${TAG}\",
|
||||
@@ -102,7 +94,7 @@ jobs:
|
||||
|
||||
# Upload binary as release asset
|
||||
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" \
|
||||
--data-binary @target/mips-unknown-linux-musl/release/vibetorrent-mips
|
||||
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@ result.xml
|
||||
**/node_modules
|
||||
frontend/dist
|
||||
backend.log
|
||||
.runner
|
||||
|
||||
Reference in New Issue
Block a user