forked from AppFlowy-IO/AppFlowy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into time_parser
- Loading branch information
Showing
1,349 changed files
with
37,251 additions
and
16,899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: Flutter Integration Test | ||
description: Run integration tests for AppFlowy | ||
|
||
inputs: | ||
os: | ||
description: "The operating system to run the tests on" | ||
required: true | ||
flutter_version: | ||
description: "The version of Flutter to use" | ||
required: true | ||
rust_toolchain: | ||
description: "The version of Rust to use" | ||
required: true | ||
cargo_make_version: | ||
description: "The version of cargo-make to use" | ||
required: true | ||
rust_target: | ||
description: "The target to build for" | ||
required: true | ||
flutter_profile: | ||
description: "The profile to build with" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
id: rust_toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ inputs.rust_toolchain }} | ||
target: ${{ inputs.rust_target }} | ||
override: true | ||
profile: minimal | ||
|
||
- name: Install flutter | ||
id: flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
flutter-version: ${{ inputs.flutter_version }} | ||
cache: true | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
prefix-key: ${{ inputs.os }} | ||
workspaces: | | ||
frontend/rust-lib | ||
cache-all-crates: true | ||
|
||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-make@${{ inputs.cargo_make_version }}, duckscript_cli | ||
|
||
- name: Install prerequisites | ||
working-directory: frontend | ||
run: | | ||
if [ "$RUNNER_OS" == "Linux" ]; then | ||
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub | ||
sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list | ||
sudo apt-get update | ||
sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev keybinder-3.0 libnotify-dev | ||
elif [ "$RUNNER_OS" == "Windows" ]; then | ||
vcpkg integrate install | ||
elif [ "$RUNNER_OS" == "macOS" ]; then | ||
echo 'do nothing' | ||
fi | ||
cargo make appflowy-flutter-deps-tools | ||
shell: bash | ||
|
||
- name: Build AppFlowy | ||
working-directory: frontend | ||
run: cargo make --profile ${{ inputs.flutter_profile }} appflowy-core-dev | ||
shell: bash | ||
|
||
- name: Run code generation | ||
working-directory: frontend | ||
run: cargo make code_generation | ||
shell: bash | ||
|
||
- name: Flutter Analyzer | ||
working-directory: frontend/appflowy_flutter | ||
run: flutter analyze . | ||
shell: bash | ||
|
||
- name: Compress appflowy_flutter | ||
run: tar -czf appflowy_flutter.tar.gz frontend/appflowy_flutter | ||
shell: bash | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ github.run_id }}-${{ matrix.os }} | ||
path: appflowy_flutter.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Flutter Integration Test | ||
description: Run integration tests for AppFlowy | ||
|
||
inputs: | ||
test_path: | ||
description: "The path to the integration test file" | ||
required: true | ||
flutter_version: | ||
description: "The version of Flutter to use" | ||
required: true | ||
rust_toolchain: | ||
description: "The version of Rust to use" | ||
required: true | ||
cargo_make_version: | ||
description: "The version of cargo-make to use" | ||
required: true | ||
rust_target: | ||
description: "The target to build for" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Rust toolchain | ||
id: rust_toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ inputs.RUST_TOOLCHAIN }} | ||
target: ${{ inputs.rust_target }} | ||
override: true | ||
profile: minimal | ||
|
||
- name: Install flutter | ||
id: flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
flutter-version: ${{ inputs.flutter_version }} | ||
cache: true | ||
|
||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-make@${{ inputs.cargo_make_version }} | ||
|
||
- name: Install prerequisites | ||
working-directory: frontend | ||
run: | | ||
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub | ||
sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list | ||
sudo apt-get update | ||
sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev keybinder-3.0 libnotify-dev network-manager | ||
shell: bash | ||
|
||
- name: Enable Flutter Desktop | ||
run: | | ||
flutter config --enable-linux-desktop | ||
shell: bash | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ github.run_id }}-ubuntu-latest | ||
|
||
- name: Uncompressed appflowy_flutter | ||
run: tar -xf appflowy_flutter.tar.gz | ||
shell: bash | ||
|
||
- name: Run Flutter integration tests | ||
working-directory: frontend/appflowy_flutter | ||
run: | | ||
export DISPLAY=:99 | ||
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & | ||
sudo apt-get install network-manager | ||
flutter test ${{ inputs.test_path }} -d Linux --coverage | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# name: Android CI | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - "main" | ||
# paths: | ||
# - ".github/workflows/mobile_ci.yaml" | ||
# - "frontend/**" | ||
# - "!frontend/appflowy_tauri/**" | ||
|
||
# pull_request: | ||
# branches: | ||
# - "main" | ||
# paths: | ||
# - ".github/workflows/mobile_ci.yaml" | ||
# - "frontend/**" | ||
# - "!frontend/appflowy_tauri/**" | ||
|
||
# env: | ||
# CARGO_TERM_COLOR: always | ||
# FLUTTER_VERSION: "3.19.0" | ||
# RUST_TOOLCHAIN: "1.75" | ||
# CARGO_MAKE_VERSION: "0.36.6" | ||
|
||
# concurrency: | ||
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
# cancel-in-progress: true | ||
|
||
# jobs: | ||
# build: | ||
# if: github.event.pull_request.draft != true | ||
# strategy: | ||
# fail-fast: true | ||
# matrix: | ||
# os: [macos-14] | ||
# runs-on: ${{ matrix.os }} | ||
|
||
# steps: | ||
# - name: Check storage space | ||
# run: df -h | ||
|
||
# # the following step is required to avoid running out of space | ||
# - name: Maximize build space | ||
# if: matrix.os == 'ubuntu-latest' | ||
# run: | | ||
# sudo rm -rf /usr/share/dotnet | ||
# sudo rm -rf /opt/ghc | ||
# sudo rm -rf "/usr/local/share/boost" | ||
# sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
# sudo docker image prune --all --force | ||
# sudo rm -rf /opt/hostedtoolcache/codeQL | ||
# sudo rm -rf ${GITHUB_WORKSPACE}/.git | ||
# sudo rm -rf $ANDROID_HOME/ndk | ||
|
||
# - name: Check storage space | ||
# run: df -h | ||
|
||
# - name: Checkout source code | ||
# uses: actions/checkout@v4 | ||
|
||
# - uses: actions/setup-java@v4 | ||
# with: | ||
# distribution: temurin | ||
# java-version: 11 | ||
|
||
# - name: Install Rust toolchain | ||
# id: rust_toolchain | ||
# uses: actions-rs/toolchain@v1 | ||
# with: | ||
# toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
# override: true | ||
# profile: minimal | ||
|
||
# - name: Install flutter | ||
# id: flutter | ||
# uses: subosito/flutter-action@v2 | ||
# with: | ||
# channel: "stable" | ||
# flutter-version: ${{ env.FLUTTER_VERSION }} | ||
|
||
# - uses: gradle/gradle-build-action@v3 | ||
# with: | ||
# gradle-version: 7.4.2 | ||
|
||
# - uses: davidB/rust-cargo-make@v1 | ||
# with: | ||
# version: "0.36.6" | ||
|
||
# - name: Install prerequisites | ||
# working-directory: frontend | ||
# run: | | ||
# rustup target install aarch64-linux-android | ||
# rustup target install x86_64-linux-android | ||
# cargo install --force duckscript_cli | ||
# cargo install cargo-ndk | ||
# if [ "$RUNNER_OS" == "Linux" ]; then | ||
# sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub | ||
# sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list | ||
# sudo apt-get update | ||
# sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev | ||
# sudo apt-get install keybinder-3.0 libnotify-dev | ||
# sudo apt-get install gcc-multilib | ||
# elif [ "$RUNNER_OS" == "Windows" ]; then | ||
# vcpkg integrate install | ||
# elif [ "$RUNNER_OS" == "macOS" ]; then | ||
# echo 'do nothing' | ||
# fi | ||
# cargo make appflowy-flutter-deps-tools | ||
# shell: bash | ||
|
||
# - name: Build AppFlowy | ||
# working-directory: frontend | ||
# run: | | ||
# cargo make --profile development-android appflowy-android-dev-ci | ||
|
||
|
||
# - name: Run integration tests | ||
# # https://github.com/ReactiveCircus/android-emulator-runner | ||
# uses: reactivecircus/android-emulator-runner@v2 | ||
# with: | ||
# api-level: 32 | ||
# arch: arm64-v8a | ||
# disk-size: 2048M | ||
# working-directory: frontend/appflowy_flutter | ||
# script: flutter test integration_test/runner.dart |
Oops, something went wrong.