AppFlowy/.github/workflows/ci.yaml
2022-02-09 01:14:54 +08:00

81 lines
2.6 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-macos:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Env install
working-directory: frontend
run: make install_rust
- name: Checkout Flutter
uses: actions/checkout@v2
with:
repository: flutter/flutter
path: flutter
- name: Flutter
working-directory: flutter
run: |
echo "$(pwd)/bin" >> $GITHUB_PATH
export PATH="$PATH:$(pwd)/bin"
flutter channel stable
flutter config --enable-macos-desktop
flutter doctor
dart pub global activate protoc_plugin
- name: Deps
working-directory: frontend
run: |
cargo install --force cargo-make
cargo install --force duckscript_cli
cargo make flowy_dev
- name: Build
working-directory: frontend
run: cargo make --profile production-mac-x86 appflowy
build-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Packages
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 libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
- name: Rust
run: |
curl \
--proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
rustup toolchain install stable
rustup default stable
- name: Checkout Flutter
uses: actions/checkout@v2
with:
repository: flutter/flutter
path: flutter
- name: Flutter
working-directory: flutter
run: |
echo "$(pwd)/bin" >> $GITHUB_PATH
export PATH="$PATH:$(pwd)/bin"
flutter channel stable
flutter config --enable-linux-desktop
flutter doctor
dart pub global activate protoc_plugin
- name: Deps
working-directory: frontend
run: |
cargo install --force cargo-make
cargo install --force duckscript_cli
sudo apt-get install protobuf-compiler
cargo make flowy_dev
- name: Build
working-directory: frontend
run: cargo make --profile production-linux-x86 appflowy