1
- name : PHP Composer
1
+ name : PHP-AV CI
2
2
3
3
on :
4
4
push :
@@ -11,29 +11,54 @@ permissions:
11
11
12
12
jobs :
13
13
build :
14
-
15
14
runs-on : ubuntu-latest
16
15
17
16
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-
19
38
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
22
41
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
31
49
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
34
59
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;"
37
62
38
- # - name: Run test suite
39
- # run: composer run-script test
63
+ - name : Run PHPUnit tests
64
+ run : vendor/bin/phpunit
0 commit comments