build.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. name: "Build"
  2. on:
  3. push:
  4. pull_request:
  5. concurrency:
  6. group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  7. cancel-in-progress: true
  8. env:
  9. DEFAULT_TARGET: f7
  10. FBT_GIT_SUBMODULE_SHALLOW: 1
  11. jobs:
  12. build:
  13. runs-on: ubuntu-latest
  14. strategy:
  15. fail-fast: false
  16. matrix:
  17. target: [f7]
  18. steps:
  19. - name: "Checkout firmware"
  20. uses: actions/checkout@v4
  21. with:
  22. repository: Next-Flip/Momentum-Firmware
  23. fetch-depth: 1
  24. ref: dev
  25. submodules: recursive
  26. - name: "Checkout apps"
  27. uses: actions/checkout@v4
  28. with:
  29. path: applications/external
  30. fetch-depth: 1
  31. ref: ${{ github.event.pull_request.head.sha }}
  32. - name: "Get commit details"
  33. run: |
  34. BUILD_TYPE='DEBUG=0 COMPACT=1'
  35. echo "FBT_BUILD_TYPE=$BUILD_TYPE" >> $GITHUB_ENV
  36. echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
  37. echo "TARGET_HW=$(echo "${{ matrix.target }}" | sed 's/f//')" >> $GITHUB_ENV
  38. - name: "Build the firmware and apps"
  39. run: |
  40. git add applications/external
  41. ./fbt TARGET_HW=$TARGET_HW $FBT_BUILD_TYPE updater_package
  42. - name: "Check for uncommitted changes"
  43. run: |
  44. git diff --exit-code
  45. - name: "Upload artifacts to GitHub"
  46. uses: actions/upload-artifact@v3
  47. with:
  48. path: |
  49. dist/${{ env.TARGET }}-*/flipper-z-${{ env.TARGET }}-update-*