8850.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. name: 8850
  2. on:
  3. # push:
  4. # paths:
  5. # - '.github/workflows/8850.yml'
  6. # - 'lua/**'
  7. # - 'luat/**'
  8. # - 'components/**'
  9. workflow_dispatch:
  10. repository_dispatch:
  11. types:
  12. - webhook-8850-action
  13. jobs:
  14. build:
  15. runs-on: ubuntu-20.04
  16. steps:
  17. - uses: actions/checkout@v1
  18. - name: prepare software
  19. run: |
  20. wget -q https://github.com/openLuat/LuatOS/releases/download/v0.0.1/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 -O gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
  21. tar jxvf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
  22. - name: clone 8850
  23. env:
  24. REPO: ${{ secrets.REPO8850 }}
  25. run: |
  26. sudo sh -c "curl https://raw.githubusercontent.com/kadwanev/retry/master/retry -o /usr/local/bin/retry && chmod +x /usr/local/bin/retry"
  27. cd ..
  28. retry 'git clone --branch=luatos-soc $REPO 8850'
  29. - name: make
  30. run: |
  31. cd ..
  32. chmod 777 -R 8850/
  33. cd 8850
  34. sed -i 's/`pwd`\/prebuilts\/linux\/gcc-arm-none-eabi\/bin/\/home\/runner\/work\/LuatOS\/LuatOS\/gcc-arm-none-eabi-10.3-2021.10\/bin/g' build.sh
  35. cp CMakeLists样本.txt CMakeLists.txt
  36. sed -i 's/E:\/\/LuatOS/\/home\/runner\/work\/LuatOS\/LuatOS\//g' CMakeLists.txt
  37. chmod +x build.sh
  38. chmod +x prebuilts/linux/bin/*
  39. chmod +x tools/linux/*
  40. mkdir ../LuatOS/luatosfw
  41. mkdir out
  42. mkdir out/8850BM_LuatOS_debug
  43. bash build_8850BM.sh
  44. cp hex/8850BM_LuatOS_debug/*.soc ../LuatOS/luatosfw
  45. rm -rf hex/
  46. rm -rf out/
  47. mkdir out
  48. mkdir out/8850DG_LuatOS_debug
  49. bash build_8850DG.sh
  50. cp hex/8850DG_LuatOS_debug/*.soc ../LuatOS/luatosfw
  51. - name: Upload artifact
  52. uses: actions/upload-artifact@v1
  53. with:
  54. name: soc8850
  55. path: luatosfw
  56. - name: report if failure
  57. if: always()
  58. env:
  59. STATUS: ${{ job.status }}
  60. MQTTADDR: ${{ secrets.MQTTADDR }}
  61. MQTTPORT: ${{ secrets.MQTTPORT }}
  62. MQTTTOPIC: ${{ secrets.MQTTTOPIC }}
  63. DD_APPKEY: ${{ secrets.DD_APPKEY }}
  64. DD_APPSECRET: ${{ secrets.DD_APPSECRET }}
  65. DD_NOTIFY_LIST: ${{ secrets.DD_NOTIFY_LIST }}
  66. DD_API_TOKEN: ${{ secrets.DD_API_TOKEN }}
  67. DD_API_SEND: ${{ secrets.DD_API_SEND }}
  68. run: |
  69. sudo pip3 install paho_mqtt gitpython requests
  70. cd tools
  71. if [ "$STATUS" = "failure" ];then python3 ciNotify.py $MQTTADDR $MQTTPORT $MQTTTOPIC "https://github.com/openLuat/LuatOS/actions/runs/$GITHUB_RUN_ID" "8850" "$DD_APPKEY" "$DD_APPSECRET" "$DD_NOTIFY_LIST" "$DD_API_TOKEN" "$DD_API_SEND"; fi