forked from segviol/indigo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
71 lines (67 loc) · 2.05 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
image: "alpine:latest"
before_script:
- sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
# - mkdir -p /etc/apk-cache
# - ln -s /etc/apk/cache /etc/apk-cache
# - apk cache sync -v
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
GIT_SUBMODULE_STRATEGY: recursive
build:
stage: build
image: docker.pkg.github.com/01010101lzy/indigo-runtime-environments/indigo-build:0.1.0
script:
- ls -la
- mkdir -p build
- cd build
- cmake -DSTATIC_LINK_ARTIFACTS=1 ..
# do not use all cores on rpi; might heat it to crash.
- make -j3
cache:
paths:
- build/
artifacts:
paths:
- build/compiler
expire_in: 1 week
timeout: 8m
retry:
max: 2
when: script_failure
test:
stage: test
dependencies:
- build
image: docker.pkg.github.com/01010101lzy/indigo-runtime-environments/indigo-test:0.1.0
script:
- mkdir -p output
# - python3 scripts/test.py build/compiler test_codes/sysyruntimelibrary/libsysy.a test_codes/basic_test -r
- python3 scripts/test.py build/compiler test_codes/sysyruntimelibrary/libsysy.a test_codes/functional_test -r
- python3 scripts/test.py build/compiler test_codes/sysyruntimelibrary/libsysy.a test_codes/upload -r -t 90
artifacts:
when: always
paths:
- test.log
- output/
expire_in: 1 month
timeout: 15m
performance_test:
stage: test
dependencies:
- build
image: docker.pkg.github.com/01010101lzy/indigo-runtime-environments/indigo-test:0.1.0
script:
- mkdir -p output
- python3 scripts/test.py build/compiler test_codes/sysyruntimelibrary/libsysy.a test_codes/performance_test -r -t 120 -z
artifacts:
when: always
paths:
- test.log
- output/
- time.log
expire_in: 1 month
cache:
key: "$CI_JOB_NAME"
paths:
- time.log
timeout: 15m