Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
3.2 KiB
101 lines
3.2 KiB
name: PHP Tests |
|
|
|
on: |
|
workflow_call: |
|
inputs: |
|
safe-checkout: |
|
required: true |
|
description: "The SHA key for the commit we want to run over" |
|
type: string |
|
|
|
jobs: |
|
linux: |
|
strategy: |
|
fail-fast: false # Don't cancel all jobs if one fails. |
|
matrix: |
|
include: |
|
- name: 7.3 Debug |
|
version: 7.3.28-dbg |
|
command: composer test \&\& composer test_c |
|
- name: 7.4 Debug |
|
version: 7.4.18-dbg |
|
command: composer test \&\& composer test_c |
|
- name: 8.0 Optimized |
|
version: 8.0.5 |
|
command: composer test \&\& composer test_c |
|
- name: 8.0 Debug |
|
version: 8.0.5-dbg |
|
command: composer test \&\& composer test_c |
|
- name: 8.0 Memory Leak |
|
version: 8.0.5-dbg |
|
# Run specialized memory leak & multirequest tests. |
|
command: composer test_c \&\& tests/multirequest.sh \&\& tests/memory_leak_test.sh |
|
- name: 8.0 Valgrind |
|
version: 8.0.5-dbg |
|
command: composer test_valgrind |
|
|
|
name: Linux ${{ matrix.name}} |
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Checkout pending changes |
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 |
|
with: |
|
submodules: recursive |
|
ref: ${{ inputs.safe-checkout }} |
|
- name: Run tests |
|
uses: ./.github/actions/docker |
|
with: |
|
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/php:${{ matrix.version }}-6e95c0e221e4bd52e3b4dc1398c6336985196931 |
|
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} |
|
command: ${{ matrix.command }} |
|
|
|
macos: |
|
strategy: |
|
fail-fast: false # Don't cancel all jobs if one fails. |
|
matrix: |
|
version: ['7.4', '8.0'] |
|
|
|
name: MacOS PHP ${{ matrix.version }} |
|
runs-on: macos-12 |
|
steps: |
|
- name: Checkout pending changes |
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 |
|
with: |
|
submodules: recursive |
|
ref: ${{ inputs.safe-checkout }} |
|
|
|
- name: Install dependencies |
|
run: brew install coreutils # For sha256sum |
|
|
|
- name: Pin PHP version |
|
uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # 2.24.0 |
|
with: |
|
php-version: ${{ matrix.version }} |
|
|
|
- name: Check PHP version |
|
run: php --version | grep ${{ matrix.version }} || (echo "Invalid PHP version - $(php --version)" && exit 1) |
|
|
|
- name: Run tests |
|
uses: ./.github/actions/bazel |
|
with: |
|
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} |
|
bazel-cache: php_macos/${{ matrix.version }} |
|
bash: | |
|
pushd php |
|
rm -rf vendor |
|
php -v |
|
php -m |
|
composer update |
|
composer test_c |
|
popd |
|
|
|
- name: Run conformance tests |
|
uses: ./.github/actions/bazel |
|
with: |
|
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} |
|
bazel-cache: php_macos/${{ matrix.version }} |
|
bash: >- |
|
bazelisk $BAZEL_STARTUP_FLAGS \ |
|
test $BAZEL_FLAGS \ |
|
--action_env=PATH --test_env=PATH \ |
|
//php:conformance_test_c
|
|
|