main.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: UFBT Build and Test App
  2. on:
  3. push:
  4. branches:
  5. - main
  6. - dev
  7. pull_request:
  8. branches:
  9. - main
  10. - dev
  11. jobs:
  12. build:
  13. name: Build and Test Application
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Checkout Repository
  17. uses: actions/checkout@v3
  18. - name: Set up Python
  19. uses: actions/setup-python@v4
  20. with:
  21. python-version: '3.x'
  22. - name: Install UFBT
  23. run: |
  24. python3 -m pip install --upgrade pip
  25. pip install ufbt
  26. - name: Initialize UFBT Environment (Dev)
  27. if: github.ref == 'refs/heads/dev'
  28. run: |
  29. ufbt update --index-url=https://update.flipperzero.one/firmware/directory.json --channel=dev
  30. ufbt vscode_dist
  31. - name: Initialize UFBT Environment (Main)
  32. if: github.ref == 'refs/heads/main'
  33. run: |
  34. ufbt update --index-url=https://update.flipperzero.one/firmware/directory.json --channel=release
  35. ufbt vscode_dist
  36. - name: Build FAP Applications
  37. run: ufbt faps
  38. - name: Upload Build Artifacts
  39. uses: actions/upload-artifact@v4
  40. with:
  41. name: build-output
  42. path: build/