ci.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. - uses: satackey/action-docker-layer-caching@v0.0.8
  16. continue-on-error: true
  17. with:
  18. key: docker-cache-${{ hashFiles('docker/**') }}-{hash}
  19. restore-keys: docker-cache-${{ hashFiles('docker/**') }}-
  20. - name: Build docker image
  21. uses: ./.github/actions/docker
  22. - name: Check syntax
  23. uses: ./.github/actions/docker
  24. continue-on-error: true
  25. with:
  26. run: /syntax_check.sh
  27. - name: Build target_lo in docker
  28. uses: ./.github/actions/docker
  29. with:
  30. run: make -C target_lo
  31. - name: Build target_f1 in docker
  32. uses: ./.github/actions/docker
  33. with:
  34. run: make -C target_f1
  35. - name: Publish target_f1 artifacts
  36. uses: actions/upload-artifact@v2
  37. with:
  38. name: target_f1
  39. path: |
  40. target_f1/build/target_prod.elf
  41. target_f1/build/target_prod.bin
  42. target_f1/build/target_prod.hex
  43. if-no-files-found: error
  44. - name: Build target_f2 in docker
  45. uses: ./.github/actions/docker
  46. with:
  47. run: make -C target_f2
  48. - name: Publish target_f2 artifacts
  49. uses: actions/upload-artifact@v2
  50. with:
  51. name: target_f2
  52. path: |
  53. target_f2/build/target_prod.elf
  54. target_f2/build/target_prod.bin
  55. target_f2/build/target_prod.hex
  56. if-no-files-found: error
  57. - name: Build bootloader in docker
  58. uses: ./.github/actions/docker
  59. with:
  60. run: make -C bootloader
  61. - name: Publish bootloader artifacts
  62. uses: actions/upload-artifact@v2
  63. with:
  64. name: bootloader
  65. path: |
  66. bootloader/.obj/bootloader.elf
  67. bootloader/.obj/bootloader.bin
  68. bootloader/.obj/bootloader.hex
  69. if-no-files-found: error