Feat post publish #486
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
# For more information see: https://docs.github.com/en/actions/getting-started-with-github-actions | |
# For more setup-php see: https://github.com/shivammathur/setup-php | |
# For more setup-php protoc see: https://github.com/shivammathur/setup-php/issues/262 | |
name: PHP | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- 'polyglot/php/**' | |
- 'proto/**' | |
jobs: | |
run: | |
name: Run | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: | |
- ubuntu-latest | |
php-version: | |
- 7.4 | |
node-version: | |
- 16 | |
env: | |
extensions: xml, opcache, xdebug, pcov, grpc-1.30.0, protobuf-3.12.2 | |
key: cache-v3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP with extensions and custom config | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: ${{ env.extensions }} | |
ini-values: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Shanghai | |
tools: protoc, grpc_php_plugin | |
- name: Testing PHP version | |
run: | | |
php -v | |
php -r "if(strpos(phpversion(), '${{ matrix.php-version }}') === false) {throw new Exception('Wrong PHP version Installed');}" | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: npm | |
cache-dependency-path: package.json | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18 | |
id: go | |
- name: Install Dependencies | |
run: | | |
npm install | |
npm run install:protoc | |
- name: Test grpc_php_plugin and protoc | |
run: | | |
protoc --version | |
cd polyglot/php | |
cp /home/linuxbrew/.linuxbrew/bin/grpc_php_plugin /usr/local/bin/grpc_php_plugin | |
make generate |