From 68d4ee357b8d359fce82a0e3aab34e380867b4ba Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 24 Feb 2026 10:14:29 +0100 Subject: [PATCH] Fix ccache for alpine and msan Declare CC/CXX through the ccache action. Closes GH-21286 --- .github/actions/ccache/action.yml | 10 ++++++++-- .github/workflows/test-suite.yml | 8 ++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/actions/ccache/action.yml b/.github/actions/ccache/action.yml index 5febb36af2e..a73a6cbe1e7 100644 --- a/.github/actions/ccache/action.yml +++ b/.github/actions/ccache/action.yml @@ -5,6 +5,12 @@ inputs: php_directory: required: false default: '.' + cc: + required: false + default: 'gcc' + cxx: + required: false + default: 'g++' runs: using: composite steps: @@ -29,5 +35,5 @@ runs: - name: Export CC/CXX shell: bash run: | - echo "CC=ccache gcc" >> $GITHUB_ENV - echo "CXX=ccache g++" >> $GITHUB_ENV + echo "CC=ccache ${{ inputs.cc }}" >> $GITHUB_ENV + echo "CXX=ccache ${{ inputs.cxx }}" >> $GITHUB_ENV diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 534366e7090..ea90b934508 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -76,14 +76,14 @@ jobs: uses: ./.github/actions/ccache with: name: "${{ github.job }}" + cc: clang-20 + cxx: clang++-20 - name: ./configure uses: ./.github/actions/configure-alpine with: configurationParameters: >- CFLAGS="-fsanitize=undefined,address -fno-sanitize=function -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address -fno-sanitize=function" - CC=clang-20 - CXX=clang++-20 --enable-debug --enable-zts skipSlow: true # FIXME: This should likely include slow extensions @@ -708,10 +708,10 @@ jobs: uses: ./.github/actions/ccache with: name: "${{ github.job }}" + cc: clang + cxx: clang++ - name: ./configure run: | - export CC=clang - export CXX=clang++ export CFLAGS="-DZEND_TRACK_ARENA_ALLOC" ./buildconf --force # msan requires all used libraries to be instrumented,