Repository navigation
86 lines (71 loc) · 2.26 KB
/
Copy pathci.yml
File metadata and controls
86 lines (71 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Code Checks
on:
pull_request:
paths:
- ".github/workflows/ci.*"
- "ext/**"
- "tests/**"
push:
branches:
- "**"
paths:
- ".github/workflows/ci.*"
- "ext/**"
- "tests/**"
tags-ignore:
- "**"
jobs:
compile:
strategy:
matrix:
image:
- php:8.1-cli
- php:8.2-cli
- php:8.3-cli
- php:8.4-cli
- php:8.5-cli
name: Image ${{ matrix.image }}
runs-on: ubuntu-latest
container: ${{ matrix.image }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install system dependencies
run: |
apt-get update -q
apt-get install -qy gfortran liblapack-dev libopenblas-dev liblapacke-dev unzip
- name: Install PIE
run: |
curl -fL --output /tmp/pie.phar https://github.com/php/pie/releases/latest/download/pie.phar
mv /tmp/pie.phar /usr/local/bin/pie
chmod +x /usr/local/bin/pie
- name: Add extension as path repository
run: pie repository:add path .
- name: Build extension
run: pie install rubix/tensor_ext:*@dev
- name: Enable PHP extension
run: docker-php-ext-enable tensor
- name: Check for PHP startup warnings
run: |
php -d display_errors=stderr -d display_startup_errors=1 -d error_reporting=-1 -r ';' 2>/tmp/php-startup-warnings
if [ -s /tmp/php-startup-warnings ]; then
echo 'The PHP extension was successfully installed, but PHP raised these warnings:' >&2
cat /tmp/php-startup-warnings >&2
exit 1
fi
echo "PHP didn't raise any warnings at startup."
- name: Inspect PHP extension
run: php --ri tensor
- name: Install Composer
run: |
curl -fsSL https://getcomposer.org/installer -o /tmp/composer-setup.php
php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
rm /tmp/composer-setup.php
- name: Validate composer.json
run: composer validate
- name: Install Dependencies
run: composer install
- name: Unit Tests
run: composer test
- name: Check Coding Style
run: composer check