mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
c7af04b317
* feat: support incremental to update textblock's delta * fix: update test code * fix: remove console * fix: update test * feat: integrate increamental delta in Flutter * fix: delete quill editor * fix: delete quill editor * feat: add csharp in codeblock (#3371) * chore: pt-PT & pt-BR translation updated (#3353) * chore: Ensure Cargo.lock Is Updated Alongside Changes to Cargo.toml (#3361) * ci: add cargo check workflow * ci: test cargo.toml * fix: update test * fix: code review * fix: update cargo.toml and cargo.lock * fix: code review * fix: rust format --------- Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io> Co-authored-by: Mayur Mahajan <47064215+MayurSMahajan@users.noreply.github.com> Co-authored-by: Carlos Silva <mtbf99@gmail.com>
111 lines
3.2 KiB
YAML
111 lines
3.2 KiB
YAML
name: Tauri-CI
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/tauri_ci.yaml"
|
|
- "frontend/rust-lib/**"
|
|
- "frontend/appflowy_tauri/**"
|
|
|
|
env:
|
|
NODE_VERSION: "18.16.0"
|
|
PNPM_VERSION: "8.5.0"
|
|
RUST_TOOLCHAIN: "1.70"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
tauri-build:
|
|
if: github.event.pull_request.draft != true
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# platform: [macos-latest, ubuntu-latest, windows-latest]
|
|
platform: [ubuntu-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: setup node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
|
|
- name: Cache Rust Dependencies
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: rust-dependencies-${{ runner.os }}
|
|
workspaces: |
|
|
frontend/rust-lib
|
|
frontend/appflowy_tauri/src-tauri
|
|
|
|
- name: Cache Node.js dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.npm
|
|
key: npm-${{ runner.os }}
|
|
|
|
- name: Cache node_modules
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: frontend/appflowy_tauri/node_modules
|
|
key: node-modules-${{ runner.os }}
|
|
|
|
- name: Install Rust toolchain
|
|
id: rust_toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
|
override: true
|
|
profile: minimal
|
|
|
|
- name: install dependencies (windows only)
|
|
if: matrix.platform == 'windows-latest'
|
|
working-directory: frontend
|
|
run: |
|
|
cargo install --force cargo-make
|
|
cargo install --force duckscript_cli
|
|
vcpkg integrate install
|
|
cargo make appflowy-tauri-deps-tools
|
|
npm install -g pnpm@${{ env.PNPM_VERSION }}
|
|
|
|
- name: install dependencies (ubuntu only)
|
|
if: matrix.platform == 'ubuntu-latest'
|
|
working-directory: frontend
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
|
cargo install --force cargo-make
|
|
cargo make appflowy-tauri-deps-tools
|
|
npm install -g pnpm@${{ env.PNPM_VERSION }}
|
|
|
|
- name: install dependencies (macOS only)
|
|
if: matrix.platform == 'macos-latest'
|
|
working-directory: frontend
|
|
run: |
|
|
cargo install --force cargo-make
|
|
cargo make appflowy-tauri-deps-tools
|
|
npm install -g pnpm@${{ env.PNPM_VERSION }}
|
|
|
|
- name: Build
|
|
working-directory: frontend/appflowy_tauri
|
|
run: |
|
|
mkdir dist
|
|
pnpm install
|
|
cargo make --cwd .. tauri_build
|
|
pnpm test
|
|
pnpm test:errors
|
|
|
|
- name: Check for uncommitted changes
|
|
run: |
|
|
diff_files=$(git status --porcelain)
|
|
if [ -n "$diff_files" ]; then
|
|
echo "There are uncommitted changes in the working tree. Please commit them before pushing."
|
|
exit 1
|
|
fi
|
|
|
|
- uses: tauri-apps/tauri-action@v0
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|