* refactor: improve code quality with clippy fixes and standardized logging
- Replace dangerous unwrap()/expect() calls with proper error handling
- Standardize logging from log:: to logging\! macro with Type:: classifications
- Fix app handle panics with graceful fallback patterns
- Improve error resilience across 35+ modules without breaking functionality
- Reduce clippy warnings from 300+ to 0 in main library code
* chore: update Cargo.toml configuration
* refactor: resolve all clippy warnings
- Fix Arc clone warnings using explicit Arc::clone syntax across 9 files
- Add #[allow(clippy::expect_used)] to test functions for appropriate expect usage
- Remove no-effect statements from debug code cleanup
- Apply clippy auto-fixes for dbg\! macro removals and path statements
- Achieve zero clippy warnings on all targets with -D warnings flag
* chore: update Cargo.toml clippy configuration
* refactor: simplify macOS job configuration and improve caching
* refactor: remove unnecessary async/await from service and proxy functions
* refactor: streamline pnpm installation in CI configuration
* refactor: simplify error handling and remove unnecessary else statements
* refactor: replace async/await with synchronous locks for core management
* refactor: add workflow_dispatch trigger to clippy job
* refactor: convert async functions to synchronous for service management
* refactor: convert async functions to synchronous for UWP tool invocation
* fix: change wrong logging
* refactor: convert proxy restoration functions to async
* Revert "refactor: convert proxy restoration functions to async"
This reverts commit b82f5d250b.
* refactor: update proxy restoration functions to return Result types
* fix: handle errors during proxy restoration and update async function signatures
* fix: handle errors during proxy restoration and update async function signatures
* refactor: update restore_pac_proxy and restore_sys_proxy functions to async
* fix: convert restore_pac_proxy and restore_sys_proxy functions to async
* fix: await restore_sys_proxy calls in proxy restoration logic
* fix: suppress clippy warnings for unused async functions in proxy restoration
* fix: suppress clippy warnings for unused async functions in proxy restoration
127 lines
4.0 KiB
YAML
127 lines
4.0 KiB
YAML
name: Development Test
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
run_windows:
|
|
description: "运行 Windows"
|
|
required: false
|
|
type: boolean
|
|
default: true
|
|
run_macos_aarch64:
|
|
description: "运行 macOS aarch64"
|
|
required: false
|
|
type: boolean
|
|
default: true
|
|
|
|
permissions: write-all
|
|
env:
|
|
TAG_NAME: deploytest
|
|
TAG_CHANNEL: DeployTest
|
|
CARGO_INCREMENTAL: 0
|
|
RUST_BACKTRACE: short
|
|
concurrency:
|
|
group: "${{ github.workflow }} - ${{ github.head_ref || github.ref }}"
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
dev:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
bundle: nsis
|
|
id: windows
|
|
input: run_windows
|
|
- os: macos-latest
|
|
target: aarch64-apple-darwin
|
|
bundle: dmg
|
|
id: macos-aarch64
|
|
input: run_macos_aarch64
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Skip job if not selected
|
|
if: github.event.inputs[matrix.input] != 'true'
|
|
run: echo "Job ${{ matrix.id }} skipped as requested"
|
|
|
|
- name: Checkout Repository
|
|
if: github.event.inputs[matrix.input] == 'true'
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust Stable
|
|
if: github.event.inputs[matrix.input] == 'true'
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Add Rust Target
|
|
if: github.event.inputs[matrix.input] == 'true'
|
|
run: rustup target add ${{ matrix.target }}
|
|
|
|
- name: Rust Cache
|
|
if: github.event.inputs[matrix.input] == 'true'
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: src-tauri
|
|
save-if: false
|
|
cache-all-crates: true
|
|
shared-key: autobuild-shared
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
name: Install pnpm
|
|
if: github.event.inputs[matrix.input] == 'true'
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Install Node
|
|
if: github.event.inputs[matrix.input] == 'true'
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
cache: "pnpm"
|
|
|
|
- name: Pnpm install and check
|
|
if: github.event.inputs[matrix.input] == 'true'
|
|
run: |
|
|
pnpm i
|
|
pnpm run prebuild ${{ matrix.target }}
|
|
|
|
- name: Release ${{ env.TAG_CHANNEL }} Version
|
|
if: github.event.inputs[matrix.input] == 'true'
|
|
run: pnpm release-version ${{ env.TAG_NAME }}
|
|
|
|
- name: Tauri build
|
|
if: github.event.inputs[matrix.input] == 'true'
|
|
uses: tauri-apps/tauri-action@v0
|
|
env:
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
|
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
with:
|
|
tauriScript: pnpm
|
|
args: --target ${{ matrix.target }} -b ${{ matrix.bundle }}
|
|
|
|
- name: Upload Artifacts
|
|
if: matrix.os == 'macos-latest' && github.event.inputs[matrix.input] == 'true'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.target }}
|
|
path: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg
|
|
if-no-files-found: error
|
|
|
|
- name: Upload Artifacts
|
|
if: matrix.os == 'windows-latest' && github.event.inputs[matrix.input] == 'true'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.target }}
|
|
path: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*.exe
|
|
if-no-files-found: error
|