mirror of
https://github.com/Xevion/byte-me.git
synced 2025-12-15 14:11:19 -06:00
Compare commits
18 Commits
8bfae44115
...
46876d5d9d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46876d5d9d | ||
|
|
e578ac2f3d | ||
|
|
d0aea1662d | ||
|
|
7b52f87d9d | ||
|
|
7b7e495fc0 | ||
|
|
8c897209ae | ||
|
|
b7d90c151c | ||
|
|
8c5e86be19 | ||
|
|
a2c4a0bd0c | ||
|
|
6c2c10c25d | ||
|
|
fc47fd9fe9 | ||
|
|
f507277827 | ||
|
|
51498b234e | ||
|
|
e35ac0eeee | ||
|
|
047ee8b1e4 | ||
|
|
50f53eccf1 | ||
|
|
ca82456a53 | ||
|
|
19a39a8c25 |
96
.github/workflows/ci.yml
vendored
96
.github/workflows/ci.yml
vendored
@@ -10,14 +10,52 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
name: Build (${{ matrix.os }}${{ matrix.target && format(' / {0}', matrix.target) || '' }})
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
artifact_name: byte-me-linux-x86_64
|
||||||
|
- os: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
artifact_name: byte-me-windows-x86_64
|
||||||
|
artifact_extension: .exe
|
||||||
|
- os: macos-latest
|
||||||
|
target: aarch64-apple-darwin
|
||||||
|
artifact_name: byte-me-macos-aarch64
|
||||||
|
- os: macos-latest
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
artifact_name: byte-me-macos-x86_64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
components: rustfmt, clippy
|
||||||
|
targets: ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Use sccache
|
||||||
|
if: runner.os != 'Linux' && github.event_name != 'release' && github.event_name != 'workflow_dispatch'
|
||||||
|
uses: mozilla-actions/sccache-action@v0.0.9
|
||||||
|
|
||||||
|
- name: Configure sccache
|
||||||
|
if: runner.os != 'Linux' && github.event_name != 'release' && github.event_name != 'workflow_dispatch'
|
||||||
|
run: |
|
||||||
|
# Enable GitHub Actions for cache storage
|
||||||
|
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
|
||||||
|
# Use sccache for rustc
|
||||||
|
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Rust cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: src-tauri
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
@@ -30,36 +68,52 @@ jobs:
|
|||||||
node-version: 20
|
node-version: 20
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: Install JS deps
|
- name: Install frontend dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile --prefer-offline
|
||||||
|
|
||||||
|
- name: Install backend dependencies
|
||||||
|
run: cargo fetch --manifest-path src-tauri/Cargo.toml
|
||||||
|
|
||||||
|
- name: Install Tauri CLI
|
||||||
|
uses: Xevion/cache-cargo-install-action@main
|
||||||
|
with:
|
||||||
|
tool: tauri-cli@2
|
||||||
|
locked: true
|
||||||
|
|
||||||
|
- name: Cache apt packages
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /var/cache/apt/archives
|
||||||
|
key: ${{ runner.os }}-apt-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-apt-
|
||||||
|
|
||||||
- name: Install Linux dependencies
|
- name: Install Linux dependencies
|
||||||
|
if: runner.os == 'Linux'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
# Update package list and install dependencies in one command to reduce time
|
||||||
sudo apt-get install -y \
|
sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends \
|
||||||
pkg-config \
|
|
||||||
build-essential \
|
build-essential \
|
||||||
libxdo-dev \
|
libxdo-dev \
|
||||||
libssl-dev \
|
|
||||||
libglib2.0-dev \
|
libglib2.0-dev \
|
||||||
libwebkit2gtk-4.1-dev \
|
libwebkit2gtk-4.1-dev \
|
||||||
libayatana-appindicator3-dev \
|
libayatana-appindicator3-dev \
|
||||||
librsvg2-dev \
|
librsvg2-dev \
|
||||||
patchelf
|
patchelf \
|
||||||
|
musl-tools
|
||||||
|
|
||||||
# this will run again in next step, but we run it here to separate the error from the frontend build step
|
|
||||||
- name: Generate frontend bindings
|
- name: Generate frontend bindings
|
||||||
run: pnpm run generate-types
|
run: pnpm run generate-types
|
||||||
|
|
||||||
- name: Build frontend (tsc + vite)
|
- name: Build app (tauri)
|
||||||
run: |
|
run: cargo tauri build --target ${{ matrix.target }}
|
||||||
pnpm run build # implicitly runs generate-types
|
|
||||||
|
|
||||||
- name: Format check
|
- name: Upload binary artifact
|
||||||
run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
- name: Clippy
|
name: ${{ matrix.artifact_name }}
|
||||||
run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features -- -D warnings
|
path: |
|
||||||
|
src-tauri/target/${{ matrix.target }}/release/byte-me${{ matrix.artifact_extension }}
|
||||||
- name: Run tests
|
src-tauri/target/${{ matrix.target }}/release/bundle/**/*
|
||||||
run: cargo test --manifest-path src-tauri/Cargo.toml --all-features
|
if-no-files-found: error
|
||||||
|
|||||||
57
.github/workflows/code-quality.yml
vendored
57
.github/workflows/code-quality.yml
vendored
@@ -6,25 +6,15 @@ on:
|
|||||||
workflow_dispatch: # Allow manual triggering
|
workflow_dispatch: # Allow manual triggering
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
paths:
|
|
||||||
- "**/Cargo.toml"
|
|
||||||
- "**/Cargo.lock"
|
|
||||||
- "**/package.json"
|
|
||||||
- "**/pnpm-lock.yaml"
|
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
paths:
|
|
||||||
- "**/Cargo.toml"
|
|
||||||
- "**/Cargo.lock"
|
|
||||||
- "**/package.json"
|
|
||||||
- "**/pnpm-lock.yaml"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rust-quality:
|
rust-quality:
|
||||||
name: Rust Code Quality
|
name: Rust Code Quality
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@nightly
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
@@ -51,17 +41,13 @@ jobs:
|
|||||||
patchelf
|
patchelf
|
||||||
|
|
||||||
- name: Install cargo-udeps
|
- name: Install cargo-udeps
|
||||||
uses: taiki-e/cache-cargo-install-action@v2
|
uses: taiki-e/install-action@cargo-udeps
|
||||||
with:
|
|
||||||
tool: cargo-udeps
|
|
||||||
|
|
||||||
- name: Check for unused dependencies
|
- name: Check for unused dependencies
|
||||||
run: cargo +nightly udeps --manifest-path src-tauri/Cargo.toml --all-targets
|
run: cargo +nightly udeps --manifest-path src-tauri/Cargo.toml --all-targets
|
||||||
|
|
||||||
- name: Install cargo-machete
|
- name: Install cargo-machete
|
||||||
uses: taiki-e/cache-cargo-install-action@v2
|
uses: taiki-e/install-action@cargo-machete
|
||||||
with:
|
|
||||||
tool: cargo-machete
|
|
||||||
|
|
||||||
- name: Check for unused Cargo.toml dependencies
|
- name: Check for unused Cargo.toml dependencies
|
||||||
run: cargo machete src-tauri/
|
run: cargo machete src-tauri/
|
||||||
@@ -79,7 +65,7 @@ jobs:
|
|||||||
name: Frontend Code Quality
|
name: Frontend Code Quality
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
@@ -106,38 +92,3 @@ jobs:
|
|||||||
- name: Bundle size analysis
|
- name: Bundle size analysis
|
||||||
run: pnpm run build && du -sh dist/
|
run: pnpm run build && du -sh dist/
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
license-check:
|
|
||||||
name: License Check
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Install cargo-license
|
|
||||||
uses: taiki-e/cache-cargo-install-action@v2
|
|
||||||
with:
|
|
||||||
tool: cargo-license
|
|
||||||
|
|
||||||
- name: Check Rust crate licenses
|
|
||||||
run: cargo license --manifest-path src-tauri/Cargo.toml --json > rust-licenses.json
|
|
||||||
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
with:
|
|
||||||
version: 10
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: pnpm
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm install
|
|
||||||
|
|
||||||
- name: Check npm package licenses
|
|
||||||
run: pnpm exec license-checker --json > npm-licenses.json
|
|
||||||
continue-on-error: true
|
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
|
|||||||
17
.github/workflows/security-audit.yml
vendored
17
.github/workflows/security-audit.yml
vendored
@@ -3,36 +3,25 @@ name: Security Audit
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch: # Allow manual triggering
|
workflow_dispatch: # Allow manual triggering
|
||||||
push:
|
push:
|
||||||
paths:
|
|
||||||
- "**/Cargo.toml"
|
|
||||||
- "**/Cargo.lock"
|
|
||||||
- "**/package.json"
|
|
||||||
- "**/pnpm-lock.yaml"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rust-audit:
|
rust-audit:
|
||||||
name: Rust Security Audit
|
name: Rust Security Audit
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install cargo-audit
|
|
||||||
uses: taiki-e/install-action@cargo-audit
|
|
||||||
|
|
||||||
- name: Run cargo audit
|
|
||||||
run: cargo audit --file src-tauri/Cargo.lock
|
|
||||||
|
|
||||||
- name: Install cargo-deny
|
- name: Install cargo-deny
|
||||||
uses: taiki-e/install-action@cargo-deny
|
uses: taiki-e/install-action@cargo-deny
|
||||||
|
|
||||||
- name: Run cargo deny
|
- name: Run cargo deny
|
||||||
run: cargo deny --manifest-path src-tauri/Cargo.toml check
|
run: cargo deny --manifest-path src-tauri/Cargo.toml check sources advisories bans --show-stats
|
||||||
|
|
||||||
npm-audit:
|
npm-audit:
|
||||||
name: NPM Security Audit
|
name: NPM Security Audit
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Install pnpm
|
- name: Install pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
|
|||||||
1
src-tauri/Cargo.lock
generated
1
src-tauri/Cargo.lock
generated
@@ -398,7 +398,6 @@ dependencies = [
|
|||||||
"ffprobe",
|
"ffprobe",
|
||||||
"infer",
|
"infer",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
|
||||||
"tauri",
|
"tauri",
|
||||||
"tauri-build",
|
"tauri-build",
|
||||||
"tauri-plugin-opener",
|
"tauri-plugin-opener",
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ tauri-build = { version = "2.4.0", features = [] }
|
|||||||
tauri = { version = "2.8.2", features = [] }
|
tauri = { version = "2.8.2", features = [] }
|
||||||
tauri-plugin-opener = "2.5.0"
|
tauri-plugin-opener = "2.5.0"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1.0.143"
|
|
||||||
ffprobe = "0.4.0"
|
ffprobe = "0.4.0"
|
||||||
ts-rs = { version = "11.0", features = ["format"] }
|
ts-rs = { version = "11.0", features = ["format"] }
|
||||||
infer = "0.19.0"
|
infer = "0.19.0"
|
||||||
|
|||||||
39
src-tauri/deny.toml
Normal file
39
src-tauri/deny.toml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
[graph]
|
||||||
|
targets = [
|
||||||
|
"x86_64-unknown-linux-gnu",
|
||||||
|
"x86_64-pc-windows-msvc",
|
||||||
|
"aarch64-apple-darwin",
|
||||||
|
"x86_64-apple-darwin",
|
||||||
|
]
|
||||||
|
all-features = true
|
||||||
|
no-default-features = false
|
||||||
|
|
||||||
|
[output]
|
||||||
|
feature-depth = 1
|
||||||
|
|
||||||
|
[advisories]
|
||||||
|
ignore = [
|
||||||
|
"RUSTSEC-2024-0429",
|
||||||
|
]
|
||||||
|
unmaintained = "workspace"
|
||||||
|
|
||||||
|
[licenses]
|
||||||
|
allow = []
|
||||||
|
confidence-threshold = 0.8
|
||||||
|
exceptions = []
|
||||||
|
|
||||||
|
[licenses.private]
|
||||||
|
ignore = false
|
||||||
|
registries = []
|
||||||
|
|
||||||
|
[bans]
|
||||||
|
multiple-versions = "allow"
|
||||||
|
wildcards = "allow"
|
||||||
|
highlight = "all"
|
||||||
|
workspace-default-features = "allow"
|
||||||
|
external-default-features = "allow"
|
||||||
|
allow = []
|
||||||
|
|
||||||
|
[sources]
|
||||||
|
unknown-registry = "warn"
|
||||||
|
unknown-git = "warn"
|
||||||
@@ -43,5 +43,3 @@ pub fn extract_streams(info: &ffprobe::FfProbe) -> Vec<StreamDetail> {
|
|||||||
|
|
||||||
streams
|
streams
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user