air101.yml 2.1 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. environment:
  12. giteeu:
  13. from_secret: giteeu
  14. giteep:
  15. from_secret: giteep
  16. commands:
  17. - cd ..
  18. - mv src/ LuatOS/
  19. - mkdir src
  20. - git clone --branch=master https://gitee.com/openLuat/luatos-soc-air101.git air101
  21. - cd air101
  22. - cp /hdd/ci/build/wm_tool ./tools/xt804/
  23. - export XMAKE_BINARY_REPO=https://gitee.com/xmake-mirror/build-artifacts.git
  24. - export XMAKE_MAIN_REPO=https://gitee.com/tboox/xmake-repo.git
  25. - /home/chenxu/.local/bin/xmake g --pkg_searchdirs=/hdd/ci/build --root
  26. - /home/chenxu/.local/bin/xmake -y --root
  27. - 7z x build/out/*.soc
  28. - ls build/out/ -la
  29. - cd mklfs/disk
  30. - rm -rf *
  31. - cd -
  32. - cd ..
  33. - git clone https://gitee.com/HashJeremy/luatos-test.git
  34. - cd luatos-test/luatos-soc-ci/script
  35. - rename 's/\.lua//' *.lua
  36. - cd -
  37. - for file in `ls luatos-test/luatos-soc-ci/script`; do cp luatos-test/luatos-soc-ci/script/$file air101/mklfs/disk; done
  38. - cd air101/mklfs/disk
  39. - ls
  40. - for file in `ls`; do /hdd/ci/build/luac_536_32bits -s -o $file.luac $file; done
  41. - ls
  42. - cd ..
  43. - python3 /hdd/ci/build/luadb.py disk/
  44. - cd ..
  45. - cp mklfs/disk.fs build/out/script.bin
  46. - /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
  47. - ls build/out/ -la
  48. - cat build/out/script.img >> build/out/AIR101.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\"}'"