-
Notifications
You must be signed in to change notification settings - Fork 79
152 lines (144 loc) · 4.66 KB
/
main.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: CI
on: [pull_request, workflow_dispatch]
jobs:
cpp:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: actions-setup-cmake
uses: jwlawson/[email protected]
with:
cmake-version: "3.16.x"
- name: Build agent
run: |
cd common
mkdir -p build
cd build
cmake -DWITH_TEST_CASE=1 -DWITH_CODECOVERAGE=1 -DCMAKE_BUILD_TYPE=Debug ..
make
./bin/TestCommon
- name: Codecovage
uses: codecov/codecov-action@v1
memory-leak:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: actions-setup-cmake
uses: jwlawson/[email protected]
with:
cmake-version: "3.16.x"
- name: Build agent
run: |
sudo apt update || echo "update failed,but try to overlook it"
sudo apt install -y valgrind -y valgrind
cd common
mkdir -p build
cd build
cmake -DWITH_TEST_CASE=1 -DCMAKE_BUILD_TYPE=Debug ..
make
valgrind --leak-check=full \
--show-leak-kinds=all \
--track-origins=yes \
--verbose \
--log-file=valgrind-out.txt \
./bin/TestCommon
- name: Archive docs
uses: actions/upload-artifact@v3
with:
name: valgrind-out
path: common/build/valgrind-out.txt
# PHP5:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# php-versions: ["5.6", "5.4", "5.5"]
# steps:
# - uses: actions/checkout@v2
# - uses: shivammathur/setup-php@v2
# with:
# php-version: ${{ matrix.php-versions }}
# - run: |
# phpize
# ./configure
# make
# make test TESTS=src/PHP/tests5/
PHP7:
runs-on: ubuntu-latest
strategy:
matrix:
# php-versions: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0"]
php-versions: ["7.0"]
steps:
- uses: actions/checkout@v2
# - name: set mysql
# run: |
# sudo service mysql start
# sudo mysql --host='127.0.0.1' --user='root' --password='root' < '/home/runner/work/pinpoint-c-agent/pinpoint-c-agent/testapps/PHP/tests/script.sql'
# - name: set redis
# run: |
# sudo apt-get install redis-server
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: redis-phpredis/[email protected]
- name: testapp
run: |
phpize
./configure
make
make test TESTS=src/PHP/tests/
# sudo make install
# sudo echo "extension=pinpoint_php.so" >> /etc/php/${{ matrix.php-versions }}/cli/php.ini
# sudo echo "error_log = /home/runner/work/pinpoint-c-agent/pinpoint-c-agent/testapps/PHP/tests/php_error.log" >> /etc/php/${{ matrix.php-versions }}/cli/php.ini
# sudo echo "pinpoint_php.DebugReport=true" >> /etc/php/${{ matrix.php-versions }}/cli/php.ini
# cd testapps/PHP
# composer install
# cp tests/think .
# php think unit -v
Python:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8","3.9","3.10","3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: jwlawson/[email protected]
with:
cmake-version: "3.16.x"
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: |
pip install -r requirements.txt
python setup.py install || echo "failed, but ignore"
# nosetests does not support python3 anymore
# nosetests src/PY/test --ignore-files="TestCoroutines.*"
python -m unittest discover -s src/PY/test -p 'Test*.py'
Collector-agent:
strategy:
matrix:
go-version: [1.18.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Setup protoc
uses: arduino/[email protected]
- run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
# cd collector-agent
# go mod download
# go build
# go test ./... -v
cd collector-agent && make && go test ./... -v