-
Notifications
You must be signed in to change notification settings - Fork 43
85 lines (82 loc) · 3.18 KB
/
analysis-actions.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
name: Analysis
on:
schedule:
# trigger on every monday, wednesday and friday
- cron: '30 22 * * 1,3,5'
jobs:
coverity-scan:
if: github.repository == 'Samsung/escargot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
- name: Download Coverity Tool
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
run: |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=Samsung%2Fescargot" -O cov-analysis-linux64.tar.gz
mkdir cov-analysis-linux64
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
- name: Build
env:
BUILD_OPTIONS: -DESCARGOT_HOST=linux -DESCARGOT_ARCH=x64 -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_CODE_CACHE=ON -DESCARGOT_WASM=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
run: |
export PATH=$GITHUB_WORKSPACE/cov-analysis-linux64/bin:$PATH
cmake -H. -Bout/coverity_scan $BUILD_OPTIONS
cov-build --dir cov-int ninja -Cout/coverity_scan
- name: Submit
env:
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
NOTI_MAIL: ${{ secrets.COVERITY_SCAN_MAIL }}
run: |
tar czvf escargot.tgz cov-int
curl \
--form token=$TOKEN \
--form email=$NOTI_MAIL \
--form file=@escargot.tgz \
--form version="4.0.0" \
--form description="escargot coverity scan" \
https://scan.coverity.com/builds?project=Samsung%2Fescargot
coverage-scan:
if: github.repository == 'Samsung/escargot'
# ubuntu version fixed
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install -y pypy ninja-build libicu-dev gcovr
- name: Build x64
env:
BUILD_OPTIONS: -DESCARGOT_HOST=linux -DESCARGOT_ARCH=x64 -DESCARGOT_MODE=release -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_COVERAGE=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja
run: |
cmake -H. -Bout/coverage $BUILD_OPTIONS
ninja -Cout/coverage
- name: Run test262 and collect coverage data
# test262 is unstable in actions env, but coverage data will be accumulated
continue-on-error: true
run: |
# set locale
sudo locale-gen en_US.UTF-8
export LANG=en_US.UTF-8
locale
tools/run-tests.py --arch=x86_64 --engine="$GITHUB_WORKSPACE/out/coverage/escargot" new-es test262
- name: Generate coverage report
run: |
gcovr --gcov-ignore-parse-errors --exclude-unreachable-branches --exclude-throw-branches --exclude third_party --exclude src/api -r . --xml coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml
name: codecov-umbrella
verbose: true