-
Notifications
You must be signed in to change notification settings - Fork 28
138 lines (129 loc) · 4.08 KB
/
linux.yaml
File metadata and controls
138 lines (129 loc) · 4.08 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Linux
on: [push]
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
php:
- '8.5-alpine'
- '8.5-zts-alpine'
- '8.4-alpine'
- '8.4-zts-alpine'
- '8.3-alpine'
- '8.3-zts-alpine'
- '8.2-alpine'
- '8.2-zts-alpine'
- '8.1-alpine'
- '8.1-zts-alpine'
library:
- ''
- 'system'
apcu:
- ''
- 'apcu'
image: [php]
platform: [linux/amd64]
include:
- php: '8.3-alpine'
apcu: 'apcu'
image: php
platform: linux/386
- php: '8.2-alpine'
apcu: 'apcu'
image: php
platform: linux/386
- php: '8.1-alpine'
apcu: 'apcu'
image: php
platform: linux/386
- php: '8.0-alpine'
image: ghcr.io/kjdev/php
platform: linux/amd64
- php: '7.4-alpine'
image: ghcr.io/kjdev/php
platform: linux/amd64
- php: '7.3-alpine'
image: ghcr.io/kjdev/php
platform: linux/amd64
- php: '7.2-alpine'
image: ghcr.io/kjdev/php
platform: linux/amd64
- php: '7.1-alpine'
image: ghcr.io/kjdev/php
platform: linux/amd64
- php: '7.0-alpine'
image: ghcr.io/kjdev/php
platform: linux/amd64
container:
image: ${{ matrix.image }}:${{ matrix.php }}
options: --platform ${{ matrix.platform }}
steps:
- name: Prepare required command (alpine)
run: |
apk upgrade --no-cache
apk add --no-cache autoconf gcc git libtool make musl-dev
if: ${{ contains(matrix.php, 'alpine') }}
- name: Prepare required command (buster)
run: |
apt-get update
apt-get install -y git
if: ${{ contains(matrix.php, 'buster') }}
- name: adding github workspace as safe directory
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Checkout repository
uses: actions/checkout@v4
if: ${{ contains(matrix.platform, 'linux/amd64') }}
- name: Clone repository
run: |
git clone -b $GITHUB_REF_NAME $GITHUB_SERVER_URL/$GITHUB_REPOSITORY $GITHUB_WORKSPACE
if: ${{ contains(matrix.platform, 'linux/386') }}
- name: Checkout submodules
run: |
git submodule update --init --recursive
if: ${{ ! matrix.library }}
- name: Install dependency library (alpine)
run: |
apk add --no-cache brotli-dev
if: ${{ matrix.library && contains(matrix.php, 'alpine') }}
- name: Install dependency library (buster)
run: |
apt-get install -y libbrotli-dev
if: ${{ matrix.library && contains(matrix.php, 'buster') }}
- name: Install PHP APCu extension
run: |
printf "\n" | pecl install apcu
echo 'extension=apcu.so' > $(php --ini | grep 'Scan for' | sed -e 's/"//g' -e 's|.* \(/.*\)$|\1|')/apcu.ini
if: ${{ matrix.apcu }}
- name: Build
run: |
phpize
./configure
make
if: ${{ ! matrix.library }}
- name: Build with library
run: |
phpize
./configure --with-libbrotli
make
if: ${{ matrix.library }}
- name: Test Preparation APCu
run: |
cp $(php-config --extension-dir)/apcu.so modules/
sed -i 's/\$(PHP_TEST_SHARED_EXTENSIONS)/-d extension=apcu \$(PHP_TEST_SHARED_EXTENSIONS)/' Makefile
if: ${{ matrix.apcu }}
- name: Test
run: |
make test TESTS="--show-diff" | tee test-output.txt
grep 'TEST SUMMARY$' test-output.txt > /dev/null && exit 1 || exit 0
env:
REPORT_EXIT_STATUS: 1
NO_INTERACTION: 1
- name: Failure Test
run: |
for FILE in $(find ./tests -name '*.diff'); do
echo echo $FILE
cat $FILE
echo
done
if: ${{ failure() }}