-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
97 additions
and
2 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
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,93 @@ | ||
name: iOS 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: | ||
FLUTTER_VERSION: "3.18.0-0.2.pre" | ||
RUST_TOOLCHAIN: "1.75" | ||
|
||
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-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust toolchain | ||
id: rust_toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ env.RUST_TOOLCHAIN }} | ||
target: aarch64-apple-ios-sim | ||
override: true | ||
profile: minimal | ||
|
||
- name: Install flutter | ||
id: flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "beta" | ||
flutter-version: ${{ env.FLUTTER_VERSION }} | ||
cache: true | ||
|
||
- uses: futureware-tech/simulator-action@v1 | ||
id: simulator | ||
with: | ||
model: "iPhone 13" | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
prefix-key: ${{ matrix.os }} | ||
workspaces: | | ||
frontend/rust-lib | ||
- uses: davidB/rust-cargo-make@v1 | ||
with: | ||
version: "0.36.6" | ||
|
||
- name: Install prerequisites | ||
working-directory: frontend | ||
run: | | ||
rustup target install aarch64-apple-ios-sim | ||
cargo install --force duckscript_cli | ||
cargo install cargo-lipo | ||
cargo make appflowy-flutter-deps-tools | ||
shell: bash | ||
|
||
- name: Build AppFlowy | ||
working-directory: frontend | ||
run: | | ||
cargo make --profile development-ios-arm64-sim appflowy-core-dev-ios | ||
- name: Run integration tests | ||
working-directory: frontend/appflowy_flutter | ||
run: | | ||
flutter drive \ | ||
--driver=test_driver/integration_test.dart \ | ||
--target=integration_test/runner.dart \ | ||
-d steps.simulator.outputs.udid |