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.

61 lines
2.2 KiB

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