Skip to content

Commit d602975

Browse files
committed
ci: Split out PHP branch
1 parent 6a926ec commit d602975

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

.github/workflows/build.yaml

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,19 @@ on:
99

1010
jobs:
1111
build:
12-
name: 'PHP ${{ matrix.php.major }}.${{ matrix.php.minor }}'
12+
name: 'PHP ${{ matrix.php.branch }}'
1313
runs-on: ubuntu-20.04
1414
strategy:
1515
matrix:
1616
php:
17-
- major: 8
18-
minor: 1
19-
- major: 8
20-
minor: 0
21-
- major: 7
22-
minor: 4
23-
- major: 7
24-
minor: 3
25-
- major: 7
26-
minor: 2
27-
- major: 7
28-
minor: 1
29-
- major: 7
30-
minor: 0
31-
- major: 5
32-
minor: 6
17+
- branch: '8.1'
18+
- branch: '8.0'
19+
- branch: '7.4'
20+
- branch: '7.3'
21+
- branch: '7.2'
22+
- branch: '7.1'
23+
- branch: '7.0'
24+
- branch: '5.6'
3325
# We want to fix failures individually.
3426
fail-fast: false
3527
steps:
@@ -44,34 +36,44 @@ jobs:
4436
name: fossar
4537
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
4638

39+
- name: Set job parameters
40+
id: params
41+
run: |
42+
branch=${{ matrix.php.branch }}
43+
major=${branch%%.*}
44+
minor=${branch#*.}
45+
attr=php$major$minor
46+
echo "::set-output name=major::$major"
47+
echo "::set-output name=attr::$attr"
48+
4749
- name: Build PHP
48-
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-php
50+
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-php
4951

5052
- name: Build Imagick extension
51-
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-imagick
53+
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-imagick
5254

5355
- name: Build Redis extension
54-
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-redis
56+
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-redis
5557

5658
- name: Build Redis 3 extension
57-
if: ${{ matrix.php.major < 8 }}
58-
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-redis3
59+
if: ${{ steps.params.outputs.major < 8 }}
60+
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-redis3
5961

6062
- name: Build MySQL extension
61-
if: ${{ matrix.php.major < 7 }}
62-
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-mysql
63+
if: ${{ steps.params.outputs.major < 7 }}
64+
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-mysql
6365

6466
- name: Build Xdebug extension
65-
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-xdebug
67+
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-xdebug
6668

6769
- name: Build Tidy extension
68-
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-tidy
70+
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-tidy
6971

7072
- name: Check that composer PHAR works
71-
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-composer-phar
73+
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-composer-phar
7274

7375
- name: Validate php.extensions.mysqli default unix socket path
74-
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-mysqli-socket-path
76+
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-mysqli-socket-path
7577

7678
- name: Validate php.extensions.pdo_mysql default unix socket path
77-
run: nix-build -A outputs.checks.x86_64-linux.php${{ matrix.php.major }}${{ matrix.php.minor }}-pdo_mysql-socket-path
79+
run: nix-build -A outputs.checks.x86_64-linux.${{ steps.params.outputs.attr }}-pdo_mysql-socket-path

0 commit comments

Comments
 (0)