Update On Mon Mar 3 19:34:41 CET 2025

This commit is contained in:
github-action[bot]
2025-03-03 19:34:42 +01:00
parent f673e85f4b
commit bb2cbae785
249 changed files with 11549 additions and 2089 deletions

View File

@@ -114,6 +114,9 @@ jobs:
- os: macos-latest
- os: windows-latest
fail-fast: false
if: >
github.event_name != 'pull_request' ||
contains(github.event.pull_request.title, 'crate')
runs-on: ${{ matrix.targets.os }}
needs: lint
steps:
@@ -175,77 +178,103 @@ jobs:
- name: Prepare sidecar and resources
run: pnpm check
- name: Build Tauri
run: pnpm tauri build
- name: Prepare frontend
run: pnpm -r build
env:
NODE_OPTIONS: '--max_old_space_size=4096'
# 以后完善了新的测试套件后再添加
# test_unit:
# name: Unit Test
# needs: lint
# # we want to run on the latest linux environment
# runs-on: ubuntu-latest
# # the steps our job runs **in order**
# steps:
# # checkout the code on the workflow runner
# - uses: actions/checkout@v4
- name: Build Backend
run: cargo build --release --manifest-path backend/Cargo.toml
# # install system dependencies that Tauri needs to compile on Linux.
# # note the extra dependencies for `tauri-driver` to run which are: `webkit2gtk-driver` and `xvfb`
# - name: Tauri dependencies
# run: >-
# sudo apt-get update &&
# sudo apt-get install -y
# libgtk-3-dev
# libayatana-appindicator3-dev
# libwebkit2gtk-4.0-dev
# webkit2gtk-driver
# xvfb
test_unit:
name: Unit Test
needs: lint
if: >
github.event_name != 'pull_request' ||
contains(github.event.pull_request.title, 'crate')
# # install the latest Rust stable
# - name: Rust stable
# run: rustup toolchain install stable --profile minimal && rustup default stable
# - 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' }}
# we want to run on the latest linux environment
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
fail-fast: false
runs-on: ${{ matrix.os }}
# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20
# the steps our job runs **in order**
steps:
# checkout the code on the workflow runner
- uses: actions/checkout@v4
# - uses: pnpm/action-setup@v2
# name: Install pnpm
# with:
# version: 8
# run_install: false
# install system dependencies that Tauri needs to compile on Linux.
# note the extra dependencies for `tauri-driver` to run which are: `webkit2gtk-driver` and `xvfb`
- name: Tauri dependencies
if: startsWith(matrix.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
# - name: Get pnpm store directory
# shell: bash
# run: |
# echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: maxim-lobanov/setup-xcode@v1
if: startsWith(matrix.os, 'macos-')
with:
xcode-version: 'latest-stable'
# - 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 Node.js
uses: actions/setup-node@v4
with:
node-version: 22
# - name: Install dependencies
# run: pnpm install
# - name: Prepare fronend
# run: pnpm web:build # Build frontend
# - name: Prepare sidecar and resources
# run: pnpm check
# - name: Test
# # run: pnpm test:unit && pnpm test:backend
# run: pnpm test:backend
- 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: Prepare frontend
run: pnpm -r build
env:
NODE_OPTIONS: '--max_old_space_size=4096'
- name: Test
run: pnpm test
# test_e2e:
# # the display name of the test job

View File

@@ -41,7 +41,7 @@ on:
jobs:
build:
runs-on: 'macos-13'
runs-on: macos-latest
steps:
- name: Checkout repository
@@ -49,7 +49,7 @@ jobs:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 14
xcode-version: 15
- name: install Rust stable
run: |
@@ -69,6 +69,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: latest
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- uses: pnpm/action-setup@v4
name: Install pnpm
@@ -114,15 +117,12 @@ jobs:
NODE_OPTIONS: '--max_old_space_size=4096'
- name: Upload to release
shell: bash
run: |
find ./backend/target \( -name "*.dmg" -o -name "*.sig" -o -name "*.tar.gz" \) | while read file; do
echo "Uploading $file to release"
gh release upload ${{ inputs.tag }} "$file" --clobber
done
deno run -A scripts/deno/upload-macos-updater.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TAG: ${{ inputs.tag }}
TARGET_ARCH: ${{ inputs.aarch64 == true && 'aarch64' || 'x86_64' }}
- name: Upload to Github Artifact
uses: actions/upload-artifact@v4