support FetchContent #637
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/actions-setup-cmake@v1.6 | |
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/actions-setup-cmake@v1.6 | |
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=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.4","8.0"] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: redis-phpredis/phpredis@5.3.4 | |
- name: testapp | |
run: | | |
phpize | |
./configure | |
make | |
make test | |
# 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: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: run unittest | |
run: | | |
# ref https://github.com/pypa/setuptools/issues/3198 | |
pip install -e . | |
python -m unittest discover -s src/PY/test | |
python-plugins: | |
# timeout-minutes: 20 | |
needs: Python | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: update docker compose | |
run: | | |
wget "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64" | |
chmod +x docker-compose-linux-x86_64 | |
./docker-compose-linux-x86_64 version | |
# - name: build python-plugins | |
# run: docker-compose -f "testapps/compose.yaml" build python-plugins | |
- name: start test environment | |
run: ./docker-compose-linux-x86_64 -f "testapps/compose.yaml" up python-plugins --exit-code-from python-plugins | |
- name: Stop containers | |
# if: always() | |
run: ./docker-compose-linux-x86_64 -f "testapps/compose.yaml" down python-plugins | |
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/setup-protoc@v2.1.0 | |
- run: | | |
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 | |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 | |
export PATH="$PATH:$(go env GOPATH)/bin" | |
cd collector-agent && make && go test ./... -v |