Update On Sun Mar 2 19:33:11 CET 2025

This commit is contained in:
github-action[bot]
2025-03-02 19:33:11 +01:00
parent 2e98cc0017
commit f673e85f4b
102 changed files with 1874 additions and 700 deletions

View File

@@ -46,20 +46,27 @@ jobs:
libxdo-dev
webkit2gtk-driver
xvfb
- uses: Swatinem/rust-cache@v2
with:
workspaces: './backend/'
prefix-key: 'rust-stable'
shared-key: 'ci'
save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }}
- uses: maxim-lobanov/setup-xcode@v1
if: startsWith(matrix.targets.os, 'macos-')
with:
xcode-version: '15.0'
xcode-version: 'latest-stable'
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
- uses: actions/cache@v4
name: Cache Rust dependencies
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: pnpm/action-setup@v4
name: Install pnpm
@@ -97,6 +104,81 @@ jobs:
env:
NODE_OPTIONS: '--max_old_space_size=4096'
# TODO: support test cross-platform
build:
name: Build Tauri
strategy:
matrix:
targets:
- os: ubuntu-latest
- os: macos-latest
- os: windows-latest
fail-fast: false
runs-on: ${{ matrix.targets.os }}
needs: lint
steps:
- uses: actions/checkout@v4
- name: Tauri dependencies
if: startsWith(matrix.targets.os, 'ubuntu-')
run: >-
sudo apt-get update &&
sudo apt-get install -y
libgtk-3-dev
libayatana-appindicator3-dev
libwebkit2gtk-4.1-dev
librsvg2-dev
libxdo-dev
webkit2gtk-driver
xvfb
- uses: maxim-lobanov/setup-xcode@v1
if: startsWith(matrix.targets.os, 'macos-')
with:
xcode-version: 'latest-stable'
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- uses: actions/cache@v4
name: Cache Rust dependencies
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Prepare sidecar and resources
run: pnpm check
- name: Build Tauri
run: pnpm tauri build
env:
NODE_OPTIONS: '--max_old_space_size=4096'
# 以后完善了新的测试套件后再添加
# test_unit:
# name: Unit Test

View File

@@ -84,12 +84,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libxdo-dev libappindicator3-dev librsvg2-dev patchelf openssl
- uses: Swatinem/rust-cache@v2
with:
workspaces: './backend/'
prefix-key: 'rust-stable'
key: ubuntu-latest
shared-key: 'release'
- name: Install Node latest
uses: actions/setup-node@v4

View File

@@ -56,13 +56,6 @@ jobs:
rustup install stable --profile minimal --no-self-update
rustup default stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: './backend/'
prefix-key: 'rust-stable'
key: 'macos-latest'
shared-key: 'release'
- name: Install Rust intel target
if: ${{ inputs.aarch64 == false }}
run: |
@@ -127,6 +120,9 @@ jobs:
echo "Uploading $file to release"
gh release upload ${{ inputs.tag }} "$file" --clobber
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to Github Artifact
uses: actions/upload-artifact@v4

View File

@@ -85,13 +85,6 @@ jobs:
run: |
rustup target add ${{ inputs.arch }}-pc-windows-msvc
- uses: Swatinem/rust-cache@v2
with:
workspaces: './backend/'
prefix-key: 'rust-stable'
key: windows-latest
shared-key: 'release'
- name: Install Node latest
uses: actions/setup-node@v4
with: