1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 11:01:50 +00:00
openmptcprouter-feeds/.circleci/config.yml

381 lines
13 KiB
YAML
Raw Normal View History

2018-02-22 22:06:07 +00:00
version: 2
jobs:
2018-02-23 07:12:58 +00:00
prepare:
2018-02-22 22:06:07 +00:00
machine: true
working_directory: ~/
steps:
- run:
name: Prepare
command: |
sudo apt-get update
sudo apt-get install -yq build-essential git unzip ncurses-dev libz-dev libssl-dev python subversion gettext gawk wget curl rsync perl
2018-05-23 08:56:36 +00:00
build_x86_64:
2018-02-23 07:12:58 +00:00
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: x86_64
working_directory: ~/
2018-02-23 07:17:53 +00:00
steps:
- run:
2018-02-23 07:22:35 +00:00
name: cache
2018-02-23 07:17:53 +00:00
command: |
2018-11-27 19:19:03 +00:00
echo "cache 20 $OMR_TARGET" > /tmp/cache-target
echo "cache 24 $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
2018-02-23 07:17:53 +00:00
2018-02-22 22:06:07 +00:00
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 30m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
2018-02-23 09:23:33 +00:00
git pull || true
2018-02-22 22:06:07 +00:00
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
2018-04-10 08:43:41 +00:00
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
2018-02-22 22:06:07 +00:00
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 30m
2018-04-05 18:03:18 +00:00
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/install -j2
2018-02-22 22:06:07 +00:00
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
2018-02-22 22:35:04 +00:00
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/$OMR_TARGET
2018-02-23 06:46:01 +00:00
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
2018-02-22 22:35:04 +00:00
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
2018-05-23 08:56:36 +00:00
build_x86:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: x86
working_directory: ~/
steps:
- run:
name: cache
command: |
2018-11-27 19:19:03 +00:00
echo "cache 20 $OMR_TARGET" > /tmp/cache-target
echo "cache 24 $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
2018-05-23 08:56:36 +00:00
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 30m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 30m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/install -j2
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
2018-02-22 22:35:04 +00:00
build_rpi3:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: rpi3
working_directory: ~/
2018-02-23 07:17:53 +00:00
steps:
- run:
2018-02-23 07:22:35 +00:00
name: cache
2018-02-23 07:17:53 +00:00
command: |
2018-12-07 19:17:00 +00:00
echo "cache 21 $OMR_TARGET" > /tmp/cache-target
echo "cache 25 $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
2018-02-23 07:17:53 +00:00
2018-02-22 22:35:04 +00:00
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 30m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
2018-02-23 09:23:33 +00:00
git pull || true
2018-02-22 22:35:04 +00:00
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
2018-04-10 08:43:41 +00:00
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
2018-02-22 22:35:04 +00:00
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 30m
2018-04-05 18:03:18 +00:00
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2
2018-02-22 22:35:04 +00:00
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/$OMR_TARGET
2018-02-23 06:46:01 +00:00
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
2018-02-22 22:06:07 +00:00
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
2018-02-22 22:27:59 +00:00
2018-05-18 13:40:24 +00:00
build_rpi2:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: rpi2
working_directory: ~/
steps:
- run:
name: cache
command: |
2018-12-07 19:17:00 +00:00
echo "cache 21 $OMR_TARGET" > /tmp/cache-target
echo "cache 25 $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
2018-05-18 13:40:24 +00:00
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 30m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 30m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
2018-09-07 16:12:59 +00:00
build_bpi-r2:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: bpi-r2
working_directory: ~/
steps:
- run:
name: cache
command: |
2018-11-27 19:19:03 +00:00
echo "cache 22 $OMR_TARGET" > /tmp/cache-target
echo "cache 26 $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
2018-09-07 16:12:59 +00:00
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 30m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 30m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
2018-12-06 15:00:05 +00:00
build_wrt3200acm:
machine: true
environment:
- OMR_VERSION: $CIRCLE_TAG
- OMR_TARGET: wrt3200acm
working_directory: ~/
steps:
- run:
name: cache
command: |
echo "cache 22 $OMR_TARGET" > /tmp/cache-target
echo "cache 26 $OMR_TARGET $OMR_VERSION" > /tmp/cache-version
- restore_cache:
keys:
- cache-{{ checksum "/tmp/cache-version" }}
- cache-{{ checksum "/tmp/cache-target" }}
- run:
name: Build toolchain
no_output_timeout: 30m
command: |
git clone https://github.com/ysurac/openmptcprouter || true
cd openmptcprouter
git pull || true
export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}"
export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL"
export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}"
sh build.sh prepare {tools,toolchain}/install -j2
echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build
echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub
- save_cache:
key: cache-{{ checksum "/tmp/cache-target" }}
paths:
- openmptcprouter
- run:
name: Build
no_output_timeout: 30m
command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2
- run:
name: Deploy
command: |
ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/release
rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/release/$OMR_TARGET
rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin
- save_cache:
key: cache-{{ checksum "/tmp/cache-version" }}
paths:
- openmptcprouter
2018-09-07 16:12:59 +00:00
2018-02-22 22:27:59 +00:00
workflows:
version: 2
main:
jobs:
2018-02-23 07:12:58 +00:00
- prepare
2018-05-23 08:56:36 +00:00
- build_x86_64:
requires:
- prepare
2018-02-23 07:12:58 +00:00
- build_x86:
requires:
- prepare
- build_rpi3:
requires:
- prepare
2018-05-18 13:40:24 +00:00
- build_rpi2:
requires:
- prepare
2018-09-07 16:12:59 +00:00
- build_bpi-r2:
requires:
- prepare
2018-12-06 15:00:05 +00:00
- build_wrt3200acm:
requires:
- prepare