version: 2.0 jobs: build: docker: - image: docker.io/champtar/openwrtpackagesci@sha256:96ef72edc70cba371ea5676fba15ee25b3a94f538f648a27454b699edce61da0 environment: - SDK_BASE_URL: "https://downloads.openwrt.org/snapshots/targets/ar71xx/generic" - SDK_FILE: "openwrt-sdk-ar71xx-generic_gcc-7.3.0_musl.Linux-x86_64.tar.xz" - BRANCH: "master" steps: - checkout: path: ~/openwrt_packages - run: name: Check changes / verify commits working_directory: ~/openwrt_packages command: | cat >> $BASH_ENV <: ' ($subject)" RET=1 fi body="$(git show -s --format=%b $commit)" sob="$(git show -s --format='Signed-off-by: %aN <%aE>' $commit)" if echo "$body" | grep -qF "$sob"; then echo_green "Signed-off-by match author" else echo_red "Signed-off-by is missing or doesn't match author (should be '$sob')" RET=1 fi done exit $RET - 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 - 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 source/check/compile working_directory: ~/build_dir command: | PKGS=$(cd ~/openwrt_packages; git diff --diff-filter=d --name-only "origin/$BRANCH..." | grep 'Makefile$' | grep -v '/files/' | awk -F/ '{ print $(NF-1) }') if [ -z "$PKGS" ] ; then echo_blue "WARNING: No new or modified packages found!" exit 0 fi echo_blue "=== Found new/modified packages: $PKGS" for PKG in $PKGS ; do echo_blue "===+ Download/check: $PKG" make "package/$PKG/download" V=s make "package/$PKG/check" V=s done for PKG in $PKGS ; do echo_blue "===+ Building: $PKG" make "package/$PKG/compile" -j3 V=s done - store_artifacts: path: ~/build_dir/logs - store_artifacts: path: ~/build_dir/bin workflows: version: 2 buildpr: jobs: - build: filters: branches: ignore: master