air105.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. name: air105
  2. on:
  3. push:
  4. paths:
  5. - '.github/workflows/air105.yml'
  6. - 'lua/**'
  7. - 'luat/**'
  8. - 'components/**'
  9. - 'bsp/air105/**'
  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. sudo apt-get update
  19. sudo apt-get install git gcc-multilib libc6 libgcc1 libstdc++5 libstdc++6 libsdl-dev p7zip-full -y
  20. sudo apt-get install libncurses5-dev -y
  21. sudo add-apt-repository ppa:xmake-io/xmake -y
  22. sudo apt update
  23. sudo apt install xmake
  24. 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
  25. sudo tar xjf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 -C /opt
  26. /opt/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gcc --version
  27. rm gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
  28. - name: clone 105
  29. env:
  30. AIR105REPO: ${{ secrets.AIR105REPO }}
  31. run: |
  32. sudo sh -c "curl https://raw.githubusercontent.com/kadwanev/retry/master/retry -o /usr/local/bin/retry && chmod +x /usr/local/bin/retry"
  33. cd ..
  34. retry 'git clone --depth=1 --branch=master ${AIR105REPO} air105'
  35. - name: make
  36. run: |
  37. cd ../air105/core
  38. xmake
  39. mkdir ../../LuatOS/luatosfw
  40. mv build/out/*.soc ../../LuatOS/luatosfw
  41. - name: Upload artifact
  42. uses: actions/upload-artifact@v1
  43. with:
  44. name: air105
  45. path: luatosfw
  46. - name: report if failure
  47. if: always()
  48. env:
  49. STATUS: ${{ job.status }}
  50. MQTTADDR: ${{ secrets.MQTTADDR }}
  51. MQTTPORT: ${{ secrets.MQTTPORT }}
  52. MQTTTOPIC: ${{ secrets.MQTTTOPIC }}
  53. run: |
  54. sudo pip3 install paho_mqtt
  55. cd tools
  56. if [ "$STATUS" = "failure" ];then python3 ciNotify.py $MQTTADDR $MQTTPORT $MQTTTOPIC "air105 https://github.com/openLuat/LuatOS/actions/runs/$GITHUB_RUN_ID"; fi