ci.yaml 2.5 KB

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