Repository navigation
120 lines (116 loc) · 6.04 KB
/
Copy pathpackaging-checks.yml
File metadata and controls
120 lines (116 loc) · 6.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Packaging code checks
on:
push:
branches: [master]
paths: ['bin/**', 'src/**', 'tests/**', 'config/**', 'composer.*', '.github/actions/**', '.github/workflows/**']
pull_request:
paths: ['bin/**', 'src/**', 'tests/**', 'config/**', 'composer.*', '.github/actions/**', '.github/workflows/**']
workflow_dispatch:
permissions:
contents: read
packages: read
jobs:
check:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- image: ghcr.io/static-php/packages-builder-rhel-8
formats: rpm,deb
- image: ghcr.io/static-php/packages-builder-alpine
formats: apk
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Authenticate builder pull
env:
GH_TOKEN: ${{ github.token }}
run: printf '%s' "$GH_TOKEN" | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin
- name: Check packaging code in native builders
env:
IMAGE: ${{ matrix.image }}
FORMATS: ${{ matrix.formats }}
run: |
docker run --rm -v "$GITHUB_WORKSPACE:/build" -w /build -e FORMATS "$IMAGE" bash -c '
set -euo pipefail
if command -v python3.9 >/dev/null; then
mkdir -p /tmp/python-bin
ln -s "$(command -v python3.9)" /tmp/python-bin/python3
export PATH=/tmp/python-bin:$PATH
fi
git config --global --add safe.directory /build
composer install --no-interaction --prefer-dist --no-progress
php tests/builder-tool-cache.php
php tests/attr-install.php
php tests/shared-extension-re2c.php
php tests/build-payload.php
php tests/extension-assets.php
php tests/partial-consumer-preservation.php
php tests/module-only-build.php
python3 tests/glibc-pipeline.py \
Pipeline.test_sdk_classification_needs_no_temporary_craft_and_scans_consumers_only_after_rebuild \
Pipeline.test_publication_rechecks_the_recorded_library_baseline_scope \
Pipeline.test_publication_guard_accepts_recorded_scope_and_rejects_real_changes
php tests/package-iterations.php
php tests/shared-libraries.php
php tests/library-iterations.php
php tests/frankenphp-migration-iterations.php
python3 tests/apk-reuse-published.py
for format in ${FORMATS//,/ }; do
php tests/abi-consumer-revisions.php --type="$format"
php tests/package-versions.php --type="$format"
php tests/sapi-recommendations.php --type="$format"
php tests/shared-library-packages.php --type="$format"
done
python3 tests/payload-profile.py
python3 tests/payload-cache.py
python3 tests/repackage-glibc.py
python3 tests/repository-state.py
python3 tests/format-packages.py
python3 tests/openssl-variants.py
python3 tests/pinned-library-sources.py
python3 tests/incremental-library-builds.py
python3 tests/spc-library-transition.py
python3 tests/upgrade-guards.py
python3 tests/package-content.py
python3 tests/migration-upgrade-harness.py
python3 tests/migration-baseline.py
python3 tests/forgejo-publication.py
python3 tests/library-sonames.py
python3 tests/shared-library-plan.py
python3 tests/source-state.py
python3 tests/source-snapshot-transfer.py
python3 tests/source-plan-identities.py
python3 tests/publication-baselines.py
python3 tests/publication-retry-plan.py
'
native-soname-solvers:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
runtime: [alma8, debian, alpine]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Verify SONAME provider retention and upgrades
env:
RUNTIME: ${{ matrix.runtime }}
run: python3 tests/shared-runtime-containers.py --fixtures-only --os "$RUNTIME"
- name: Authenticate Debian packaging image
if: matrix.runtime == 'debian'
env:
GH_TOKEN: ${{ github.token }}
run: printf '%s' "$GH_TOKEN" | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin
- name: Verify generated DEB dependencies with APT
if: matrix.runtime == 'debian'
run: |
docker run --rm -v "$GITHUB_WORKSPACE:/build" -w /build ghcr.io/static-php/packages-packager-debian bash -ec '
command -v apt-get
git config --global --add safe.directory /build
composer install --no-dev --no-interaction --prefer-dist --no-progress
php tests/shared-library-packages.php --type=deb
'