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 1919 expect_native : 1
2020 werror : 1
2121
22+ - php : ' 8.1.0'
23+ os : ' ubuntu-20.04'
24+ expect_native : 1
25+ werror : 1
26+ arch : i386
27+
2228 - php : ' 8.0.0'
2329 os : ' ubuntu-20.04'
2430 expect_native : 1
4248 MEMORY_CHECK : ${{ matrix.memcheck }}
4349 WERROR : ${{ matrix.werror }}
4450 MEMPROF_EXPECT_NATIVE_TRACKING : ${{ matrix.expect_native }}
51+ BUILD_ARCH : ${{ matrix.arch || 'amd64' }}
4552 steps :
4653 - name : ' Check out repository'
4754 uses : ' actions/checkout@v2'
5158 - uses : actions/cache@v2
5259 with :
5360 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'
5565
5666 - name : ' Build PHP'
5767 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:"
99php --version
1010
1111if 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
1313else
1414 brew install traildb/judy/judy
1515fi
@@ -18,6 +18,12 @@ if [ "$WERROR" = "1" ]; then
1818 PHP_EXT_CFLAGS=" -Wall -Werror -Wno-deprecated-declarations"
1919fi
2020
21+ case " $BUILD_ARCH " in
22+ i386)
23+ PHP_EXT_CFLAGS=" $PHP_EXT_CFLAGS -m32"
24+ ;;
25+ esac
26+
2127cd ext
2228phpize
2329CFLAGS=" $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
2323 git clone --depth 1 --branch " $PHP_TAG " https://github.com/php/php-src.git
2424 cd php-src
2525
26- sudo apt-get -y install re2c
26+ sudo apt-get -y install re2c: $BUILD_ARCH zlib1g-dev: $BUILD_ARCH
2727 fi
2828
2929 if ! [ -f " configure" ]; then
@@ -36,7 +36,15 @@ if ! [ -f "$HOME/build-cache/php/$PREFIX/bin/php" ]; then
3636 PHP_BUILD_FLAGS=" $PHP_BUILD_FLAGS --with-valgrind"
3737 fi
3838
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
4048 make -j $( nproc)
4149 rm -rf " $HOME /build-cache/php"
4250 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"
99
1010cd xdebug
1111
12+ case " $BUILD_ARCH " in
13+ i386)
14+ PHP_EXT_CFLAGS=" $PHP_EXT_CFLAGS -m32"
15+ ;;
16+ esac
17+
1218phpize
13- ./configure
19+ CFLAGS= " $PHP_EXT_CFLAGS " ./configure
1420make
1521sudo 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