pc-build.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. name: Build (Linux, Mac OS, Windows)
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches: [main]
  7. jobs:
  8. build-linux:
  9. name: "Build Linux"
  10. runs-on: ubuntu-latest
  11. env:
  12. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  13. steps:
  14. - uses: actions/checkout@v4.3.4
  15. - name: Setup Flutter SDK
  16. uses: subosito/flutter-action@v1.5.3
  17. with:
  18. channel: "stable"
  19. flutter-version: "3.0.5"
  20. - name: Install Linux build tools
  21. run: sudo apt-get update && sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
  22. - name: Enable desktop
  23. run: flutter config --enable-linux-desktop
  24. - name: Get packages
  25. run: flutter pub get
  26. - name: Analyze
  27. run: flutter analyze
  28. - name: Flutter build app
  29. run: flutter build linux
  30. build-macos:
  31. name: "Build MacOS"
  32. runs-on: macos-latest
  33. env:
  34. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  35. steps:
  36. - uses: actions/checkout@v4.3.4
  37. - name: Setup Flutter SDK
  38. uses: subosito/flutter-action@v1.5.3
  39. with:
  40. channel: "stable"
  41. flutter-version: "3.0.5"
  42. - name: Set Up XCode
  43. uses: devbotsxyz/xcode-select@v1.1.0
  44. - name: Enable desktop
  45. run: flutter config --enable-macos-desktop
  46. - name: Get packages
  47. run: flutter pub get
  48. - name: Analyze
  49. run: flutter analyze
  50. - name: Flutter build app
  51. run: flutter build macos
  52. build-windows:
  53. name: "Build Windows"
  54. runs-on: windows-latest
  55. env:
  56. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  57. steps:
  58. - uses: actions/checkout@v4.3.4
  59. - name: Setup Flutter SDK
  60. uses: subosito/flutter-action@v1.5.3
  61. with:
  62. channel: "stable"
  63. flutter-version: "3.0.5"
  64. - name: Enable desktop
  65. run: flutter config --enable-windows-desktop
  66. - name: Get packages
  67. run: flutter pub get
  68. - name: Analyze
  69. run: flutter analyze
  70. - name: Flutter build app
  71. run: flutter build windows
  72. # build_windows:
  73. # name: Build Flutter (Windows)
  74. # needs: [flutter_test]
  75. # runs-on: ubuntu-latest
  76. # steps:
  77. # - uses: actions/checkout@v4
  78. # - uses: actions/setup-java@v1
  79. # with:
  80. # java-version: "12.x"
  81. # - uses: subosito/flutter-action@v1
  82. # with:
  83. # channel: "stable"
  84. # - run: flutter pub get
  85. # - run: flutter clean
  86. # - run: flutter build windows
  87. # - run: flutter pub run msix:create
  88. # - name: Upload msix
  89. # uses: actions/upload-artifact@v2
  90. # with:
  91. # name: app
  92. # path: build/windows/runner/Release/shodana_reader.msix