forked from proot-me/proot
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.gitlab-ci.yml
73 lines (66 loc) · 2.09 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
image: gcc:7.4.0
stages:
- check
- dist
- coverage
- static-analysis
- deploy
before_script:
- apt-get update -qq
- apt-get install -qq clang-tools-4.0 curl libtalloc-dev uthash-dev libarchive-dev gdb strace realpath swig lcov
check:
stage: check
script:
- make -C src proot care
- make -C tests
allow_failure: true
dist:
stage: dist
script:
- LDFLAGS="${LDFLAGS} -static" make -C src proot GIT=false
after_script:
- cp src/proot .
artifacts:
paths:
- proot
gcov:
stage: coverage
script:
- make -C src loader.exe loader-m32.exe build.h
- CFLAGS='-Wall -Werror -O0 --coverage' LDFLAGS='-ltalloc -Wl,-z,noexecstack --coverage' make -eC src proot care
- make -C tests || true # ignore failing tests (for now)
- lcov --capture --directory src --output-file coverage.info
- genhtml coverage.info --output-directory gcov-latest
artifacts:
paths:
- gcov-latest
scan-build:
stage: static-analysis
script:
- scan-build-4.0 make -C src proot
after_script:
- cp -R /tmp/scan-build-* scan-build-latest
artifacts:
paths:
- scan-build-latest
pages:
stage: deploy
script:
- mkdir -p public/{bin,reports}
- mkdir -p public/reports/{lcov,scan-build}
- cp proot public/bin/proot
- curl -o public/index.html https://gitlab.com/lramage/lramage.gitlab.io/raw/master/_layouts/redirect.html
- cp -R gcov-latest public/reports/
- cp -R scan-build-latest public/reports/
- cp public/index.html public/reports/scan-build/
- cp public/index.html public/reports/lcov/
- sed -i "s|{{ page.source_url }}|https://proot-me.github.io|g" public/index.html
- sed -i "s|{{ page.source_url }}|https://proot.gitlab.io/-/proot/-/jobs/${CI_JOB_ID}/artifacts/public/reports/scan-build-latest/index.html|g" public/reports/scan-build/index.html
- sed -i "s|{{ page.source_url }}|https://proot.gitlab.io/-/proot/-/jobs/${CI_JOB_ID}/artifacts/public/reports/gcov-latest/index.html|g" public/reports/lcov/index.html
dependencies:
- dist
- gcov
- scan-build
artifacts:
paths:
- public