ci.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. name: 'CI'
  2. on:
  3. push:
  4. branches: [ master ]
  5. paths-ignore:
  6. - 'wiki/**'
  7. - 'wiki_static/**'
  8. pull_request:
  9. jobs:
  10. build:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout code
  14. uses: actions/checkout@v2
  15. with:
  16. submodules: true
  17. - uses: satackey/action-docker-layer-caching@v0.0.8
  18. continue-on-error: true
  19. with:
  20. key: docker-cache-${{ hashFiles('docker/**') }}-{hash}
  21. restore-keys: docker-cache-${{ hashFiles('docker/**') }}-
  22. - name: Build docker image
  23. uses: ./.github/actions/docker
  24. - name: Check syntax
  25. uses: ./.github/actions/docker
  26. continue-on-error: false
  27. with:
  28. run: /syntax_check.sh
  29. - name: Build F2 bootloader in docker
  30. uses: ./.github/actions/docker
  31. with:
  32. run: make -C bootloader TARGET=f2
  33. - name: Publish F2 bootloader artifacts
  34. uses: actions/upload-artifact@v2
  35. with:
  36. name: bootloader_f2
  37. path: |
  38. bootloader/.obj/f2/bootloader.elf
  39. bootloader/.obj/f2/bootloader.bin
  40. bootloader/.obj/f2/bootloader.hex
  41. if-no-files-found: error
  42. - name: Build local testing firmware in docker
  43. uses: ./.github/actions/docker
  44. with:
  45. run: make -C firmware TARGET=local
  46. - name: Run local tests
  47. uses: ./.github/actions/docker
  48. with:
  49. run: make -C firmware TARGET=local APP_TEST=1 run
  50. - name: Build F2 firmware in docker
  51. uses: ./.github/actions/docker
  52. with:
  53. run: make -C firmware TARGET=f2 APP_RELEASE=1
  54. - name: Publish F2 firmware artifacts
  55. uses: actions/upload-artifact@v2
  56. with:
  57. name: firmware_f2
  58. path: |
  59. firmware/.obj/f2/firmware.elf
  60. firmware/.obj/f2/firmware.bin
  61. firmware/.obj/f2/firmware.hex
  62. if-no-files-found: error