1- name : PHP Composer
1+ name : PHP-AV CI
22
33on :
44 push :
@@ -11,29 +11,54 @@ permissions:
1111
1212jobs :
1313 build :
14-
1514 runs-on : ubuntu-latest
1615
1716 steps :
18- - uses : actions/checkout@v4
17+ - uses : actions/checkout@v4
18+
19+ - name : Set up PHP 8.4 with FFI
20+ uses : shivammathur/setup-php@v2
21+ with :
22+ php-version : 8.4
23+ extensions : ffi
24+ ini-values : ffi.enable=true
25+ tools : composer:v2
26+
27+ - name : Validate composer.json and composer.lock
28+ run : composer validate --strict
29+
30+ - name : Cache Composer packages
31+ id : composer-cache
32+ uses : actions/cache@v3
33+ with :
34+ path : vendor
35+ key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
36+ restore-keys : |
37+ ${{ runner.os }}-php-
1938
20- - name : Validate composer.json and composer.lock
21- run : composer validate --strict
39+ - name : Install dependencies
40+ run : composer install --prefer-dist --no-progress
2241
23- - name : Cache Composer packages
24- id : composer-cache
25- uses : actions/cache@v3
26- with :
27- path : vendor
28- key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
29- restore-keys : |
30- ${{ runner.os }}-php-
42+ - name : Install FFmpeg 7+ from source
43+ run : |
44+ sudo apt update
45+ sudo apt install -y \
46+ autoconf automake build-essential cmake git libtool \
47+ pkg-config texinfo zlib1g-dev libx264-dev libx265-dev \
48+ libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev
3149
32- - name : Install dependencies
33- run : composer install --prefer-dist --no-progress
50+ git clone --depth=1 https://github.com/FFmpeg/FFmpeg.git
51+ cd FFmpeg
52+ ./configure --enable-shared --enable-gpl --enable-nonfree \
53+ --enable-libx264 --enable-libx265 --enable-libvpx \
54+ --enable-libfdk-aac --enable-libmp3lame --enable-libopus
55+ make -j$(nproc)
56+ sudo make install
57+ sudo ldconfig
58+ ffmpeg -version
3459
35- # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
36- # Docs: https://getcomposer.org/doc/articles/scripts.md
60+ - name : Check PHP and FFI status
61+ run : php -r "echo 'FFI enabled: ' . (extension_loaded('ffi') ? 'yes' : 'no') . PHP_EOL;"
3762
38- # - name: Run test suite
39- # run: composer run-script test
63+ - name : Run PHPUnit tests
64+ run : vendor/bin/phpunit
0 commit comments