You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.3 KiB

  1. version: 2.0
  2. jobs:
  3. build:
  4. docker:
  5. - image: champtar/openwrtpackagesci@sha256:4d8bea09b6fd51e015f417a8f0056b914d0db6aa9829b0049065a077f52a91e9
  6. environment:
  7. - SDK_BASE_URL: "https://downloads.lede-project.org/snapshots/targets/ar71xx/generic"
  8. - SDK_FILE: "openwrt-sdk-ar71xx-generic_gcc-7.3.0_musl.Linux-x86_64.tar.xz"
  9. - BRANCH: "master"
  10. steps:
  11. - run:
  12. name: Download the SDK
  13. working_directory: ~/sdk
  14. command: |
  15. curl "$SDK_BASE_URL/sha256sums" -sS -o sha256sums
  16. curl "$SDK_BASE_URL/sha256sums.asc" -sS -o sha256sums.asc
  17. gpg --with-fingerprint --verify sha256sums.asc sha256sums
  18. curl "$SDK_BASE_URL/$SDK_FILE" -sS -o "$SDK_FILE"
  19. sha256sum -c --ignore-missing sha256sums
  20. - checkout:
  21. path: ~/openwrt_packages
  22. - run:
  23. name: Prepare build_dir
  24. working_directory: ~/build_dir
  25. command: |
  26. tar Jxf ~/sdk/$SDK_FILE --strip=1
  27. cat > feeds.conf <<EOF
  28. src-git base https://github.com/lede-project/source.git
  29. src-link packages $HOME/openwrt_packages
  30. src-git luci https://github.com/openwrt/luci.git
  31. EOF
  32. cat feeds.conf
  33. # enable BUILD_LOG
  34. sed -i '1s/^/config BUILD_LOG\n\tbool\n\tdefault y\n\n/' Config-build.in
  35. ./scripts/feeds update -a > /dev/null
  36. ./scripts/feeds install -a > /dev/null
  37. make defconfig > /dev/null
  38. - run:
  39. name: Download & check & compile
  40. working_directory: ~/build_dir
  41. command: |
  42. PKGS=$(cd ~/openwrt_packages; git diff --diff-filter=d --name-only "origin/$BRANCH..." | grep 'Makefile$' | grep -v '/files/' | awk -F/ '{ print $(NF-1) }')
  43. echo "Packages: $PKGS"
  44. for PKG in $PKGS ; do
  45. make "package/$PKG/download" V=s
  46. make "package/$PKG/check" V=s
  47. done
  48. for PKG in $PKGS ; do
  49. make "package/$PKG/compile" -j3 V=s
  50. done
  51. - store_artifacts:
  52. path: ~/build_dir/logs
  53. - store_artifacts:
  54. path: ~/build_dir/bin
  55. workflows:
  56. version: 2
  57. buildpr:
  58. jobs:
  59. - build:
  60. filters:
  61. branches:
  62. ignore: master