Skip to content

Commit c274d46

Browse files
committed
[boson] Simplify and optimise CI
1 parent c5ae719 commit c274d46

File tree

2 files changed

+7
-86
lines changed

2 files changed

+7
-86
lines changed

.github/workflows/build-unix.yml

Lines changed: 4 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ on:
99
default: 'linux-x86_64'
1010
type: choice
1111
options:
12-
- 'linux-x86_64'
13-
- 'linux-aarch64'
1412
- 'linux-x86_64-glibc'
1513
- 'linux-aarch64-glibc'
1614
- 'macos-x86_64'
@@ -22,26 +20,14 @@ on:
2220
type: choice
2321
options:
2422
- '8.4'
25-
- '8.3'
26-
- '8.2'
27-
- '8.1'
2823
extensions:
2924
description: Extensions to build (comma separated)
3025
required: true
26+
default: 'ctype,ffi,filter,iconv,opcache,phar,shmop,sockets,zlib'
3127
type: string
3228
extra-libs:
3329
description: Extra libraries to build (optional, comma separated)
3430
type: string
35-
build-cli:
36-
description: Build cli binary
37-
default: true
38-
type: boolean
39-
build-micro:
40-
description: Build phpmicro binary
41-
type: boolean
42-
build-fpm:
43-
description: Build fpm binary
44-
type: boolean
4531
prefer-pre-built:
4632
description: Prefer pre-built binaries (reduce build time)
4733
type: boolean
@@ -68,20 +54,11 @@ on:
6854
extensions:
6955
description: Extensions to build (comma separated)
7056
required: true
57+
default: 'ctype,ffi,filter,iconv,opcache,phar,shmop,sockets,zlib'
7158
type: string
7259
extra-libs:
7360
description: Extra libraries to build (optional, comma separated)
7461
type: string
75-
build-cli:
76-
description: Build cli binary
77-
default: true
78-
type: boolean
79-
build-micro:
80-
description: Build phpmicro binary
81-
type: boolean
82-
build-fpm:
83-
description: Build fpm binary
84-
type: boolean
8562
prefer-pre-built:
8663
description: Prefer pre-built binaries (reduce build time)
8764
type: boolean
@@ -113,16 +90,6 @@ jobs:
11390
id: gendef
11491
run: |
11592
case "${{ inputs.os }}" in
116-
linux-x86_64)
117-
DOWN_CMD="./bin/spc-alpine-docker download"
118-
BUILD_CMD="./bin/spc-alpine-docker build"
119-
RUNS_ON="ubuntu-latest"
120-
;;
121-
linux-aarch64)
122-
DOWN_CMD="./bin/spc-alpine-docker download"
123-
BUILD_CMD="./bin/spc-alpine-docker build"
124-
RUNS_ON="ubuntu-24.04-arm"
125-
;;
12693
linux-x86_64-glibc)
12794
DOWN_CMD="./bin/spc-gnu-docker download"
12895
BUILD_CMD="./bin/spc-gnu-docker build"
@@ -157,15 +124,7 @@ jobs:
157124
if [ ${{ inputs.prefer-pre-built }} == true ]; then
158125
DOWN_CMD="$DOWN_CMD --prefer-pre-built"
159126
fi
160-
if [ ${{ inputs.build-cli }} == true ]; then
161-
BUILD_CMD="$BUILD_CMD --build-cli"
162-
fi
163-
if [ ${{ inputs.build-micro }} == true ]; then
164-
BUILD_CMD="$BUILD_CMD --build-micro"
165-
fi
166-
if [ ${{ inputs.build-fpm }} == true ]; then
167-
BUILD_CMD="$BUILD_CMD --build-fpm"
168-
fi
127+
BUILD_CMD="$BUILD_CMD --build-micro"
169128
echo 'download='"$DOWN_CMD" >> "$GITHUB_OUTPUT"
170129
echo 'build='"$BUILD_CMD" >> "$GITHUB_OUTPUT"
171130
echo 'run='"$RUNS_ON" >> "$GITHUB_OUTPUT"
@@ -202,30 +161,13 @@ jobs:
202161
# if: ${{ failure() }}
203162
# uses: mxschmitt/action-tmate@v3
204163

205-
# Upload cli executable
206-
- if: ${{ inputs.build-cli == true }}
207-
name: "Upload PHP cli SAPI"
208-
uses: actions/upload-artifact@v4
209-
with:
210-
name: php-cli-${{ inputs.php-version }}-${{ inputs.os }}
211-
path: buildroot/bin/php
212-
213164
# Upload micro self-extracted executable
214-
- if: ${{ inputs.build-micro == true }}
215-
name: "Upload PHP micro SAPI"
165+
- name: "Upload PHP micro SAPI"
216166
uses: actions/upload-artifact@v4
217167
with:
218168
name: php-micro-${{ inputs.php-version }}-${{ inputs.os }}
219169
path: buildroot/bin/micro.sfx
220170

221-
# Upload fpm executable
222-
- if: ${{ inputs.build-fpm == true }}
223-
name: "Upload PHP fpm SAPI"
224-
uses: actions/upload-artifact@v4
225-
with:
226-
name: php-fpm-${{ inputs.php-version }}-${{ inputs.os }}
227-
path: buildroot/bin/php-fpm
228-
229171
# Upload extensions metadata
230172
- uses: actions/upload-artifact@v4
231173
name: "Upload License Files"

.github/workflows/build-windows-x86_64.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,10 @@ on:
1010
type: choice
1111
options:
1212
- '8.4'
13-
- '8.3'
14-
- '8.2'
15-
- '8.1'
16-
- '8.0'
17-
build-cli:
18-
description: build cli binary
19-
default: true
20-
type: boolean
21-
build-micro:
22-
description: build phpmicro binary
23-
type: boolean
2413
extensions:
2514
description: extensions to compile (comma separated)
2615
required: true
16+
default: 'ctype,ffi,filter,iconv,opcache,phar,shmop,sockets,zlib'
2717
type: string
2818
prefer-pre-built:
2919
description: prefer pre-built binaries (reduce build time)
@@ -74,10 +64,7 @@ jobs:
7464
run: echo "SPC_PRE_BUILT=--prefer-pre-built" >> $env:GITHUB_ENV
7565

7666
# With target select: cli, micro or both
77-
- if: ${{ inputs.build-cli == true }}
78-
run: echo "SPC_BUILD_CLI=--build-cli" >> $env:GITHUB_ENV
79-
- if: ${{ inputs.build-micro == true }}
80-
run: echo "SPC_BUILD_MICRO=--build-micro" >> $env:GITHUB_ENV
67+
- run: echo "SPC_BUILD_MICRO=--build-micro" >> $env:GITHUB_ENV
8168

8269
- run: ./bin/spc doctor
8370

@@ -88,16 +75,8 @@ jobs:
8875
# Run build command
8976
- run: ./bin/spc build "${{ inputs.extensions }}" ${{ env.SPC_BUILD_DEBUG }} ${{ env.SPC_BUILD_CLI }} ${{ env.SPC_BUILD_MICRO }} ${{ env.SPC_BUILD_FPM }}
9077

91-
# Upload cli executable
92-
- if: ${{ inputs.build-cli == true }}
93-
uses: actions/upload-artifact@v4
94-
with:
95-
name: php-${{ inputs.version }}
96-
path: buildroot/bin/php.exe
97-
9878
# Upload micro self-extracted executable
99-
- if: ${{ inputs.build-micro == true }}
100-
uses: actions/upload-artifact@v4
79+
- uses: actions/upload-artifact@v4
10180
with:
10281
name: micro-${{ inputs.version }}
10382
path: buildroot/bin/micro.sfx

0 commit comments

Comments
 (0)