Skip to content

feat: add compatibility for PHP 8.4 #1964

feat: add compatibility for PHP 8.4

feat: add compatibility for PHP 8.4 #1964

Workflow file for this run

name: Bazel Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-22.04
container: gcr.io/gapic-images/googleapis:latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Bazel File Cache Setup
id: cache-bazel
uses: actions/cache@v3
with:
path: ~/.cache/bazel
key: ${{ runner.os }}-bazel-20210105-${{ secrets.CACHE_VERSION }}
- name: Bazel Cache Not Found
if: steps.cache-bazel.outputs.cache-hit != 'true'
run: |
echo "No cache found."
- name: Bazel Cache Found
if: steps.cache-bazel.outputs.cache-hit == 'true'
run: |
echo -n "Cache found. Cache size: "
du -sh ~/.cache/bazel
echo "If the cache seems broken, update the CACHE_VERSION secret in"
echo "https://github.com/googleapis/gapic-generator-php/settings/secrets/actions"
echo "(use any random string, any GUID will work)"
echo "and it will start over with a clean cache."
echo "The old one will disappear after 7 days."
- name: Show bazel version
run: |
bazel --version
- name: Build example package; all targets
run: |
cd bazel_example;
bazel build ...
- name: Extract Bazel package output
run: |
cd bazel_example;
tar -xf ./bazel-bin/example_php_pkg.tar.gz
# grep returns 1 if no matches are found; and 0 if >0 matches are found.
- name: Verify grpc_service_config.json was honoured
run: |
grep '"timeout_millis": 942000' ./bazel_example/example_php_pkg/src/resources/example_client_config.json
- name: Verify gapic.yaml was honoured
run: |
grep "'initialPollDelayMillis' => '42042'" ./bazel_example/example_php_pkg/src/resources/example_descriptor_config.php
- name: Integration Tests
run: |
# Clear the cached files. Remove this workaround when the Bazel build is fixed.
rm -rf ~/.cache/bazel/*/*/*/gapic_generator_php/bazel-out/host/bin/rules_php_gapic/*
bazel --batch test tests/Integration:asset \
tests/Integration:compute_small \
tests/Integration:container \
tests/Integration:dataproc \
tests/Integration:functions \
tests/Integration:kms \
tests/Integration:iam \
tests/Integration:logging \
tests/Integration:redis \
tests/Integration:retail \
tests/Integration:speech \
tests/Integration:securitycenter \
tests/Integration:talent \
tests/Integration:videointelligence --noshow_progress --cache_test_results=no
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: test-artifacts
path: ~/.cache/bazel/*/*/*/gapic_generator_php/bazel-out/*/testlogs/*
retention-days: 5