File tree Expand file tree Collapse file tree 5 files changed +47
-5
lines changed Expand file tree Collapse file tree 5 files changed +47
-5
lines changed Original file line number Diff line number Diff line change 19
19
expect_native : 1
20
20
werror : 1
21
21
22
+ - php : ' 8.1.0'
23
+ os : ' ubuntu-20.04'
24
+ expect_native : 1
25
+ werror : 1
26
+ arch : i386
27
+
22
28
- php : ' 8.0.0'
23
29
os : ' ubuntu-20.04'
24
30
expect_native : 1
42
48
MEMORY_CHECK : ${{ matrix.memcheck }}
43
49
WERROR : ${{ matrix.werror }}
44
50
MEMPROF_EXPECT_NATIVE_TRACKING : ${{ matrix.expect_native }}
51
+ BUILD_ARCH : ${{ matrix.arch || 'amd64' }}
45
52
steps :
46
53
- name : ' Check out repository'
47
54
uses : ' actions/checkout@v2'
51
58
- uses : actions/cache@v2
52
59
with :
53
60
path : ~/build-cache/php
54
- key : ${{ runner.os }}-${{ matrix.php }}-${{ matrix.memcheck }}
61
+ key : ${{ runner.os }}-${{matrix.arch}}-${{ matrix.php }}-${{ matrix.memcheck }}
62
+
63
+ - name : ' Setup'
64
+ run : ' ./ext/.github/workflows/test/setup.sh'
55
65
56
66
- name : ' Build PHP'
57
67
run : ' ./ext/.github/workflows/test/build-php.sh'
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ echo "Building extension with PHP version:"
9
9
php --version
10
10
11
11
if which apt-get > /dev/null 2>&1 ; then
12
- sudo apt-get -y install libjudy-dev
12
+ sudo apt-get -y install libjudy-dev: $BUILD_ARCH
13
13
else
14
14
brew install traildb/judy/judy
15
15
fi
@@ -18,6 +18,12 @@ if [ "$WERROR" = "1" ]; then
18
18
PHP_EXT_CFLAGS=" -Wall -Werror -Wno-deprecated-declarations"
19
19
fi
20
20
21
+ case " $BUILD_ARCH " in
22
+ i386)
23
+ PHP_EXT_CFLAGS=" $PHP_EXT_CFLAGS -m32"
24
+ ;;
25
+ esac
26
+
21
27
cd ext
22
28
phpize
23
29
CFLAGS=" $PHP_EXT_CFLAGS " ./configure
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ if ! [ -f "$HOME/build-cache/php/$PREFIX/bin/php" ]; then
23
23
git clone --depth 1 --branch " $PHP_TAG " https://github.com/php/php-src.git
24
24
cd php-src
25
25
26
- sudo apt-get -y install re2c
26
+ sudo apt-get -y install re2c: $BUILD_ARCH zlib1g-dev: $BUILD_ARCH
27
27
fi
28
28
29
29
if ! [ -f " configure" ]; then
@@ -36,7 +36,15 @@ if ! [ -f "$HOME/build-cache/php/$PREFIX/bin/php" ]; then
36
36
PHP_BUILD_FLAGS=" $PHP_BUILD_FLAGS --with-valgrind"
37
37
fi
38
38
39
- ./configure $PHP_BUILD_FLAGS $PHP_BUILD_EXTRA_FLAGS
39
+ case " $BUILD_ARCH " in
40
+ i386)
41
+ PHP_BUILD_CFLAGS=" $PHP_BUILD_CFLAGS -m32"
42
+ PHP_BUILD_ASFLAGS=" $PHP_BUILD_ASFLAGS -m32"
43
+ PHP_BUILD_FLAGS=" $PHP_BUILD_FLAGS --host=$BUILD_ARCH "
44
+ ;;
45
+ esac
46
+
47
+ ASFLAGS=" $PHP_BUILD_ASFLAGS =" CFLAGS=" $PHP_BUILD_CFLAGS " ./configure $PHP_BUILD_FLAGS
40
48
make -j $( nproc)
41
49
rm -rf " $HOME /build-cache/php"
42
50
mkdir -p ~ /build-cache/php
Original file line number Diff line number Diff line change @@ -9,7 +9,13 @@ git clone --depth 1 --branch "3.1.2" "https://github.com/xdebug/xdebug.git"
9
9
10
10
cd xdebug
11
11
12
+ case " $BUILD_ARCH " in
13
+ i386)
14
+ PHP_EXT_CFLAGS=" $PHP_EXT_CFLAGS -m32"
15
+ ;;
16
+ esac
17
+
12
18
phpize
13
- ./configure
19
+ CFLAGS= " $PHP_EXT_CFLAGS " ./configure
14
20
make
15
21
sudo make install
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ set -ex
4
+
5
+ case " $BUILD_ARCH " in
6
+ i386)
7
+ echo " Setup $BUILD_ARCH architecture"
8
+ sudo dpkg --add-architecture " $BUILD_ARCH "
9
+ sudo apt-get update
10
+ sudo apt-get install gcc-multilib
11
+ ;;
12
+ esac
You can’t perform that action at this time.
0 commit comments