ci.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. name: CI
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches: [main]
  7. jobs:
  8. build-macos:
  9. runs-on: macOS-latest
  10. steps:
  11. - name: Checkout
  12. uses: actions/checkout@v2
  13. - name: Env install
  14. working-directory: frontend
  15. run: make install_rust
  16. - name: Checkout Flutter
  17. uses: actions/checkout@v2
  18. with:
  19. repository: flutter/flutter
  20. path: flutter
  21. - name: Flutter
  22. working-directory: flutter
  23. run: |
  24. echo "$(pwd)/bin" >> $GITHUB_PATH
  25. export PATH="$PATH:$(pwd)/bin"
  26. flutter channel stable
  27. flutter config --enable-macos-desktop
  28. flutter doctor
  29. dart pub global activate protoc_plugin
  30. - name: Deps
  31. working-directory: frontend
  32. run: |
  33. cargo install --force cargo-make
  34. cargo install --force duckscript_cli
  35. cargo make flowy_dev
  36. echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH
  37. - name: Build
  38. working-directory: frontend
  39. run: cargo make --profile production-mac-x86 appflowy
  40. build-ubuntu:
  41. runs-on: ubuntu-latest
  42. steps:
  43. - name: Checkout
  44. uses: actions/checkout@v2
  45. - name: Packages
  46. run: |
  47. sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
  48. sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
  49. sudo apt-get update
  50. sudo apt-get install -y dart curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
  51. - name: Rust
  52. run: |
  53. curl \
  54. --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
  55. source $HOME/.cargo/env
  56. rustup toolchain install stable
  57. rustup default stable
  58. - name: Checkout Flutter
  59. uses: actions/checkout@v2
  60. with:
  61. repository: flutter/flutter
  62. path: flutter
  63. - name: Flutter
  64. working-directory: flutter
  65. run: |
  66. echo "$(pwd)/bin" >> $GITHUB_PATH
  67. export PATH="$PATH:$(pwd)/bin"
  68. flutter channel stable
  69. flutter config --enable-linux-desktop
  70. flutter doctor
  71. dart pub global activate protoc_plugin
  72. - name: Deps
  73. working-directory: frontend
  74. run: |
  75. cargo install --force cargo-make
  76. cargo install --force duckscript_cli
  77. cargo make flowy_dev
  78. echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH
  79. - name: Build
  80. working-directory: frontend
  81. run: cargo make --profile production-linux-x86 appflowy