air101.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. kind: pipeline
  2. type: exec
  3. name: shell
  4. concurrency:
  5. limit: 1
  6. platform:
  7. os: linux
  8. arch: amd64
  9. steps:
  10. - name: build 101
  11. commands:
  12. - cd ..
  13. - mv src/ LuatOS/
  14. - mkdir src
  15. - git clone --branch=master https://gitee.com/openLuat/luatos-soc-air101.git air101
  16. - cd air101
  17. - cp /hdd/ci/build/wm_tool ./tools/xt804/
  18. - export XMAKE_BINARY_REPO=https://gitee.com/xmake-mirror/build-artifacts.git
  19. - export XMAKE_MAIN_REPO=https://gitee.com/tboox/xmake-repo.git
  20. - /home/chenxu/.local/bin/xmake g --pkg_searchdirs=/hdd/ci/build --root
  21. - /home/chenxu/.local/bin/xmake -y --root
  22. - 7z x build/out/*.soc
  23. - ls build/out/ -la
  24. - cd mklfs/disk
  25. - rm -rf *
  26. - cd -
  27. - cd ..
  28. - git clone https://gitee.com/HashJeremy/luatos-test.git
  29. - cd luatos-test/luatos-soc-ci/script
  30. - rename 's/\.lua//' *.lua
  31. - cd -
  32. - for file in `ls luatos-test/luatos-soc-ci/script`; do cp luatos-test/luatos-soc-ci/script/$file air101/mklfs/disk; done
  33. - cd air101/mklfs/disk
  34. - ls
  35. - for file in `ls`; do /hdd/ci/build/luac_536_32bits -o $file.luac $file; done
  36. - ls
  37. - cd ..
  38. - python3 /hdd/ci/build/luadb.py disk/
  39. - cd ..
  40. - datename=$(date +%Y%m%d-%H%M%S)
  41. - mkdir /hdd/ci/fw_bak/$datename
  42. - cp build/out/AIR101.fls /hdd/ci/fw_bak/$datename/AIR101.fls
  43. - cp mklfs/disk.fs build/out/script.bin
  44. - /hdd/ci/build/wm_tool -b build/out/script.bin -it 1 -fc 0 -ih 20008000 -ra 81E0000 -ua 0 -nh 0 -un 0 -o build/out/script
  45. - ls build/out/ -la
  46. - cp build/out/script.img /hdd/ci/fw_bak/$datename/script.img
  47. - cat build/out/script.img >> build/out/AIR101.fls
  48. - cp build/out/AIR101.fls /hdd/ci/fw_bak/$datename/all.fls
  49. - ls build/out/ -la
  50. - rm /hdd/ci/flash/*
  51. - cp build/out/AIR101.fls /hdd/ci/flash
  52. - name: flash
  53. commands:
  54. - /hdd/ci/build/wm_tool -ds 921600 -ws 115200 -c ttyUSB0 -rs rts -dl /hdd/ci/flash/AIR101.fls
  55. - name: test
  56. commands:
  57. - /hdd/ci/build/uart_check --port /dev/ttyUSB0
  58. - name: notify
  59. when:
  60. status:
  61. - failure
  62. environment:
  63. token:
  64. from_secret: github_token
  65. commands:
  66. - "curl -X POST -H \"Accept: application/vnd.github.v3+json\" https://api.github.com/repos/openLuat/LuatOS/dispatches -H \"Authorization: token $token \" -d '{\"event_type\": \"webhook_air101ci_notify\"}'"