-
-
Notifications
You must be signed in to change notification settings - Fork 193
87 lines (74 loc) · 2.97 KB
/
Copy pathci.yml
File metadata and controls
87 lines (74 loc) · 2.97 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
87
name: "Code Checks"
on: [push, pull_request]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
Build:
name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
#operating-system: [windows-latest, ubuntu-latest, macos-latest]
operating-system: [ubuntu-latest]
php-versions: ['8.4']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer, pecl
extensions: svm, mbstring, gd, fileinfo, swoole
ini-values: memory_limit=-1
- name: Install OpenBLAS
if: matrix.operating-system == 'ubuntu-latest'
run: |
sudo apt-get update -q
sudo apt-get install -qy libopenblas-dev liblapacke-dev
- name: Install OpenBLAS/LAPACK (macOS)
if: matrix.operating-system == 'macos-latest'
run: |
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_ANALYTICS=1
brew install pkg-config autoconf automake libtool openblas lapack
echo "OPENBLAS_PREFIX=$(brew --prefix openblas)" >> "$GITHUB_ENV"
echo "LAPACK_PREFIX=$(brew --prefix lapack)" >> "$GITHUB_ENV"
echo "CPPFLAGS=-I$(brew --prefix openblas)/include -I$(brew --prefix lapack)/include" >> "$GITHUB_ENV"
echo "LDFLAGS=-L$(brew --prefix openblas)/lib -L$(brew --prefix lapack)/lib" >> "$GITHUB_ENV"
echo "PKG_CONFIG_PATH=$(brew --prefix openblas)/lib/pkgconfig" >> "$GITHUB_ENV"
- name: Install NumPower
run: |
if [ "${{ matrix.operating-system }}" = "macos-latest" ]; then
git clone --branch mac4 --single-branch https://github.com/RubixML/numpower.git
cd numpower
phpize
# Work around Apple clang/libc math portability: isnanf() is not available on macos-latest
perl -pi -e 's/\bisnanf\(/isnan(/g' src/ndmath/calculation.c
else
git clone https://github.com/RubixML/numpower.git
cd numpower
phpize
fi
./configure
make
sudo make install
ini_dir="$(php -r 'echo PHP_CONFIG_FILE_SCAN_DIR;')"
if [ -z "$ini_dir" ] || [ "$ini_dir" = "(none)" ]; then
loaded_ini="$(php --ini | sed -n 's|^Loaded Configuration File:\s*||p')"
ini_dir="$(dirname "$loaded_ini")"
fi
echo "extension=ndarray.so" | sudo tee "$ini_dir/99-ndarray.ini" > /dev/null
- name: Validate composer.json
run: composer validate
- name: Install Dependencies
run: composer install
- name: Run phplint
run: composer phplint
#- name: Static Analysis
# run: composer analyze
- name: Unit Tests
run: composer test
- name: Check Coding Style
run: composer check