From 4674b21d712c829d1b0a61aac8ace4fae6dd0c09 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 8 Jan 2020 02:58:38 +0800 Subject: [PATCH 1/9] ci: add Drone Config Signed-off-by: Ayane Satomi --- .drone.yml | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..d7dd795 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,144 @@ +# Drone CI Pipeline for nbin + +## AMD64 Pipeline - Master Build Test +kind: pipeline +type: docker + +platform: + arch: amd64 + +stpes: + +- name: build + image: ubuntu + commands: + - sudo apt update && sudo apt install -y build-essential ccache + - yarn + - yarn build + +--- +## ARM64 - Master Build Test +kind: pipeline +type: docker + +platform: + arch: arm64 + +stpes: + +- name: build + image: ubuntu + commands: + - sudo apt update && sudo apt install -y build-essential ccache + - yarn + - yarn build + +--- +## ARM - Master Build Test +kind: pipeline +type: docker + +platform: + arch: arm + +stpes: + +- name: build + image: ubuntu + commands: + - sudo apt update && sudo apt install -y build-essential ccache + - yarn + - yarn build + +--- +## AMD64 - Release +kind: pipeline +type: docker + +platform: + arch: amd64 + +stpes: + +- name: build + image: ubuntu + commands: + - sudo apt update && sudo apt install -y build-essential ccache + - yarn + - yarn build + +- name: deploy + image: plugins/gcs + settings: + source: build/ + target: nbin.cdr.sh + token: + from_secret: gcs-token + +trigger: + branch: + - master + event: + - tag + +--- +## ARM64 - Release +kind: pipeline +type: docker + +platform: + arch: arm64 + +stpes: + +- name: build + image: ubuntu + commands: + - sudo apt update && sudo apt install -y build-essential ccache + - yarn + - yarn build + +- name: deploy + image: plugins/gcs + settings: + source: build/ + target: nbin.cdr.sh + token: + from_secret: gcs-token + +trigger: + branch: + - master + event: + - tag + +--- +## ARM - Release +kind: pipeline +type: docker + +platform: + arch: arm + +stpes: + +- name: build + image: ubuntu + commands: + - sudo apt update && sudo apt install -y build-essential ccache + - yarn + - yarn build + +- name: deploy + image: plugins/gcs + settings: + source: build/ + target: nbin.cdr.sh + token: + from_secret: gcs-token + +trigger: + branch: + - master + event: + - tag \ No newline at end of file From 68489e2cfe4a855e0b8532784a1971f407169ff7 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 8 Jan 2020 03:01:32 +0800 Subject: [PATCH 2/9] ci: fix name duplication Signed-off-by: Ayane Satomi --- .drone.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index d7dd795..0ebe059 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,11 +3,12 @@ ## AMD64 Pipeline - Master Build Test kind: pipeline type: docker +name: build-master-amd64 platform: arch: amd64 -stpes: +steps: - name: build image: ubuntu @@ -20,11 +21,12 @@ stpes: ## ARM64 - Master Build Test kind: pipeline type: docker +name: build-master-arm64 platform: arch: arm64 -stpes: +steps: - name: build image: ubuntu @@ -37,11 +39,12 @@ stpes: ## ARM - Master Build Test kind: pipeline type: docker +name: build-master-arm platform: arch: arm -stpes: +steps: - name: build image: ubuntu @@ -54,11 +57,12 @@ stpes: ## AMD64 - Release kind: pipeline type: docker +name: rel-amd64 platform: arch: amd64 -stpes: +steps: - name: build image: ubuntu @@ -85,11 +89,12 @@ trigger: ## ARM64 - Release kind: pipeline type: docker +name: rel-arm64 platform: arch: arm64 -stpes: +steps: - name: build image: ubuntu @@ -116,11 +121,12 @@ trigger: ## ARM - Release kind: pipeline type: docker +name: rel-arm platform: arch: arm -stpes: +steps: - name: build image: ubuntu From 7e64151b2e060f89008b6626177d20bddd119bf9 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 8 Jan 2020 03:02:49 +0800 Subject: [PATCH 3/9] ci: invoke as root Signed-off-by: Ayane Satomi --- .drone.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0ebe059..2694196 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,7 @@ steps: - name: build image: ubuntu commands: - - sudo apt update && sudo apt install -y build-essential ccache + - apt update && apt install -y build-essential ccache - yarn - yarn build @@ -31,7 +31,7 @@ steps: - name: build image: ubuntu commands: - - sudo apt update && sudo apt install -y build-essential ccache + - apt update && apt install -y build-essential ccache - yarn - yarn build @@ -49,7 +49,7 @@ steps: - name: build image: ubuntu commands: - - sudo apt update && sudo apt install -y build-essential ccache + - apt update && apt install -y build-essential ccache - yarn - yarn build @@ -67,7 +67,7 @@ steps: - name: build image: ubuntu commands: - - sudo apt update && sudo apt install -y build-essential ccache + - apt update && apt install -y build-essential ccache - yarn - yarn build @@ -99,7 +99,7 @@ steps: - name: build image: ubuntu commands: - - sudo apt update && sudo apt install -y build-essential ccache + - apt update && apt install -y build-essential ccache - yarn - yarn build @@ -131,7 +131,7 @@ steps: - name: build image: ubuntu commands: - - sudo apt update && sudo apt install -y build-essential ccache + - apt update && apt install -y build-essential ccache - yarn - yarn build From 14efeb945084e5d58ac2d25309a10fd5cb1a969b Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 8 Jan 2020 03:07:09 +0800 Subject: [PATCH 4/9] ci: use node images instead Signed-off-by: Ayane Satomi --- .drone.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2694196..c3473ec 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,7 @@ platform: steps: - name: build - image: ubuntu + image: node:10 commands: - apt update && apt install -y build-essential ccache - yarn @@ -29,7 +29,7 @@ platform: steps: - name: build - image: ubuntu + image: node:10 commands: - apt update && apt install -y build-essential ccache - yarn @@ -47,7 +47,7 @@ platform: steps: - name: build - image: ubuntu + image: node:10 commands: - apt update && apt install -y build-essential ccache - yarn @@ -65,7 +65,7 @@ platform: steps: - name: build - image: ubuntu + image: node:10 commands: - apt update && apt install -y build-essential ccache - yarn @@ -97,7 +97,7 @@ platform: steps: - name: build - image: ubuntu + image: node:10 commands: - apt update && apt install -y build-essential ccache - yarn @@ -129,7 +129,7 @@ platform: steps: - name: build - image: ubuntu + image: node:10 commands: - apt update && apt install -y build-essential ccache - yarn From c398d7812823cae19558a1e34830fd29e6ba3714 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 8 Jan 2020 03:41:16 +0800 Subject: [PATCH 5/9] ci: add volume caching Signed-off-by: Ayane Satomi --- .drone.yml | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/.drone.yml b/.drone.yml index c3473ec..1c309ec 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,6 +10,16 @@ platform: steps: +- name: restore-cache + image: drillster/drone-volume-cache + volumes: + - name: ccache-amd64 + path: /root/.cache/ccache + settings: + restore: true + mount: + - /root/.cache/ccache + - name: build image: node:10 commands: @@ -17,6 +27,16 @@ steps: - yarn - yarn build +- name: rebuild-cache + image: drillster/drone-volume-cache + volumes: + - name: ccache-amd64 + path: /root/.cache/ccache + settings: + rebuild: true + mount: + - /root/.cache/ccache + --- ## ARM64 - Master Build Test kind: pipeline @@ -28,6 +48,16 @@ platform: steps: +- name: restore-cache + image: drillster/drone-volume-cache + volumes: + - name: ccache-arm64 + path: /root/.cache/ccache + settings: + restore: true + mount: + - /root/.cache/ccache + - name: build image: node:10 commands: @@ -35,6 +65,16 @@ steps: - yarn - yarn build +- name: rebuild-cache + image: drillster/drone-volume-cache + volumes: + - name: ccache-arm64 + path: /root/.cache/ccache + settings: + rebuild: true + mount: + - /root/.cache/ccache + --- ## ARM - Master Build Test kind: pipeline @@ -46,6 +86,16 @@ platform: steps: +- name: restore-cache + image: drillster/drone-volume-cache + volumes: + - name: ccache-arm + path: /root/.cache/ccache + settings: + restore: true + mount: + - /root/.cache/ccache + - name: build image: node:10 commands: @@ -53,6 +103,16 @@ steps: - yarn - yarn build +- name: rebuild-cache + image: drillster/drone-volume-cache + volumes: + - name: ccache-arm + path: /root/.cache/ccache + settings: + rebuild: true + mount: + - /root/.cache/ccache + --- ## AMD64 - Release kind: pipeline @@ -64,6 +124,16 @@ platform: steps: +- name: restore-cache + image: drillster/drone-volume-cache + volumes: + - name: ccache-amd64 + path: /root/.cache/ccache + settings: + restore: true + mount: + - /root/.cache/ccache + - name: build image: node:10 commands: @@ -96,6 +166,16 @@ platform: steps: +- name: restore-cache + image: drillster/drone-volume-cache + volumes: + - name: ccache-arm64 + path: /root/.cache/ccache + settings: + restore: true + mount: + - /root/.cache/ccache + - name: build image: node:10 commands: @@ -128,6 +208,16 @@ platform: steps: +- name: restore-cache + image: drillster/drone-volume-cache + volumes: + - name: ccache-arm + path: /root/.cache/ccache + settings: + restore: true + mount: + - /root/.cache/ccache + - name: build image: node:10 commands: From b55f58aef3a05b0cc9cd9a8b8795a36cce513d08 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 8 Jan 2020 03:45:47 +0800 Subject: [PATCH 6/9] ci: add volume caching for amd64 For now volume caching is not supported in ARM, I'll do a different build for it soon Signed-off-by: Ayane Satomi --- .drone.yml | 70 ------------------------------------------------------ 1 file changed, 70 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1c309ec..281a512 100644 --- a/.drone.yml +++ b/.drone.yml @@ -48,16 +48,6 @@ platform: steps: -- name: restore-cache - image: drillster/drone-volume-cache - volumes: - - name: ccache-arm64 - path: /root/.cache/ccache - settings: - restore: true - mount: - - /root/.cache/ccache - - name: build image: node:10 commands: @@ -65,16 +55,6 @@ steps: - yarn - yarn build -- name: rebuild-cache - image: drillster/drone-volume-cache - volumes: - - name: ccache-arm64 - path: /root/.cache/ccache - settings: - rebuild: true - mount: - - /root/.cache/ccache - --- ## ARM - Master Build Test kind: pipeline @@ -86,16 +66,6 @@ platform: steps: -- name: restore-cache - image: drillster/drone-volume-cache - volumes: - - name: ccache-arm - path: /root/.cache/ccache - settings: - restore: true - mount: - - /root/.cache/ccache - - name: build image: node:10 commands: @@ -103,16 +73,6 @@ steps: - yarn - yarn build -- name: rebuild-cache - image: drillster/drone-volume-cache - volumes: - - name: ccache-arm - path: /root/.cache/ccache - settings: - rebuild: true - mount: - - /root/.cache/ccache - --- ## AMD64 - Release kind: pipeline @@ -124,16 +84,6 @@ platform: steps: -- name: restore-cache - image: drillster/drone-volume-cache - volumes: - - name: ccache-amd64 - path: /root/.cache/ccache - settings: - restore: true - mount: - - /root/.cache/ccache - - name: build image: node:10 commands: @@ -166,16 +116,6 @@ platform: steps: -- name: restore-cache - image: drillster/drone-volume-cache - volumes: - - name: ccache-arm64 - path: /root/.cache/ccache - settings: - restore: true - mount: - - /root/.cache/ccache - - name: build image: node:10 commands: @@ -208,16 +148,6 @@ platform: steps: -- name: restore-cache - image: drillster/drone-volume-cache - volumes: - - name: ccache-arm - path: /root/.cache/ccache - settings: - restore: true - mount: - - /root/.cache/ccache - - name: build image: node:10 commands: From 986df6ccfa155b1652eb1bf26c2cf361150c3607 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 8 Jan 2020 04:04:58 +0800 Subject: [PATCH 7/9] ci: add caching for ARM once more Signed-off-by: Ayane Satomi --- .drone.yml | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 281a512..547ef0f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,7 +14,7 @@ steps: image: drillster/drone-volume-cache volumes: - name: ccache-amd64 - path: /root/.cache/ccache + path: /cache settings: restore: true mount: @@ -31,7 +31,7 @@ steps: image: drillster/drone-volume-cache volumes: - name: ccache-amd64 - path: /root/.cache/ccache + path: /cache settings: rebuild: true mount: @@ -48,6 +48,16 @@ platform: steps: +- name: restore-cache + image: chinodesuuu/drone-volume-cache + volumes: + - name: ccache-arm64 + path: /cache + settings: + restore: true + mount: + - /root/.cache/ccache + - name: build image: node:10 commands: @@ -55,6 +65,16 @@ steps: - yarn - yarn build +- name: rebuild-cache + image: chinodesuuu/drone-volume-cache + volumes: + - name: ccache-arm64 + path: /cache + settings: + rebuild: true + mount: + - /root/.cache/ccache + --- ## ARM - Master Build Test kind: pipeline @@ -66,6 +86,16 @@ platform: steps: +- name: restore-cache + image: chinodesuuu/drone-volume-cache + volumes: + - name: ccache-arm + path: /cache + settings: + restore: true + mount: + - /root/.cache/ccache + - name: build image: node:10 commands: @@ -73,6 +103,17 @@ steps: - yarn - yarn build +- name: rebuild-cache + image: chinodesuuu/drone-volume-cache + volumes: + - name: ccache-arm + path: /cache + settings: + rebuild: true + mount: + - /root/.cache/ccache + + --- ## AMD64 - Release kind: pipeline From 2c38b15b4560fb35d96df4537473a7b9d5366b21 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 8 Jan 2020 04:09:58 +0800 Subject: [PATCH 8/9] ci: point them to chinodesuu for for volume caching Signed-off-by: Ayane Satomi --- .drone.yml | 48 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 547ef0f..21f154a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,7 @@ platform: steps: - name: restore-cache - image: drillster/drone-volume-cache + image: chinodesuuu/drone-volume-cache:amd64 volumes: - name: ccache-amd64 path: /cache @@ -26,9 +26,10 @@ steps: - apt update && apt install -y build-essential ccache - yarn - yarn build + - yarn test - name: rebuild-cache - image: drillster/drone-volume-cache + image: chinodesuuu/drone-volume-cache:amd64 volumes: - name: ccache-amd64 path: /cache @@ -49,7 +50,7 @@ platform: steps: - name: restore-cache - image: chinodesuuu/drone-volume-cache + image: chinodesuuu/drone-volume-cache:arm64 volumes: - name: ccache-arm64 path: /cache @@ -64,9 +65,10 @@ steps: - apt update && apt install -y build-essential ccache - yarn - yarn build + - yarn test - name: rebuild-cache - image: chinodesuuu/drone-volume-cache + image: chinodesuuu/drone-volume-cache:arm64 volumes: - name: ccache-arm64 path: /cache @@ -87,7 +89,7 @@ platform: steps: - name: restore-cache - image: chinodesuuu/drone-volume-cache + image: chinodesuuu/drone-volume-cache:arm volumes: - name: ccache-arm path: /cache @@ -102,9 +104,10 @@ steps: - apt update && apt install -y build-essential ccache - yarn - yarn build + - yarn test - name: rebuild-cache - image: chinodesuuu/drone-volume-cache + image: chinodesuuu/drone-volume-cache:arm volumes: - name: ccache-arm path: /cache @@ -125,12 +128,23 @@ platform: steps: +- name: restore-cache + image: chinodesuuu/drone-volume-cache:amd64 + volumes: + - name: ccache-amd64 + path: /cache + settings: + restore: true + mount: + - /root/.cache/ccache + - name: build image: node:10 commands: - apt update && apt install -y build-essential ccache - yarn - yarn build + - yarn test - name: deploy image: plugins/gcs @@ -157,12 +171,23 @@ platform: steps: +- name: restore-cache + image: chinodesuuu/drone-volume-cache:arm64 + volumes: + - name: ccache-arm64 + path: /cache + settings: + restore: true + mount: + - /root/.cache/ccache + - name: build image: node:10 commands: - apt update && apt install -y build-essential ccache - yarn - yarn build + - yarn test - name: deploy image: plugins/gcs @@ -189,12 +214,23 @@ platform: steps: +- name: restore-cache + image: chinodesuuu/drone-volume-cache:arm + volumes: + - name: ccache-arm + path: /cache + settings: + restore: true + mount: + - /root/.cache/ccache + - name: build image: node:10 commands: - apt update && apt install -y build-essential ccache - yarn - yarn build + - yarn test - name: deploy image: plugins/gcs From 566397a05eb7011c7a1bf79af25804a602906636 Mon Sep 17 00:00:00 2001 From: Ayane Satomi Date: Wed, 8 Jan 2020 04:28:25 +0800 Subject: [PATCH 9/9] ci: upgrade to node 12 Signed-off-by: Ayane Satomi --- .drone.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 21f154a..3c677ff 100644 --- a/.drone.yml +++ b/.drone.yml @@ -21,7 +21,7 @@ steps: - /root/.cache/ccache - name: build - image: node:10 + image: node:12 commands: - apt update && apt install -y build-essential ccache - yarn @@ -60,7 +60,7 @@ steps: - /root/.cache/ccache - name: build - image: node:10 + image: node:12 commands: - apt update && apt install -y build-essential ccache - yarn @@ -99,7 +99,7 @@ steps: - /root/.cache/ccache - name: build - image: node:10 + image: node:12 commands: - apt update && apt install -y build-essential ccache - yarn @@ -139,7 +139,7 @@ steps: - /root/.cache/ccache - name: build - image: node:10 + image: node:12 commands: - apt update && apt install -y build-essential ccache - yarn @@ -182,7 +182,7 @@ steps: - /root/.cache/ccache - name: build - image: node:10 + image: node:12 commands: - apt update && apt install -y build-essential ccache - yarn @@ -225,7 +225,7 @@ steps: - /root/.cache/ccache - name: build - image: node:10 + image: node:12 commands: - apt update && apt install -y build-essential ccache - yarn