mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-12-06 09:50:56 +00:00
Add asan usage (#1052)
This commit is contained in:
@@ -124,7 +124,11 @@ add_devtools() {
|
||||
|
||||
# Function to setup PHP from the shivammathur/php-builder builds.
|
||||
setup_php_builder() {
|
||||
run_script "php-builder" "${runner:?}" "$version" "${debug:?}" "${ts:?}"
|
||||
if [[ -n "${asan:-}" && "$version" =~ ${no_asan_builds:?} ]]; then
|
||||
add_log "${cross:?}" "PHP" "ASAN is only supported for PHP 8.0+"
|
||||
exit 1
|
||||
fi
|
||||
run_script "php-builder" "${runner:?}" "$version" "${debug:?}" "${ts:?}" "${asan:-}"
|
||||
}
|
||||
|
||||
# Function to setup PHP 5.3, PHP 5.4 and PHP 5.5.
|
||||
@@ -237,7 +241,7 @@ update_php() {
|
||||
# Function to install PHP.
|
||||
add_php() {
|
||||
if [ "${runner:?}" = "self-hosted" ] || [ "${use_builds_cache:-true}" = "false" ]; then
|
||||
if [[ "$version" =~ ${php_builder_versions:?} || "$ts" = "zts" ]]; then
|
||||
if [[ "$version" =~ ${php_builder_versions:?} || "$ts" = "zts" || -n "${asan:-}" ]]; then
|
||||
setup_php_builder
|
||||
else
|
||||
add_packaged_php
|
||||
|
||||
@@ -7,6 +7,7 @@ export jit_versions="8.[0-9]"
|
||||
export php_builder_versions="8.[3-9]"
|
||||
export nightly_versions="8.[7-9]"
|
||||
export xdebug3_versions="7.[2-4]|8.[0-9]"
|
||||
export no_asan_builds="5.[3-6]|7.[0-4]"
|
||||
export latest="releases/latest/download"
|
||||
export github="https://github.com/shivammathur"
|
||||
export jsdeliver="https://cdn.jsdelivr.net/gh/shivammathur"
|
||||
@@ -84,6 +85,7 @@ read_env() {
|
||||
update="${update:-${UPDATE:-false}}"
|
||||
[ "${debug:-${DEBUG:-false}}" = "true" ] && debug=debug && update=true || debug=release
|
||||
[[ "${phpts:-${PHPTS:-nts}}" = "ts" || "${phpts:-${PHPTS:-nts}}" = "zts" ]] && ts=zts && update=true || ts=nts
|
||||
[[ "${asan:-${ASAN:-false}}" = "true" ]] && asan=asan && update=true || asan=
|
||||
fail_fast="${fail_fast:-${FAIL_FAST:-false}}"
|
||||
use_builds_cache="${use_builds_cache:-${use_package_cache:-}}"
|
||||
[[ ( -z "$ImageOS" && -z "$ImageVersion" ) ||
|
||||
@@ -120,6 +122,7 @@ read_env() {
|
||||
export runner
|
||||
export update
|
||||
export ts
|
||||
export asan
|
||||
export tool_path_dir
|
||||
export tool_cache_path_dir
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user