Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
},
{
"customType": "regex",
"description": "Track the latest stable LLVM major version from official releases",
"description": "Track LLVM releases (major and patch) from the official GitHub releases; the full version drives the CI cache of the LLVM apt packages",
"managerFilePatterns": [
"/(^|/)Dockerfile$/"
],
"matchStrings": [
"# renovate: datasource=github-releases depName=llvm/llvm-project\\s*\\nARG LLVM_VERSION=(?<currentValue>\\d+)"
"# renovate: datasource=github-releases depName=llvm/llvm-project\\s*\\nARG LLVM_VERSION=(?<currentValue>\\d+\\.\\d+\\.\\d+)"
],
"depNameTemplate": "llvm/llvm-project",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^llvmorg-(?<version>\\d+)\\.\\d+\\.\\d+$",
"versioningTemplate": "semver-coerced"
"extractVersionTemplate": "^llvmorg-(?<version>\\d+\\.\\d+\\.\\d+)$",
"versioningTemplate": "semver"
}
]
}
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ jobs:
artifact_name: ${{ needs.Prepare.outputs.artifact_name }}
artifact_run_id: ${{ needs.Prepare.outputs.artifact_run_id }}
archive_name: ${{ needs.Prepare.outputs.archive_name }}
llvm_cache_key_amd64: ${{ needs.Prepare.outputs.llvm_cache_key_amd64 }}
llvm_cache_key_arm64: ${{ needs.Prepare.outputs.llvm_cache_key_arm64 }}
Linux_Emulated:
needs: Prepare
uses: ./.github/workflows/ci_emulated_linux.yaml
with:
artifact_name: ${{ needs.Prepare.outputs.artifact_name }}
artifact_run_id: ${{ needs.Prepare.outputs.artifact_run_id }}
archive_name: ${{ needs.Prepare.outputs.archive_name }}
llvm_cache_key_s390x: ${{ needs.Prepare.outputs.llvm_cache_key_s390x }}
macOS:
needs: Prepare
uses: ./.github/workflows/ci_macos.yaml
Expand All @@ -60,3 +63,5 @@ jobs:
artifact_name: ${{ needs.Prepare.outputs.artifact_name }}
artifact_run_id: ${{ needs.Prepare.outputs.artifact_run_id }}
archive_name: ${{ needs.Prepare.outputs.archive_name }}
llvm_cache_key_amd64: ${{ needs.Prepare.outputs.llvm_cache_key_amd64 }}
llvm_cache_key_arm64: ${{ needs.Prepare.outputs.llvm_cache_key_arm64 }}
31 changes: 31 additions & 0 deletions .github/workflows/ci_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ on:
archive_name:
required: true
type: string
llvm_cache_key_amd64:
description: actions/cache key of the pre-fetched LLVM apt packages for amd64 (from ci_prepare.yaml)
required: true
type: string
llvm_cache_key_arm64:
description: actions/cache key of the pre-fetched LLVM apt packages for arm64 (from ci_prepare.yaml)
required: true
type: string
jobs:
init:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -44,9 +52,20 @@ jobs:
else
echo "needs-init=false" >> "${GITHUB_OUTPUT}"
fi
- name: Restore LLVM apt packages from cache
if: steps.check.outputs.needs-init == 'true'
uses: actions/cache/restore@v6
with:
path: llvm-debs/trixie-amd64
key: ${{ inputs.llvm_cache_key_amd64 }}
fail-on-cache-miss: true
- name: Initialize extension
if: steps.check.outputs.needs-init == 'true'
run: |
# pskel init only needs the bundled PHP, so skip the Valgrind source build (and its download).
docker compose build \
--build-arg SKIP_VALGRIND=1 \
shell
docker compose run -v "$(pwd)/ext:/ext" --rm shell pskel init skeleton
- name: Upload initialized extension
if: steps.check.outputs.needs-init == 'true'
Expand Down Expand Up @@ -84,6 +103,12 @@ jobs:
with:
name: initialized-ext-coverage
path: ext/
- name: Restore LLVM apt packages from cache
uses: actions/cache/restore@v6
with:
path: llvm-debs/trixie-${{ matrix.platform == 'ubuntu-24.04-arm' && 'arm64' || 'amd64' }}
key: ${{ matrix.platform == 'ubuntu-24.04-arm' && inputs.llvm_cache_key_arm64 || inputs.llvm_cache_key_amd64 }}
fail-on-cache-miss: true
- name: Build container and run coverage
run: |
rm -f "ext/.gitkeep"
Expand Down Expand Up @@ -135,6 +160,12 @@ jobs:
with:
name: initialized-ext-coverage
path: ext/
- name: Restore LLVM apt packages from cache
uses: actions/cache/restore@v6
with:
path: llvm-debs/trixie-amd64
key: ${{ inputs.llvm_cache_key_amd64 }}
fail-on-cache-miss: true
- name: Build container
run: |
docker compose build \
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/ci_emulated_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
archive_name:
required: true
type: string
llvm_cache_key_s390x:
description: actions/cache key of the pre-fetched LLVM apt packages for s390x (from ci_prepare.yaml); empty when unavailable
required: false
default: ''
type: string
jobs:
Linux:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -74,6 +79,13 @@ jobs:
echo "exists=false" >> "${GITHUB_OUTPUT}"
echo "Image does not exist, will build: ${{ steps.image-tag.outputs.tag }}"
fi
- name: Restore LLVM apt packages from cache
if: steps.check-image.outputs.exists == 'false' && matrix.distro != 'alpine' && steps.cut-arch.outputs.arch == 's390x' && inputs.llvm_cache_key_s390x != ''
uses: actions/cache/restore@v6
with:
path: llvm-debs/${{ matrix.distro }}-${{ steps.cut-arch.outputs.arch }}
key: ${{ inputs.llvm_cache_key_s390x }}
fail-on-cache-miss: true
- name: Build container
if: steps.check-image.outputs.exists == 'false'
run: |
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/ci_native_linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ on:
archive_name:
required: true
type: string
llvm_cache_key_amd64:
description: actions/cache key of the pre-fetched LLVM apt packages for amd64 (from ci_prepare.yaml)
required: true
type: string
llvm_cache_key_arm64:
description: actions/cache key of the pre-fetched LLVM apt packages for arm64 (from ci_prepare.yaml)
required: true
type: string
jobs:
Linux:
env:
Expand All @@ -36,6 +44,45 @@ jobs:
ARCHIVE_PATH="${RUNNER_TEMP}/source-archive/${ARCHIVE_NAME}"
tar -xzf "${ARCHIVE_PATH}" --strip-components=1 -C "${GITHUB_WORKSPACE}"
rm -f "${ARCHIVE_PATH}"
- name: Detect toolchain cache keys
if: matrix.distro != 'alpine'
id: toolchain
env:
LLVM_CACHE_KEY_AMD64: ${{ inputs.llvm_cache_key_amd64 }}
LLVM_CACHE_KEY_ARM64: ${{ inputs.llvm_cache_key_arm64 }}
run: |
VALGRIND_VERSION="$(sed -n 's/^ARG VALGRIND_VERSION=//p' "Dockerfile" | head -n 1)"
if test -z "${VALGRIND_VERSION}"; then
echo "Error: VALGRIND_VERSION not found in Dockerfile." >&2
exit 1
fi
ARCH="$(dpkg --print-architecture)"
case "${ARCH}" in
amd64) LLVM_CACHE_KEY="${LLVM_CACHE_KEY_AMD64}";;
arm64) LLVM_CACHE_KEY="${LLVM_CACHE_KEY_ARM64}";;
*) echo "Error: no LLVM cache key for architecture ${ARCH}." >&2; exit 1;;
esac
if test -z "${LLVM_CACHE_KEY}"; then
echo "Error: empty LLVM cache key for architecture ${ARCH}." >&2
exit 1
fi
echo "valgrind_version=${VALGRIND_VERSION}" >> "${GITHUB_OUTPUT}"
echo "arch=${ARCH}" >> "${GITHUB_OUTPUT}"
echo "llvm_cache_key=${LLVM_CACHE_KEY}" >> "${GITHUB_OUTPUT}"
- name: Restore Valgrind tarball from cache
if: matrix.distro != 'alpine'
uses: actions/cache/restore@v6
with:
path: valgrind-${{ steps.toolchain.outputs.valgrind_version }}.tar.bz2
key: valgrind-tarball-${{ steps.toolchain.outputs.valgrind_version }}
fail-on-cache-miss: true
- name: Restore LLVM apt packages from cache
if: matrix.distro != 'alpine'
uses: actions/cache/restore@v6
with:
path: llvm-debs/${{ matrix.distro }}-${{ steps.toolchain.outputs.arch }}
key: ${{ steps.toolchain.outputs.llvm_cache_key }}
fail-on-cache-miss: true
- name: Pull PHP container image
id: pull-image
run: |
Expand Down
Loading
Loading