Skip to content

Commit e7a91cf

Browse files
feat: Bump shared libraries versions, onnxruntime -> 1.21.0, rindowmatlib -> 1.1.0
- Improved the Native libraries to work with versioning in binary names - Implemented dynamic library path generation based on platform-specific templates.
1 parent 8ce4c9c commit e7a91cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+150
-25
lines changed

.github/workflows/tests.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Tests
2+
3+
on: ['push', 'pull_request']
4+
5+
jobs:
6+
ci:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
os: [ubuntu-latest, macos-latest, windows-latest]
13+
php: [8.1, 8.2, 8.3, 8.4]
14+
max-parallel: 4
15+
16+
name: Tests PHP${{ matrix.php }} - ${{ matrix.os }}
17+
18+
steps:
19+
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Cache dependencies
24+
uses: actions/cache@v4
25+
with:
26+
path: ~/.composer/cache/files
27+
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
28+
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php }}
33+
extensions: dom, mbstring, zip, ffi
34+
coverage: none
35+
36+
- name: Install Composer dependencies
37+
run: composer update --no-interaction --prefer-dist
38+
39+
- name: Run Tests
40+
run: composer test

index.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,27 @@
22

33
require_once __DIR__ . '/vendor/autoload.php';
44

5+
use Codewithkyrian\Transformers\FFI\OpenBLAS;
6+
use Codewithkyrian\Transformers\FFI\Libvips;
57
use Codewithkyrian\Transformers\FFI\OnnxRuntime;
8+
use Codewithkyrian\Transformers\FFI\RindowMatlib;
69
use Codewithkyrian\Transformers\FFI\Samplerate;
710
use Codewithkyrian\Transformers\FFI\Sndfile;
11+
use Codewithkyrian\Transformers\FFI\TransformersUtils;
812

13+
$onnx = new OpenBLAS();
14+
$vips = new Libvips();
15+
$onnxRuntime = new OnnxRuntime();
16+
$rindowMatlib = new RindowMatlib();
917
$samplerate = new Samplerate();
18+
$sndfile = new Sndfile();
19+
$transformersUtils = new TransformersUtils();
1020

11-
echo $samplerate->version();
21+
22+
dump("Found OpenBLAS? " . (file_exists($onnx->getLibraryPath()) ? 'Yes' : 'No'));
23+
dump("Found Libvips? " . (file_exists($vips->getLibraryPath()) ? 'Yes' : 'No'));
24+
dump("Found OnnxRuntime? " . (file_exists($onnxRuntime->getLibraryPath()) ? 'Yes' : 'No'));
25+
dump("Found RindowMatlib? " . (file_exists($rindowMatlib->getLibraryPath()) ? 'Yes' : 'No'));
26+
dump("Found Samplerate? " . (file_exists($samplerate->getLibraryPath()) ? 'Yes' : 'No'));
27+
dump("Found Sndfile? " . (file_exists($sndfile->getLibraryPath()) ? 'Yes' : 'No'));
28+
dump("Found TransformersUtils? " . (file_exists($transformersUtils->getLibraryPath()) ? 'Yes' : 'No'));

0 commit comments

Comments
 (0)