You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesatee.apache.org by ms...@apache.org on 2019/11/26 00:09:40 UTC

[incubator-mesatee] branch master updated: Refactor drone.yml (#96)

This is an automated email from the ASF dual-hosted git repository.

mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mesatee.git


The following commit(s) were added to refs/heads/master by this push:
     new 868f8b7  Refactor drone.yml (#96)
868f8b7 is described below

commit 868f8b726e977a25fb2cc5472f88213974a67173
Author: Mingshen Sun <bo...@mssun.me>
AuthorDate: Mon Nov 25 16:09:34 2019 -0800

    Refactor drone.yml (#96)
    
    - add coverage pipeline
    - add doc pipeline
    - rename pipelines
---
 .drone.yml | 160 +++++++++++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 130 insertions(+), 30 deletions(-)

diff --git a/.drone.yml b/.drone.yml
index c6b83a2..8a1e707 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -1,14 +1,13 @@
 kind: pipeline
-name: cmake-release
+name: sgx-debug
 
 steps:
 - name: prepare
   image: mesalocklinux/build-mesatee:0.1.5
   commands:
-  - mkdir -p bin
   - . /root/.cargo/env
   - mkdir -p build
-  - cd build && cmake ..
+  - cd build && cmake -DCMAKE_BUILD_TYPE=Debug ..
 - name: check
   image: mesalocklinux/build-mesatee:0.1.5
   commands:
@@ -22,12 +21,12 @@ steps:
   - cd build && make VERBOSE=1 -j2
 - name: sgx-test
   image: mesalocklinux/build-mesatee:0.1.5
-  privileged: true
   environment:
     IAS_KEY:
       from_secret: V5_KEY
     IAS_SPID:
       from_secret: V5_SPID
+  privileged: true
   volumes:
   - name: isgx
     path: /dev/isgx
@@ -51,7 +50,7 @@ node:
 ---
 
 kind: pipeline
-name: cmake-clippy
+name: sgx-release
 
 steps:
 - name: prepare
@@ -65,11 +64,36 @@ steps:
   commands:
   - . /root/.cargo/env
   - cd build && make check
-- name: clippy
+- name: compile
   image: mesalocklinux/build-mesatee:0.1.5
   commands:
   - . /root/.cargo/env
-  - cd build && make CLP=1
+  - export RUSTFLAGS="-D warnings"
+  - cd build && make VERBOSE=1 -j2
+- name: sgx-test
+  image: mesalocklinux/build-mesatee:0.1.5
+  privileged: true
+  environment:
+    IAS_KEY:
+      from_secret: V5_KEY
+    IAS_SPID:
+      from_secret: V5_SPID
+  volumes:
+  - name: isgx
+    path: /dev/isgx
+  - name: aesmd
+    path: /var/run/aesmd/aesm.socket
+  commands:
+  - . /root/.cargo/env
+  - cd build && make sgx-test
+
+volumes:
+- name: isgx
+  host:
+    path: /dev/isgx
+- name: aesmd
+  host:
+    path: /var/run/aesmd/aesm.socket
 
 node:
   instance: mesatee-sgx
@@ -77,16 +101,15 @@ node:
 ---
 
 kind: pipeline
-name: cmake-debug
+name: sim_debug
 
 steps:
 - name: prepare
   image: mesalocklinux/build-mesatee:0.1.5
   commands:
-  - mkdir -p bin
   - . /root/.cargo/env
   - mkdir -p build
-  - cd build && cmake -DCMAKE_BUILD_TYPE=Debug ..
+  - cd build && cmake ..
 - name: check
   image: mesalocklinux/build-mesatee:0.1.5
   commands:
@@ -96,24 +119,18 @@ steps:
   image: mesalocklinux/build-mesatee:0.1.5
   commands:
   - . /root/.cargo/env
-  - export RUSTFLAGS="-D warnings"
-  - cd build && make VERBOSE=1 -j2
+  - cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DRUSTFLAGS="-D warnings" -DSGX_MODE=SW .. && make VERBOSE=1 -j2
 - name: sgx-test
   image: mesalocklinux/build-mesatee:0.1.5
-  environment:
-    IAS_KEY:
-      from_secret: V5_KEY
-    IAS_SPID:
-      from_secret: V5_SPID
+  commands:
+  - . /root/.cargo/env
+  - cd build && make sgx-test
   privileged: true
   volumes:
   - name: isgx
     path: /dev/isgx
   - name: aesmd
     path: /var/run/aesmd/aesm.socket
-  commands:
-  - . /root/.cargo/env
-  - cd build && make sgx-test
 
 volumes:
 - name: isgx
@@ -129,7 +146,7 @@ node:
 ---
 
 kind: pipeline
-name: cmake-sim_release
+name: sim_release
 
 steps:
 - name: prepare
@@ -175,7 +192,7 @@ node:
 ---
 
 kind: pipeline
-name: cmake-sim_debug
+name: lint
 
 steps:
 - name: prepare
@@ -189,22 +206,62 @@ steps:
   commands:
   - . /root/.cargo/env
   - cd build && make check
-- name: compile
+- name: clippy
   image: mesalocklinux/build-mesatee:0.1.5
   commands:
   - . /root/.cargo/env
-  - cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DRUSTFLAGS="-D warnings" -DSGX_MODE=SW .. && make VERBOSE=1 -j2
-- name: sgx-test
+  - cd build && make CLP=1
+
+node:
+  instance: mesatee-sgx
+
+---
+
+kind: pipeline
+name: coverage
+
+steps:
+- name: prepare
   image: mesalocklinux/build-mesatee:0.1.5
   commands:
   - . /root/.cargo/env
-  - cd build && make sgx-test
+  - mkdir -p build
+  - cd build && cmake -DCMAKE_BUILD_TYPE=DEBUG -DCOV=1 ..
+- name: check
+  image: mesalocklinux/build-mesatee:0.1.5
+  commands:
+  - . /root/.cargo/env
+  - cd build && make check
+- name: compile
+  image: mesalocklinux/build-mesatee:0.1.5
+  commands:
+  - . /root/.cargo/env
+  - export RUSTFLAGS="-D warnings"
+  - cd build && make VERBOSE=1 -j2
+- name: sgx-test
+  image: mesalocklinux/build-mesatee:0.1.5
+  environment:
+    IAS_KEY:
+      from_secret: V5_KEY
+    IAS_SPID:
+      from_secret: V5_SPID
   privileged: true
   volumes:
   - name: isgx
     path: /dev/isgx
   - name: aesmd
     path: /var/run/aesmd/aesm.socket
+  commands:
+  - . /root/.cargo/env
+  - cd build && make sgx-test
+- name: coverage
+  image: mesalocklinux/build-mesatee:0.1.5
+  commands:
+  - cd build && make cov
+  - bash -c "bash <(curl -s https://codecov.io/bash) -f cov.info"
+  environment:
+    CODECOV_TOKEN:
+      from_secret: CODECOV_TOKEN
 
 volumes:
 - name: isgx
@@ -214,6 +271,48 @@ volumes:
   host:
     path: /var/run/aesmd/aesm.socket
 
+trigger:
+  branch:
+    - master
+  event:
+    - push
+
+node:
+  instance: mesatee-sgx
+
+---
+
+kind: pipeline
+name: doc
+
+steps:
+- name: prepare
+  image: mesalocklinux/build-mesatee:0.1.5
+  commands:
+  - . /root/.cargo/env
+  - mkdir -p build
+  - cd build && cmake ..
+- name: doc
+  image: mesalocklinux/build-mesatee:0.1.5
+  commands:
+  - . /root/.cargo/env
+  - cd build && make doc
+  - mkdir -p ~/.ssh && echo $DOC_KEY | base64 -d > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
+  - tar czf doc.tar.gz -C cmake_tomls/unix_app/target/ doc && ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no $DOC_USERNAME@$DOC_HOSTNAME "cd /home/ubuntu/www/mesatee.org && tar -xz" < doc.tar.gz
+  environment:
+    DOC_KEY:
+      from_secret: DOC_KEY
+    DOC_USERNAME:
+      from_secret: DOC_USERNAME
+    DOC_HOSTNAME:
+      from_secret: DOC_HOSTNAME
+
+trigger:
+  branch:
+    - master
+  event:
+    - push
+
 node:
   instance: mesatee-sgx
 
@@ -252,10 +351,11 @@ trigger:
       - hourly
 
 depends_on:
-  - cmake-release
-  - cmake-debug
-  - cmake-sim_release
-  - cmake-sim_debug
+  - sgx-debug
+  - sgx-release
+  - sim_debug
+  - sim_release
+  - lint
 
 node:
   instance: mesatee-sgx


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@mesatee.apache.org
For additional commands, e-mail: commits-help@mesatee.apache.org