version: 2.0 jobs: build: docker: - image: champtar/openwrtpackagesci@sha256:ba41678f7bd9dea5f1caef9594167588c306caf08bc2f90e779a91e57a9fc7bd environment: - SDK_BASE_URL: "https://downloads.lede-project.org/snapshots/targets/ar71xx/generic" - SDK_FILE: "openwrt-sdk-ar71xx-generic_gcc-7.3.0_musl.Linux-x86_64.tar.xz" branches: only: /pull.*/ steps: - run: name: Download the SDK working_directory: ~/sdk command: | curl "$SDK_BASE_URL/sha256sums" -sS -o sha256sums curl "$SDK_BASE_URL/sha256sums.asc" -sS -o sha256sums.asc gpg --with-fingerprint --verify sha256sums.asc sha256sums curl "$SDK_BASE_URL/$SDK_FILE" -sS -o "$SDK_FILE" sha256sum -c --ignore-missing sha256sums - checkout: path: ~/openwrt_packages - run: name: Prepare build_dir working_directory: ~/build_dir command: | tar Jxf ~/sdk/$SDK_FILE --strip=1 cat > feeds.conf < /dev/null ./scripts/feeds install -a > /dev/null make defconfig > /dev/null - run: name: Download & check & compile working_directory: ~/build_dir command: | PKGS=$(cd ~/openwrt_packages; git diff --diff-filter=d --name-only "origin/master" | grep 'Makefile$' | grep -v '/files/' | awk -F/ '{ print $(NF-1) }') echo "Packages: $PKGS" for PKG in $PKGS ; do make "package/$PKG/download" V=s make "package/$PKG/check" V=s done for PKG in $PKGS ; do make "package/$PKG/compile" -j3 V=s done - store_artifacts: path: ~/build_dir/logs - store_artifacts: path: ~/build_dir/bin