Require built LibScyllaDB/LibCassandra (removed from source building) #1
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
name: 'Test PHP Extension' | |
on: | |
workflow_call: | |
push: | |
branches: | |
- v1.3.x | |
pull_request: | |
branches: | |
- v1.3.x | |
jobs: | |
test: | |
strategy: | |
matrix: | |
php: ['8.1.29', '8.2.20', '8.3.8', '8.1.29-zts', '8.2.20-zts', '8.3.8-zts'] | |
os: ['ubuntu-latest'] | |
preset: ['CICassandra', 'CIScylla'] | |
runs-on: ${{ matrix.os }} | |
container: malusevd99/scylladb-php-driver:php-${{ matrix.php }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Run tests | |
run: | | |
export PATH="$PATH:/usr/local/bin:/root/php/bin" | |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/lib/x86_64-linux-gnu:/usr/local/lib/:/usr/lib:/lib:/usr/local/lib/x86_64-linux-gnu" | |
cmake --preset ${{ matrix.preset }} || exit 1 | |
cd out/${{ matrix.preset }} || exit 1 | |
ninja install || exit 1 | |
cd ../../ | |
PHP_INI=$("php" --ini | grep "php.ini" | awk '{ print $5 }' | xargs -I {} printf '%s/php.ini' {}) | |
cat cassandra.ini >> "$PHP_INI" || exit 1 | |
cd tests | |
php /bin/composer install | |
php ./vendor/bin/pest |