air640w.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. name: air640w
  2. on:
  3. # push:
  4. # paths:
  5. # - '.github/workflows/air640w.yml'
  6. # - 'lua/**'
  7. # - 'luat/**'
  8. # - 'components/**'
  9. # - 'bsp/air640w/**'
  10. workflow_dispatch:
  11. jobs:
  12. build:
  13. runs-on: ubuntu-20.04
  14. steps:
  15. - uses: actions/checkout@v1
  16. - name: prepare software
  17. run: |
  18. cd ..
  19. sudo apt-get update
  20. sudo apt-get install git gcc-multilib libc6 libgcc1 libstdc++5 libstdc++6 libsdl-dev scons p7zip-full -y
  21. sudo apt-get install libncurses5-dev -y
  22. sudo pip install requests
  23. wget -q https://github.com/openLuat/LuatOS/releases/download/v0.0.1/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
  24. sudo tar xjf gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 -C /opt
  25. /opt/gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc --version
  26. - name: clone rtt
  27. run: |
  28. git clone https://github.com/RT-Thread/rt-thread.git ~/work/action/rt-thread
  29. cd ~/work/action/rt-thread
  30. - name: prepare packages
  31. run: |
  32. cd bsp/air640w/rtt
  33. export RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-6-2017-q2-update/bin
  34. export RTT_ROOT=~/work/action/rt-thread
  35. echo | scons --menuconfig
  36. source ~/.env/env.sh
  37. wget https://github.com/openLuat/LuatOS/releases/download/v0.0.1/packages-640w.7z
  38. 7z x packages-640w.7z
  39. chmod 755 -R packages/wm_libraries-latest/Tools/
  40. - name: make
  41. run: |
  42. cd bsp/air640w/rtt
  43. export RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-6-2017-q2-update/bin
  44. export RTT_ROOT=~/work/action/rt-thread
  45. source ~/.env/env.sh
  46. scons -j2
  47. - name: Upload artifact
  48. uses: actions/upload-artifact@v1
  49. with:
  50. name: air640w
  51. path: bsp/air640w/rtt/Bin
  52. - name: report if failure
  53. if: always()
  54. env:
  55. STATUS: ${{ job.status }}
  56. MQTTADDR: ${{ secrets.MQTTADDR }}
  57. MQTTPORT: ${{ secrets.MQTTPORT }}
  58. MQTTTOPIC: ${{ secrets.MQTTTOPIC }}
  59. DD_APPKEY: ${{ secrets.DD_APPKEY }}
  60. DD_APPSECRET: ${{ secrets.DD_APPSECRET }}
  61. DD_NOTIFY_LIST: ${{ secrets.DD_NOTIFY_LIST }}
  62. DD_API_TOKEN: ${{ secrets.DD_API_TOKEN }}
  63. DD_API_SEND: ${{ secrets.DD_API_SEND }}
  64. run: |
  65. sudo pip3 install paho_mqtt gitpython requests
  66. cd tools
  67. if [ "$STATUS" = "failure" ];then python3 ciNotify.py $MQTTADDR $MQTTPORT $MQTTTOPIC "https://github.com/openLuat/LuatOS/actions/runs/$GITHUB_RUN_ID" "$DD_APPKEY" "$DD_APPSECRET" "$DD_NOTIFY_LIST" "$DD_API_TOKEN" "$DD_API_SEND"; fi