win32.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. name: win32
  2. on:
  3. push:
  4. paths:
  5. - '.github/workflows/win32.yml'
  6. - 'lua/**'
  7. - 'luat/**'
  8. - 'components/**'
  9. - 'bsp/win32/**'
  10. workflow_dispatch:
  11. jobs:
  12. build:
  13. runs-on: windows-2019
  14. steps:
  15. - uses: actions/checkout@v1
  16. - name: build
  17. run: |
  18. Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
  19. cd bsp/win32
  20. xmake -y
  21. cd build/out
  22. Invoke-WebRequest -Uri "https://github.com/openLuat/LuatOS/releases/download/v0.0.1/luat_uart.dll" -OutFile "luat_uart.dll"
  23. - name: Upload artifact
  24. uses: actions/upload-artifact@v1
  25. with:
  26. name: luatos_win32
  27. path: bsp/win32/build/out
  28. - name: report if failure
  29. if: always()
  30. env:
  31. STATUS: ${{ job.status }}
  32. MQTTADDR: ${{ secrets.MQTTADDR }}
  33. MQTTPORT: ${{ secrets.MQTTPORT }}
  34. MQTTTOPIC: ${{ secrets.MQTTTOPIC }}
  35. DD_APPKEY: ${{ secrets.DD_APPKEY }}
  36. DD_APPSECRET: ${{ secrets.DD_APPSECRET }}
  37. DD_NOTIFY_LIST: ${{ secrets.DD_NOTIFY_LIST }}
  38. DD_API_TOKEN: ${{ secrets.DD_API_TOKEN }}
  39. DD_API_SEND: ${{ secrets.DD_API_SEND }}
  40. run: |
  41. cd tools
  42. pip install paho-mqtt gitpython requests -t ./
  43. if($env:STATUS -eq "failure"){ python ciNotify.py $env:MQTTADDR $env:MQTTPORT $env:MQTTTOPIC "https://github.com/openLuat/LuatOS/actions/runs/$GITHUB_RUN_ID" "win32" "$env:DD_APPKEY" "$env:DD_APPSECRET" "$env:DD_NOTIFY_LIST" "$env:DD_API_TOKEN" "$env:DD_API_SEND"; }