Skip to content

Feat apcu (#651)

Feat apcu (#651) #882

Workflow file for this run

name: CI
on: [pull_request, workflow_dispatch, push]
env:
MODULE_PAK: pinpoint_php@${{ github.head_ref || github.ref_name }}
jobs:
cpp:
strategy:
matrix:
os: [ubuntu-latest, macos-13]
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@v4
cpp-windows:
runs-on: [windows-latest]
steps:
- uses: actions/checkout@v2
- name: powershell allow...
shell: cmd
run: powershell -Command "Set-ExecutionPolicy RemoteSigned -Scope CurrentUser"
- name: Build agent
run: |
cd common
cmake --no-warn-unused-cli -DWITH_TEST_CASE=1 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -S. -B./build -G "Visual Studio 17 2022" -T host=x86 -A win32
cmake --build build --target ALL_BUILD --config debug --
./build/bin/Debug/TestCommon.exe
memory-leak:
needs: [cpp, cpp-windows]
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
PHP:
runs-on: ubuntu-latest
needs: cpp
strategy:
matrix:
php-version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"]
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: start test environment
run: |
./docker-compose-linux-x86_64 -f "testapps/compose.yaml" build php-compatible --build-arg PHP_VERSION=${{ matrix.php-version }}
./docker-compose-linux-x86_64 -f "testapps/compose.yaml" up php-compatible
- name: Stop containers
# if: always()
run: ./docker-compose-linux-x86_64 -f "testapps/compose.yaml" down php-compatible
pack_php_module:
runs-on: ubuntu-latest
needs: PHP
steps:
- uses: actions/checkout@v2
- name: Package pinpoint_php
id: pack
run: |
tar -czf ${{ env.MODULE_PAK }} common/ src/PHP config.m4 tests LICENSE
md5=($(md5sum ${{ env.MODULE_PAK }} ))
PACK_NAME=${{ env.MODULE_PAK }}-${md5}-$(date '+%Y-%m-%d').tar.gz
mv ${{ env.MODULE_PAK }} $PACK_NAME
echo "PACK=$PACK_NAME" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v3
with:
name: ${{ env.MODULE_PAK }}
path: ${{ steps.pack.outputs.PACK }}
Python:
strategy:
matrix:
os: [ubuntu-latest, macos-13]
python-version: ["3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
needs: [cpp, cpp-windows]
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
# run: docker-compose -f "testapps/compose.yaml" build python-plugins
# - name: 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