File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ jobs:
103103 use_buildx : true
104104 run : " "
105105 - name : AMD64 native on OSX
106- os : macos-13
106+ os : macos-15
107107 arch : x86_64
108108 use_buildx : false
109109 run : ./build-osx
@@ -557,7 +557,7 @@ jobs:
557557 - artifact_suffix : ubuntu-22.04-arm64
558558 asset_name_suffix : linux-arm64.tar.gz
559559 asset_content_type : application/gzip
560- - artifact_suffix : macos-13 -x86_64
560+ - artifact_suffix : macos-15 -x86_64
561561 asset_name_suffix : macos-x86_64.tar.gz
562562 asset_content_type : application/gzip
563563 - artifact_suffix : macos-14-arm64
@@ -811,7 +811,7 @@ jobs:
811811 arch : aarch
812812 delimiter : " _"
813813 distro : 10
814- - artifact : artifact-macos-13 -x86_64
814+ - artifact : artifact-macos-15 -x86_64
815815 type : arc
816816 arch : x86_64
817817 delimiter : " -"
Original file line number Diff line number Diff line change 3030 arch : amd64
3131 build_type : jammy
3232 - job_name : ' Build static on amd64 OSX'
33- os : macos-13
33+ os : macos-15
3434 use_docker : false
3535 script_name : ./build-osx
3636 arch : amd64
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ install_deps() {
2222 ln -s /usr/bin/objcopy " /usr/bin/${arch} -alpine-linux-musl-objcopy"
2323 export CROSS_COMPILE=" /usr/bin/${arch} -alpine-linux-musl-"
2424
25- apk add curl git autoconf bison re2c pkgconf zlib-dev zstd-dev openssl-libs-static openssl-dev zlib-static zlib-dev gnu-libiconv-dev
25+ apk add curl git autoconf bison re2c pkgconf zlib-dev zstd-dev openssl-libs-static openssl-dev zlib-static zlib-dev gnu-libiconv-dev clang-dev llvm-dev
2626
2727 install_curl
2828
@@ -31,6 +31,8 @@ install_deps() {
3131 install_zlib
3232
3333 install_rdkafka
34+
35+ install_rust
3436}
3537
3638install_dev_deps () {
@@ -39,7 +41,7 @@ install_dev_deps() {
3941 install_libxml2
4042}
4143
42- export -f install_deps install_dev_deps
44+ export -f install_deps install_dev_deps install_rust
4345. build-bash-base.sh " $@ "
4446
4547if [ " $BUILD_DEV " -eq 1 ]; then
@@ -61,6 +63,7 @@ ENABLE_STATIC=yes
6163 --with-rdkafka \
6264 --enable-jchash \
6365 --enable-simdjson \
66+ --enable-llm \
6467 --with-openssl --with-zlib --with-zip \
6568 --enable-filter \
6669 --with-curl \
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ SWOOLE_REV="3e1a1f89930ba0bbea1f5ee31bcd0ee701a87aab"
1414RDKAFKA_REV=" 53398031f1cd96e437e9705b67b4dc19d955acb6"
1515JCHASH_REV=" 8ed50cc8c211effe1c214eae1e3240622e0f11b0"
1616SIMDJSON_REV=" 9a2745669fea733a40f9443b1a793846d0759b89"
17+ LLM_REV=" 5d31060ec962d4b13b3e429cbfe4aaca38711047"
1718SKIP_SYSTEM_DEPS=" $2 "
1819BUILD_DEV=" $3 "
1920BUILD_STATIC=1 # Always build static but dev
7980fi
8081cd ..
8182
83+ # llm
84+ git clone https://github.com/manticoresoftware/llm-php-ext.git llm
85+ cd llm && git checkout " $LLM_REV "
86+ cd ..
87+
88+ # Build llm extension statically
89+ cd ext/llm
90+ if [ " $( uname) " == " Darwin" ]; then
91+ # macOS: Use LLVM 17 from Homebrew
92+ LLVM_PREFIX=" $( brew --prefix llvm@17 2> /dev/null || echo /opt/homebrew/opt/llvm@17) "
93+ LIBCLANG_PATH=" $LLVM_PREFIX /lib"
94+ LLVM_CONFIG_PATH=" $LLVM_PREFIX /bin/llvm-config"
95+ LLVM_PATH=" $LLVM_PREFIX /bin"
96+ LIBCLANG_PATH=" $LIBCLANG_PATH " LLVM_CONFIG_PATH=" $LLVM_CONFIG_PATH " PATH=" $LLVM_PATH :$PATH " cargo build --release --features static
97+ else
98+ # Linux
99+ cargo build --release --features static
100+ fi
101+ cd ../..
102+
82103cd ..
83104
84105BUILD_EXTRA=()
Original file line number Diff line number Diff line change @@ -17,14 +17,16 @@ set -xe
1717
1818install_deps () {
1919 sudo apt-get update -y
20- sudo apt-get install -y curl build-essential autoconf automake bison re2c libzstd-dev pkg-config git libssl-dev zlib1g-dev libzip-dev libonig-dev cmake libcurl4-openssl-dev libzip-dev librdkafka-dev libiconv-hook-dev
20+ sudo apt-get install -y curl build-essential autoconf automake bison re2c libzstd-dev pkg-config git libssl-dev zlib1g-dev libzip-dev libonig-dev cmake libcurl4-openssl-dev libzip-dev librdkafka-dev libiconv-hook-dev libclang-dev llvm-dev
21+
22+ install_rust
2123}
2224
2325install_dev_deps () {
2426 sudo apt-get install -y libonig-dev libgmp-dev libxml2-dev
2527}
2628
27- export -f install_deps install_dev_deps
29+ export -f install_deps install_dev_deps install_rust
2830. build-bash-base.sh " $@ "
2931
3032
@@ -47,6 +49,7 @@ ENABLE_STATIC=yes
4749 --with-rdkafka \
4850 --enable-jchash \
4951 --enable-simdjson \
52+ --enable-llm \
5053 --with-openssl --with-zlib --with-zip --with-iconv \
5154 --enable-filter \
5255 --with-curl \
Original file line number Diff line number Diff line change 77# you can find it at https://www.php.net/license/3_01.txt
88
99set -e
10+ . helper.sh
11+
1012install_deps () {
11- brew install bash curl autoconf automake bison re2c zstd git openssl zlib cmake libzip librdkafka libiconv
13+ brew install bash curl autoconf automake bison re2c zstd git openssl zlib cmake libzip librdkafka libiconv llvm@17
1214
1315 OPENSSL_PREFIX=" $( brew --prefix openssl) "
1416 LIBRDKAFKA_PREFIX=" $( brew --prefix librdkafka) "
@@ -21,13 +23,15 @@ install_deps() {
2123 export CPPFLAGS=" -I${OPENSSL_PREFIX} /include -I${LIBRDKAFKA_PREFIX} /include -I${ICONV_PREFIX} /include"
2224
2325 export PKG_CONFIG_PATH=" ${OPENSSL_PREFIX} /lib/pkgconfig"
26+
27+ install_rust
2428}
2529
2630install_dev_deps () {
2731 brew install libxml2 oniguruma libgmp
2832}
2933
30- export -f install_deps install_dev_deps
34+ export -f install_deps install_dev_deps install_rust
3135. ./build-bash-base.sh " $@ "
3236
3337hide_dynamic_libs () {
@@ -95,6 +99,7 @@ chmod +x configure
9599 --with-rdkafka \
96100 --enable-jchash \
97101 --enable-simdjson \
102+ --enable-llm \
98103 --with-openssl --with-zlib --with-zip --with-iconv=$( brew --prefix libiconv) \
99104 --enable-filter \
100105 --with-curl \
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -ex
33
4+ install_rust () {
5+ # Install Rust toolchain
6+ curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7+ # Source cargo environment
8+ . " $HOME /.cargo/env"
9+ # Install cargo-php for building PHP extensions
10+ cargo install cargo-php --locked
11+ }
12+
413install_curl () {
514 test -d curl-8.0.0 && rm -fr " $_ "
615 curl -sSL https://github.com/curl/curl/releases/download/curl-8_0_0/curl-8.0.0.tar.gz | tar -xzf -
You can’t perform that action at this time.
0 commit comments