sudo: true language: c services: - docker addons: apt: packages: - sshpass env: global: - IMAGE_NAME="openwrtorg/sdk:ar71xx-generic" - CODECOV_TOKEN="a2d4efa4-ec98-4768-a9cf-7f29c19c387a" jobs: include: - stage: unittests name: "Unit Tests" script: - ./run_tests - stage: pkgbuild name: "Build packages" before_script: - docker pull "$IMAGE_NAME" || true script: - | cat <> feeds.conf.default src-git base https://git.openwrt.org/openwrt/openwrt.git;v18.06.1 src-git packages https://git.openwrt.org/feed/packages.git^35e0b737ab496f5b51e80079b0d8c9b442e223f5 src-git luci https://git.openwrt.org/project/luci.git^f64b1523447547032d5280fb0bcdde570f2ca913 src-git routing https://git.openwrt.org/feed/routing.git^1b9d1c419f0ecefda51922a7845ab2183d6acd76 src-git telephony https://git.openwrt.org/feed/telephony.git^b9d7b321d15a44c5abb9e5d43a4ec78abfd9031b src-git libremesh https://github.com/libremesh/lime-packages.git;$TRAVIS_BRANCH src-git libremap https://github.com/libremesh/libremap-agent.git EOF - docker run --user 0:0 -v "/output:/home/build/openwrt/bin/packages/mips_24kc/libremesh" -v "$(pwd)/feeds.conf.default:/home/build/openwrt/feeds.conf.default" -v "$(pwd)/libremesh.sdk.config:/home/build/openwrt/config" "$IMAGE_NAME" /bin/bash -c "./scripts/feeds update -a && ./scripts/feeds install -p libremesh -a && cp /home/build/openwrt/config /home/build/openwrt/.config && make defconfig && make -j2" deploy: - provider: script script: - rsync --delete-after -L -r -v -e "sshpass -p $SSH_PASS ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $CI_PORT" "/output/" "${CI_USER}@${CI_SERVER}:${CI_STORE_PATH}/$STORE_PATH/packages/" on: branch: master - provider: script script: - rsync --rsync-path="mkdir -p ${CI_STORE_PATH}/$STORE_PATH/branches/$TRAVIS_BRANCH/ && rsync" --delete-after -L -r -v -e "sshpass -p $SSH_PASS ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $CI_PORT" "/output/" "${CI_USER}@${CI_SERVER}:${CI_STORE_PATH}/$STORE_PATH/branches/$TRAVIS_BRANCH/" on: all_branches: true condition: $TRAVIS_BRANCH != master #after_success: # - bash <(curl -s https://codecov.io/bash)