ci.yaml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. - name: Deps
  30. working-directory: frontend
  31. run: |
  32. cargo install --force cargo-make
  33. cargo install --force duckscript_cli
  34. cargo make flowy_dev
  35. echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH
  36. - name: Build
  37. working-directory: frontend
  38. run: cargo make --profile production-mac-x86 appflowy
  39. build-ubuntu:
  40. runs-on: ubuntu-latest
  41. steps:
  42. - name: Checkout
  43. uses: actions/checkout@v2
  44. - name: Packages
  45. run: |
  46. sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
  47. sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list
  48. sudo apt-get update
  49. sudo apt-get install -y dart curl build-essential libsqlite3-dev libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev
  50. - name: Rust
  51. run: |
  52. curl \
  53. --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
  54. source $HOME/.cargo/env
  55. rustup toolchain install stable
  56. rustup default stable
  57. - name: Checkout Flutter
  58. uses: actions/checkout@v2
  59. with:
  60. repository: flutter/flutter
  61. path: flutter
  62. - name: Flutter
  63. working-directory: flutter
  64. run: |
  65. echo "$(pwd)/bin" >> $GITHUB_PATH
  66. export PATH="$PATH:$(pwd)/bin"
  67. flutter channel stable
  68. flutter config --enable-linux-desktop
  69. flutter doctor
  70. - name: Deps
  71. working-directory: frontend
  72. run: |
  73. cargo install --force cargo-make
  74. cargo install --force duckscript_cli
  75. cargo make flowy_dev
  76. echo PATH="$PATH":"$HOME/.pub-cache/bin" >> $GITHUB_PATH
  77. - name: Build
  78. working-directory: frontend
  79. run: cargo make --profile production-linux-x86 appflowy