forked from WasmEdge/WasmEdge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
76 lines (65 loc) · 1.35 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
variables:
GIT_SUBMODULE_STRATEGY: recursive
BASE_BINDIR: build
BASE_TESTDIR: build/test
stages:
- build
- test
# Templates
.before_build: &before_build
- rm -rf ${BASE_BINDIR}
- mkdir ${BASE_BINDIR}
- cd ${BASE_BINDIR}
.cache_paths: &cache_paths
paths:
- ${BASE_BINDIR}
.build_job_template: &build_job
stage: build
image: secondstate/ssvm:${KEY}
before_script:
- *before_build
script:
- cmake .. ${CMAKE_OPTIONS}
- make -j2
cache:
<<: *cache_paths
key: ${KEY}
policy: push
.test_job_template: &test_job
stage: test
image: secondstate/ssvm:${KEY}
before_script:
- cd ${BASE_TESTDIR}
script:
- ctest
cache:
<<: *cache_paths
key: ${KEY}
policy: pull
# General Build Jobs
build:gcc:
<<: *build_job
tags: ["ssvm-gcc"]
variables:
CMAKE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON"
KEY: "ubuntu-build-gcc"
build:clang:
<<: *build_job
tags: ["ssvm-clang"]
variables:
CMAKE_OPTIONS: "-DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON"
KEY: "ubuntu-build-clang"
# General Test Jobs
test:gcc:
<<: *test_job
tags: ["ssvm-gcc"]
needs: ["build:gcc"]
variables:
KEY: "ubuntu-build-gcc"
test:clang:
<<: *test_job
tags: ["ssvm-clang"]
needs: ["build:clang"]
variables:
KEY: "ubuntu-build-clang"