php-actions / composer

Use the Composer CLI in your Github Actions.
175 stars 54 forks source link

Lua extension #83

Closed carloshenrq closed 1 year ago

carloshenrq commented 2 years ago

Hi everyone

I'm having an issue with the Lua extension on my github action.

name: PHP Composer

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

env:
  XDEBUG_MODE: coverage

jobs:
  build:
    runs-on: ubuntu-latest

    services:
      redis:
        image: redis
        options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
        ports:
          - 6379:6379

      rabbitmq:
        image: rabbitmq:3.8
        env:
          RABBITMQ_DEFAULT_USER: guest
          RABBITMQ_DEFAULT_PASS: guest
        ports:
          - 5672:5672
        options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5

    steps:
    - uses: actions/checkout@v2

    - name: Validate composer.json and composer.lock
      run: composer validate --strict

    - name: Composer install
      uses: php-actions/composer@v6
      with:
        php_version: "7.4"
        php_extensions: gd sockets bcmath xdebug lua
        version: 2
        dev: yes

    - name: Composer test (phpunit)
      uses: php-actions/composer@v6
      with:
        php_version: "7.4"
        php_extensions: gd sockets bcmath xdebug
        version: 2
        progress: yes
        dev: yes
        quiet: no
        command: test-coverage
      env:
        REDIS_CACHE_PATH: tcp://127.0.0.1:6379

    - name: Codecov upload
      uses: codecov/codecov-action@v2
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        files: ./coverage.xml
        verbose: true

The error I'm getting it's:

  checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
  checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20190902
  checking for PHP installed headers prefix... /usr/local/include/php
  checking if debug is enabled... no
  checking if zts is enabled... no
  checking for gawk... no
  checking for nawk... no
  checking for awk... awk
  checking if awk is broken... no
  checking for lua support... yes, shared
  checking to specify a custom lua version... yes, shared
  checking to specify a custom lua version... yes, shared
  checking for lua in default path... not found
  configure: error: Please reinstall the lua distribution - lua.h should be in <lua-dir>/include/
  ERROR: `/tmp/pear/temp/lua/configure --with-php-config=/usr/local/bin/php-config' failed
  The command '/bin/sh -c chmod +x /usr/local/bin/install-php-extensions && sync && install-php-extensions gd sockets bcmath xdebug lua' returned a non-zero code: 1
Error: Process completed with exit code 1.

I already have tried to use action leafo/gh-actions-lua@v9. Does anyone have a hint about it?

Un1matr1x commented 2 years ago

I'm unsure if this might help or even if this is still an issue for you, but the readme says: https://github.com/php-actions/composer#including-php-extensions

This action includes the extensions that Composer suggests by default. To include additional PHP extensions in your action steps, set the php_extensions input with any of the supported extension names separated by spaces.

at the supported extension names I don't see a lua extension, only a luasandbox

g105b commented 1 year ago

Closing this, but if @carloshenrq has problems listing the extension in the php_extensions list, please feel free to re-open.