ci.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. lfs: true
  18. - uses: satackey/action-docker-layer-caching@v0.0.8
  19. continue-on-error: true
  20. with:
  21. key: docker-cache-${{ hashFiles('docker/**') }}-{hash}
  22. restore-keys: docker-cache-${{ hashFiles('docker/**') }}-
  23. - name: Build docker image
  24. uses: ./.github/actions/docker
  25. - name: Check syntax
  26. uses: ./.github/actions/docker
  27. continue-on-error: false
  28. with:
  29. run: /syntax_check.sh
  30. - name: Build F2 bootloader in docker
  31. uses: ./.github/actions/docker
  32. with:
  33. run: make -C bootloader TARGET=f2
  34. - name: Publish F2 bootloader artifacts
  35. uses: actions/upload-artifact@v2
  36. with:
  37. name: bootloader_f2
  38. path: |
  39. bootloader/.obj/f2/bootloader.elf
  40. bootloader/.obj/f2/bootloader.bin
  41. bootloader/.obj/f2/bootloader.hex
  42. if-no-files-found: error
  43. - name: Build local testing firmware in docker
  44. uses: ./.github/actions/docker
  45. with:
  46. run: make -C firmware TARGET=local
  47. - name: Run local tests
  48. uses: ./.github/actions/docker
  49. with:
  50. run: make -C firmware TARGET=local APP_TEST=1 run
  51. - name: Build F2 firmware in docker
  52. uses: ./.github/actions/docker
  53. with:
  54. run: make -C firmware TARGET=f2 APP_RELEASE=1
  55. - name: Publish F2 firmware artifacts
  56. uses: actions/upload-artifact@v2
  57. with:
  58. name: firmware_f2
  59. path: |
  60. firmware/.obj/f2/firmware.elf
  61. firmware/.obj/f2/firmware.bin
  62. firmware/.obj/f2/firmware.hex
  63. if-no-files-found: error