-
Notifications
You must be signed in to change notification settings - Fork 1
/
.ci.yml
126 lines (110 loc) · 3.23 KB
/
.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
image: $CI_IMAGE
.ace: &ace
tags: ['ace-x86_64']
.common_only: &common_only
only:
- main
- merge_requests
variables:
GIT_STRATEGY: clone
IREE_HOST_BIN_DIR: "/opt/iree_compiler/bin"
RISCV_TOOLCHAIN_ROOT: "/opt/toolchain_iree_rv32imf"
RENODE_PATH: "/opt/renode"
stages:
- lint
- build
- tests
.submodule_update_recursive: &submodule_update_recursive
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_DEPTH: 1
GIT_SUBMODULE_UPDATE_FLAGS: --jobs `nproc`
.submodule_update_normal: &submodule_update_normal
GIT_SUBMODULE_STRATEGY: normal
.submodule_update_none: &submodule_update_none
GIT_SUBMODULE_STRATEGY: none
.build_prepare: &build_prepare |-
build_tools/configure_cmake.sh -G Ninja
.i2c_accelerometer_build_prepare: &i2c_accelerometer_build_prepare |-
build_tools/configure_cmake.sh -G Ninja -DI2C_ACCELEROMETER=True
.minimal_build_prepare: &minimal_build_prepare |-
build_tools/configure_cmake.sh -G Ninja -DMINIMAL_BUILD=True
clang_format:
<<: *ace
<<: *common_only
stage: lint
variables: *submodule_update_none
before_script:
- *minimal_build_prepare
script:
- cmake --build build/build-riscv --target clang-format
clang_tidy:
<<: *ace
<<: *common_only
stage: lint
variables: *submodule_update_normal
before_script:
- *minimal_build_prepare
script:
- git -C third-party/iree-rv32-springbok submodule update --init
- cmake --build build/build-riscv --target clang-tidy
build:
<<: *ace
<<: *common_only
stage: build
variables: *submodule_update_recursive
before_script:
- *build_prepare
script:
- cmake --build build/build-riscv
artifacts:
paths:
- build/build-riscv/iree-runtime/iree_runtime
when: always
i2c_accelerometer_build:
<<: *ace
<<: *common_only
stage: build
variables: *submodule_update_recursive
before_script:
- *i2c_accelerometer_build_prepare
script:
- cmake --build build/build-riscv
artifacts:
paths:
- build/build-riscv/iree-runtime/iree_runtime_i2c_accelerometer
when: always
unit_tests:
<<: *ace
<<: *common_only
stage: tests
variables: *submodule_update_none
before_script:
- *minimal_build_prepare
script:
- cmake --build build/build-riscv --target unit-tests-coverage
artifacts:
paths:
- unit-tests/build/artifacts/gcov/*
when: always
renode_tests:
<<: *ace
<<: *common_only
stage: tests
variables: *submodule_update_normal
before_script:
- *minimal_build_prepare
- git -C third-party/kenning lfs pull
- python3 -m pip install ./third-party/kenning
script:
- cmake --build build/build-riscv --target renode-tests
artifacts:
paths:
- renode-tests/results/robot_output.xml
- renode-tests/results/log.html
- renode-tests/results/report.html
- renode-tests/results/opcode_stats.txt
- renode-tests/results/kenning_output.json
- renode-tests/results/kenning_stdout.txt
- renode-tests/results/kenning_stderr.txt
- renode-tests/results/benchmarks/
when: always