Skip to content

Commit 9c7a281

Browse files
committed
Update workflow.yml
1 parent 13729dc commit 9c7a281

1 file changed

Lines changed: 69 additions & 13 deletions

File tree

.github/workflows/workflow.yml

Lines changed: 69 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ jobs:
2929
version: 7.4.14
3030
- os: ubuntu-latest
3131
version: latest
32-
- os: macos-latest
33-
version: 8.0.0
34-
- os: macos-latest
35-
version: 7.4.14
36-
- os: macos-latest
37-
version: latest
32+
# will uncomment later; currently focus on linux
33+
# - os: macos-latest
34+
# version: 8.0.0
35+
# - os: macos-latest
36+
# version: 7.4.14
37+
# - os: macos-latest
38+
# version: latest
3839

3940
runs-on: ${{ matrix.os.os }}
4041

@@ -52,10 +53,10 @@ jobs:
5253
run: |
5354
if command -v sudo >/dev/null 2>&1; then
5455
sudo apt-get update
55-
sudo apt-get install -y autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev
56+
sudo apt-get install -y autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev ca-certificates wget
5657
else
5758
apt-get update
58-
apt-get install -y autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev
59+
apt-get install -y autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev ca-certificates wget
5960
fi
6061
6162
- name: Install system packages on macOS
@@ -65,24 +66,79 @@ jobs:
6566
- name: Setup asdf
6667
uses: asdf-vm/actions/setup@v4
6768

69+
- name: Install OpenSSL 1.1 for older PHP versions
70+
if: ${{ matrix.os.version == '8.0.0' || matrix.os.version == '7.4.14' }}
71+
run: |
72+
echo "Pre-installing OpenSSL 1.1 for PHP ${{ matrix.os.version }}..."
73+
74+
# Install to a clean location
75+
export OPENSSL_PREFIX="$HOME/.local/openssl-1.1"
76+
mkdir -p "$OPENSSL_PREFIX"
77+
78+
cd /tmp
79+
wget -q https://www.openssl.org/source/openssl-1.1.1w.tar.gz
80+
tar -xzf openssl-1.1.1w.tar.gz
81+
cd openssl-1.1.1w
82+
83+
# Clean configuration for CI
84+
./config --prefix="$OPENSSL_PREFIX" \
85+
--openssldir="$OPENSSL_PREFIX/ssl" \
86+
-fPIC no-shared no-tests \
87+
enable-pic
88+
89+
make -j2 >/dev/null 2>&1
90+
make install_sw >/dev/null 2>&1
91+
92+
echo "✓ OpenSSL 1.1.1w installed to $OPENSSL_PREFIX"
93+
94+
- name: Debug compiler environment
95+
run: |
96+
echo "=== Debugging Compiler Environment ==="
97+
echo "GCC version:"
98+
gcc --version || echo "GCC not found"
99+
echo "G++ version:"
100+
g++ --version || echo "G++ not found"
101+
echo "Environment variables:"
102+
env | grep -E "(CFLAGS|CXXFLAGS|LDFLAGS|CC|CXX)" || echo "No compiler env vars"
103+
echo "Available compilers:"
104+
ls -la /usr/bin/*gcc* /usr/bin/*g++* 2>/dev/null || echo "No compilers in /usr/bin"
105+
echo "Testing basic compilation:"
106+
echo 'int main() { return 0; }' > test.c
107+
gcc -o test test.c && echo "Basic compilation works" || echo "Basic compilation FAILED"
108+
rm -f test test.c
109+
68110
- name: Test plugin
69-
timeout-minutes: 30
111+
timeout-minutes: 45
70112
run: |
71113
# Add plugin from current checkout
72114
asdf plugin add php $GITHUB_WORKSPACE
73115
74-
# Install PHP version
75-
asdf install php ${{ matrix.os.version }}
116+
# Install PHP version with debug output
117+
echo "Installing PHP ${{ matrix.os.version }}..."
118+
echo "Current environment:"
119+
env | grep -E "(CFLAGS|CXXFLAGS|LDFLAGS|PATH)" || echo "No relevant env vars"
120+
121+
# Try installation with verbose output
122+
VERBOSE=y asdf install php ${{ matrix.os.version }} || {
123+
echo "Build failed, checking config.log..."
124+
find /tmp -name "config.log" -type f -exec echo "=== {} ===" \; -exec tail -50 {} \; 2>/dev/null || echo "No config.log found"
125+
exit 1
126+
}
76127
77128
# Set global and test
78129
asdf global php ${{ matrix.os.version }}
130+
echo "Testing PHP installation..."
79131
php --version
132+
133+
echo "PHP installation path:"
134+
asdf where php
80135
env:
81136
ASDF_PHP_OPENSSL_AUTO: yes
82137
PHP_BUILD_XDEBUG_ENABLE: off
83-
CFLAGS: "-Wno-error=dangling-pointer -Wno-error=calloc-transposed-args -Wno-error=deprecated-declarations"
84-
CXXFLAGS: "-Wno-error=dangling-pointer -Wno-error=calloc-transposed-args -Wno-error=deprecated-declarations"
85138
PHP_BUILD_CONFIGURE_OPTS: "--disable-werror"
139+
CFLAGS: "-Wno-error -Wno-deprecated-declarations -Wno-implicit-function-declaration -O2"
140+
CXXFLAGS: "-Wno-error -Wno-deprecated-declarations -O2"
141+
LDFLAGS: "-Wl,--no-as-needed"
86142

87143
- name: Test Composer (if available)
88144
if: success()

0 commit comments

Comments
 (0)