Skip to content

Commit 3b44a54

Browse files
authored
improve ci (#14)
* improve ci * fix indent * add linux headers * disable debug build on alpine * Revert "disable debug build on alpine" This reverts commit dfdb801. * disable extended test on 8.1 * disable qemu cache
1 parent 2c20c66 commit 3b44a54

File tree

2 files changed

+41
-64
lines changed

2 files changed

+41
-64
lines changed

.github/workflows/ci.yaml

Lines changed: 40 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,50 @@ on:
44
branches:
55
- main
66
pull_request:
7-
schedule:
8-
- cron: '0 0 * * 1'
7+
workflow_dispatch:
8+
# schedule:
9+
# - cron: '0 0 * * 1'
910
permissions:
1011
contents: write
1112
pull-requests: write
1213
jobs:
13-
Linux:
14-
runs-on: ubuntu-latest
14+
LinuxNative:
1515
strategy:
1616
matrix:
17-
platform: ['linux/amd64', 'linux/arm64/v8', 'linux/s390x']
17+
runs-on: ['ubuntu-24.04', 'ubuntu-24.04-arm']
18+
version: ['8.1', '8.2', '8.3', '8.4']
19+
type: ['cli', 'zts']
20+
distro: ['bookworm', 'alpine']
21+
runs-on: ${{ matrix.runs-on }}
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
submodules: true
27+
- name: Build container
28+
run: docker compose build --pull --no-cache --build-arg IMAGE="php" --build-arg TAG="${{ matrix.version }}-${{ matrix.type }}-${{ matrix.distro }}"
29+
- name: Test extension with Bundled PHP
30+
run: docker compose run --rm shell pskel test
31+
- name: Test extension with PHP Debug Build
32+
if: matrix.version != '8.1'
33+
run: docker compose run --rm shell pskel test debug
34+
- name: Test extension with Valgrind
35+
if: matrix.version != '8.1'
36+
run: docker compose run --rm shell pskel test valgrind
37+
- name: Test extension with LLVM Sanitizer (MemorySanitizer)
38+
if: matrix.distro != 'alpine' && matrix.version != '8.1'
39+
run: docker compose run --rm shell pskel test msan
40+
- name: Test extension with LLVM Sanitizer (AddressSanitizer)
41+
if: matrix.distro != 'alpine' && matrix.version != '8.1'
42+
run: docker compose run --rm shell pskel test asan
43+
- name: Test extension with LLVM Sanitizer (UndefinedBehaviorSanitizer)
44+
if: matrix.distro != 'alpine' && matrix.version != '8.1'
45+
run: docker compose run --rm shell pskel test ubsan
46+
LinuxQemu:
47+
runs-on: ubuntu-24.04
48+
strategy:
49+
matrix:
50+
platform: ['linux/s390x']
1851
version: ['8.1', '8.2', '8.3', '8.4']
1952
type: ['cli', 'zts']
2053
distro: ['bookworm', 'alpine']
@@ -26,7 +59,8 @@ jobs:
2659
- name: Setup QEMU
2760
uses: docker/setup-qemu-action@v3
2861
with:
29-
platforms: "arm64,s390x"
62+
platforms: "s390x"
63+
cache-image: false
3064
- name: Setup buildx
3165
uses: docker/setup-buildx-action@v3
3266
- name: Build container
@@ -35,60 +69,3 @@ jobs:
3569
- name: Test extension with Bundled PHP
3670
run: |
3771
docker compose run --rm shell pskel test
38-
- name: Test extension with PHP Debug Build
39-
if: matrix.platform == 'linux/amd64'
40-
run: |
41-
docker compose run --rm shell pskel test debug
42-
- name: Test extension with Valgrind
43-
if: matrix.platform == 'linux/amd64'
44-
run: |
45-
docker compose run --rm shell pskel test valgrind
46-
- name: Test extension with LLVM Sanitizer (MemorySanitizer)
47-
if: matrix.platform == 'linux/amd64' && matrix.distro != 'alpine'
48-
run: |
49-
docker compose run --rm shell pskel test msan
50-
- name: Test extension with LLVM Sanitizer (AddressSanitizer)
51-
if: matrix.platform == 'linux/amd64' && matrix.distro != 'alpine'
52-
run: |
53-
docker compose run --rm shell pskel test asan
54-
- name: Test extension with LLVM Sanitizer (UndefinedBehaviorSanitizer)
55-
if: matrix.platform == 'linux/amd64' && matrix.distro != 'alpine'
56-
run: |
57-
docker compose run --rm shell pskel test ubsan
58-
# Windows:
59-
# runs-on: windows-2022
60-
# defaults:
61-
# run:
62-
# shell: cmd
63-
# strategy:
64-
# matrix:
65-
# platform: ["x64"]
66-
# version: ["8.1", "8.2", "8.3"]
67-
# ts: ["nts", "ts"]
68-
# steps:
69-
# - name: Checkout
70-
# uses: actions/checkout@v4
71-
# - name: Setup PHP
72-
# id: setup-php
73-
# uses: php/[email protected]
74-
# with:
75-
# platform: ${{ matrix.platform }}
76-
# version: ${{ matrix.version }}
77-
# ts: ${{ matrix.ts }}
78-
# - name: Enable developer command prompt
79-
# uses: ilammy/msvc-dev-cmd@v1
80-
# with:
81-
# platform: ${{ matrix.platform }}
82-
# toolset: ${{ steps.setup-php.outputs.toolset }}
83-
# - name: phpize
84-
# working-directory: ext
85-
# run: phpize
86-
# - name: configure
87-
# working-directory: ext
88-
# run: configure --enable-SKELETON_NAME --with-prefix=${{ steps.setup-php.outputs.prefix }}
89-
# - name: make
90-
# working-directory: ext
91-
# run: nmake
92-
# - name: test
93-
# working-directory: ext
94-
# run: nmake test TESTS="--show-diff tests"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ RUN docker-php-source extract \
2020
&& update-alternatives --install "/usr/bin/clang" clang "/usr/bin/clang-19" 100 \
2121
&& update-alternatives --install "/usr/bin/clang++" clang++ "/usr/bin/clang++-19" 100; \
2222
else \
23-
apk add --no-cache "bison" "zlib-dev" "sqlite-dev" "libxml2-dev" \
23+
apk add --no-cache "bison" "zlib-dev" "sqlite-dev" "libxml2-dev" "linux-headers" \
2424
"autoconf" "pkgconfig" "make" "gcc" "g++" "valgrind" "valgrind-dev" \
2525
"musl-dev" "rsync" "git" "openssh" \
2626
"patch" "lcov" "gzip" \

0 commit comments

Comments
 (0)