File tree Expand file tree Collapse file tree 5 files changed +52
-6
lines changed Expand file tree Collapse file tree 5 files changed +52
-6
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-18.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 2
2
3
3
set -ex
4
4
5
+ if which apt-get > /dev/null 2>&1 ; then
6
+ sudo apt-get -y install zlib1g-dev:$BUILD_ARCH
7
+ fi
8
+
5
9
if [ " $MEMORY_CHECK " = " 1" ]; then
6
10
if which apt-get > /dev/null 2>&1 ; then
7
- sudo apt-get -y install valgrind
11
+ sudo apt-get -y install valgrind: $BUILD_ARCH
8
12
else
9
- break install valgrind
13
+ brew install valgrind
10
14
fi
11
15
fi
12
16
@@ -36,7 +40,15 @@ if ! [ -f "$HOME/build-cache/php/$PREFIX/bin/php" ]; then
36
40
PHP_BUILD_FLAGS=" $PHP_BUILD_FLAGS --with-valgrind"
37
41
fi
38
42
39
- ./configure $PHP_BUILD_FLAGS $PHP_BUILD_EXTRA_FLAGS
43
+ case " $BUILD_ARCH " in
44
+ i386)
45
+ PHP_BUILD_CFLAGS=" $PHP_BUILD_CFLAGS -m32"
46
+ PHP_BUILD_ASFLAGS=" $PHP_BUILD_ASFLAGS -m32"
47
+ PHP_BUILD_FLAGS=" $PHP_BUILD_FLAGS --host=$BUILD_ARCH "
48
+ ;;
49
+ esac
50
+
51
+ ASFLAGS=" $PHP_BUILD_ASFLAGS =" CFLAGS=" $PHP_BUILD_CFLAGS " ./configure $PHP_BUILD_FLAGS
40
52
make -j $( nproc)
41
53
rm -rf " $HOME /build-cache/php"
42
54
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