1
+ # Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
2
+ version : 2.1
3
+
4
+ # prebuilt docker images with toolchain
5
+ executors :
6
+ setup-rv64gc :
7
+ docker :
8
+ - image : keystoneenclaveorg/keystone:init-rv64gc
9
+ setup-rv32gc :
10
+ docker :
11
+ - image : keystoneenclaveorg/keystone:init-rv32gc
12
+
13
+
14
+
15
+ commands :
16
+ update-riscv-toolchain-path :
17
+ steps :
18
+ - run : echo 'export PATH=/keystone/riscv/bin:/keystone/riscv64/bin:/keystone/riscv32/bin:$PATH' >> $BASH_ENV
19
+ build-sdk :
20
+ steps :
21
+ - run : |
22
+ cd /keystone/sdk
23
+ mkdir build
24
+ cd build
25
+ KEYSTONE_SDK_DIR=$(pwd) cmake ..
26
+ make install
27
+ checkout-runtime :
28
+ steps :
29
+ - run : |
30
+ git submodule sync
31
+ git submodule update --init
32
+
33
+ jobs :
34
+ format :
35
+ executor : setup-rv64gc
36
+ steps :
37
+ - checkout
38
+ - checkout-runtime
39
+ - update-riscv-toolchain-path
40
+ - run : apt-get install clang-format -y
41
+ - run :
42
+ name : " test"
43
+ environment :
44
+ KEYSTONE_SDK_DIR : /keystone/sdk/build
45
+ command : |
46
+ make format
47
+ no_output_timeout : 120m
48
+ default-build :
49
+ executor : setup-rv64gc
50
+ steps :
51
+ - checkout
52
+ - checkout-runtime
53
+ - update-riscv-toolchain-path
54
+ - build-sdk
55
+ - run :
56
+ name : " Default build"
57
+ environment :
58
+ KEYSTONE_SDK_DIR : /keystone/sdk/build
59
+ command : |
60
+ ./build.sh
61
+ no_output_timeout : 120m
62
+ use-freemem :
63
+ executor : setup-rv64gc
64
+ steps :
65
+ - checkout
66
+ - checkout-runtime
67
+ - update-riscv-toolchain-path
68
+ - build-sdk
69
+ - run :
70
+ name : " USE_FREEMEM"
71
+ environment :
72
+ KEYSTONE_SDK_DIR : /keystone/sdk/build
73
+ command : |
74
+ ./build.sh freemem
75
+ no_output_timeout : 120m
76
+ use_linux_syscall_use_freemem :
77
+ executor : setup-rv64gc
78
+ steps :
79
+ - checkout
80
+ - checkout-runtime
81
+ - update-riscv-toolchain-path
82
+ - build-sdk
83
+ - run :
84
+ name : " USE_LINUX_SYSCALL + USE_FREEMEM"
85
+ environment :
86
+ KEYSTONE_SDK_DIR : /keystone/sdk/build
87
+ command : |
88
+ ./build.sh linux_syscall freemem
89
+ no_output_timeout : 120m
90
+ use_paging :
91
+ executor : setup-rv64gc
92
+ steps :
93
+ - checkout
94
+ - checkout-runtime
95
+ - update-riscv-toolchain-path
96
+ - build-sdk
97
+ - run :
98
+ name : " USE_PAGING"
99
+ environment :
100
+ KEYSTONE_SDK_DIR : /keystone/sdk/build
101
+ command : |
102
+ ./build.sh paging
103
+ no_output_timeout : 120m
104
+ use_package_crypto :
105
+ executor : setup-rv64gc
106
+ steps :
107
+ - checkout
108
+ - checkout-runtime
109
+ - update-riscv-toolchain-path
110
+ - build-sdk
111
+ - run :
112
+ name : " USE_PAGE_CRYPTO"
113
+ environment :
114
+ KEYSTONE_SDK_DIR : /keystone/sdk/build
115
+ command : |
116
+ ./build.sh paging page_crypto
117
+ no_output_timeout : 120m
118
+ use_page_hash :
119
+ executor : setup-rv64gc
120
+ steps :
121
+ - checkout
122
+ - checkout-runtime
123
+ - update-riscv-toolchain-path
124
+ - build-sdk
125
+ - run :
126
+ name : " USE_PAGE_HASH"
127
+ environment :
128
+ KEYSTONE_SDK_DIR : /keystone/sdk/build
129
+ command : |
130
+ ./build.sh paging page_hash
131
+ no_output_timeout : 120m
132
+ use_page_crypto_use_page_hash :
133
+ executor : setup-rv64gc
134
+ steps :
135
+ - checkout
136
+ - checkout-runtime
137
+ - update-riscv-toolchain-path
138
+ - build-sdk
139
+ - run :
140
+ name : " USE_PAGE_CRYPTO + USE_PAGE_HASH"
141
+ environment :
142
+ KEYSTONE_SDK_DIR : /keystone/sdk/build
143
+ command : |
144
+ ./build.sh paging page_crypto page_hash
145
+ no_output_timeout : 120m
146
+ test :
147
+ executor : setup-rv64gc
148
+ steps :
149
+ - checkout
150
+ - checkout-runtime
151
+ - update-riscv-toolchain-path
152
+ - build-sdk
153
+ - run :
154
+ name : " test"
155
+ environment :
156
+ KEYSTONE_SDK_DIR : /keystone/sdk/build
157
+ command : |
158
+ mkdir -p obj/test
159
+ pushd obj/test
160
+ cmake ../../test
161
+ make
162
+ ctest -VV || ( cat obj/test/Testing/Temporary/LastTest.log && false )
163
+ popd
164
+ no_output_timeout : 120m
165
+
166
+ workflows :
167
+ build-and-test :
168
+ jobs :
169
+ - default-build
170
+ - format
171
+ - use-freemem :
172
+ requires :
173
+ - default-build
174
+ - use_linux_syscall_use_freemem :
175
+ requires :
176
+ - default-build
177
+ - use_package_crypto :
178
+ requires :
179
+ - default-build
180
+ - use_page_hash :
181
+ requires :
182
+ - default-build
183
+ - use_page_crypto_use_page_hash :
184
+ requires :
185
+ - default-build
186
+ - test :
187
+ requires :
188
+ - default-build
0 commit comments