-
Notifications
You must be signed in to change notification settings - Fork 5
145 lines (125 loc) · 5.69 KB
/
build.yml
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Build extensions
on:
push:
branches:
- main
jobs:
build:
name: Build and deploy
runs-on: ubuntu-latest
timeout-minutes: 20
env:
S3_BUCKET: heroku-php-extensions
BUILDPACK: ./vendor/heroku/heroku-buildpack-php
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
strategy:
matrix:
stack:
- heroku-20
- heroku-22
series:
- 20180731 # PHP 7.3
- 20190902 # PHP 7.4
- 20200930 # PHP 8.0
- 20210902 # PHP 8.1
- 20220829 # PHP 8.2
- 20230831 # PHP 8.3
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Composer Install
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
run: composer install --prefer-dist --no-progress --no-suggest --ignore-platform-reqs
- name: Copy requirements
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
run: cp ${BUILDPACK}/requirements.txt .
- name: Build Dockerfile
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
run: |
cat ${BUILDPACK}/support/build/_docker/${{ matrix.stack }}.Dockerfile > docker/build/${{ matrix.stack }}.Dockerfile
cat docker/${{ matrix.stack }}.Dockerfile >> docker/build/${{ matrix.stack }}.Dockerfile
- name: Docker build
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
run: docker build --pull --tag ${{ matrix.stack }} --file docker/build/${{ matrix.stack }}.Dockerfile .
- name: Build liblzf library
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
shell: 'script -q -e -c "bash {0}"'
run: |
docker run --rm -ti \
--env-file=${BUILDPACK}/support/build/_docker/env.default \
${{ matrix.stack }} deploy.sh --overwrite libraries/liblzf-3.6
- name: Build lz4 library
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
shell: 'script -q -e -c "bash {0}"'
run: |
docker run --rm -ti \
--env-file=${BUILDPACK}/support/build/_docker/env.default \
${{ matrix.stack }} deploy.sh --overwrite libraries/lz4-1.9.3
- name: Build zstd library
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
shell: 'script -q -e -c "bash {0}"'
run: |
docker run --rm -ti \
--env-file=${BUILDPACK}/support/build/_docker/env.default \
${{ matrix.stack }} deploy.sh --overwrite libraries/zstd-1.4.9
- name: Build igbinary extension
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
shell: 'script -q -e -c "bash {0}"'
run: |
docker run --rm -ti \
--env UPSTREAM_S3_BUCKET=lang-php \
--env UPSTREAM_S3_PREFIX=dist-${{ matrix.stack }}-stable/ \
--env-file=${BUILDPACK}/support/build/_docker/env.default \
${{ matrix.stack }} deploy.sh --overwrite \
extensions/no-debug-non-zts-${{ matrix.series }}/igbinary-3.2.15
- name: Build msgpack extension
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
shell: 'script -q -e -c "bash {0}"'
run: |
docker run --rm -ti \
--env UPSTREAM_S3_BUCKET=lang-php \
--env UPSTREAM_S3_PREFIX=dist-${{ matrix.stack }}-stable/ \
--env-file=${BUILDPACK}/support/build/_docker/env.default \
${{ matrix.stack }} deploy.sh --overwrite \
extensions/no-debug-non-zts-${{ matrix.series }}/msgpack-2.2.0
- name: Build redis extension
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
shell: 'script -q -e -c "bash {0}"'
run: |
docker run --rm -ti \
--env UPSTREAM_S3_BUCKET=lang-php \
--env UPSTREAM_S3_PREFIX=dist-${{ matrix.stack }}-stable/ \
--env-file=${BUILDPACK}/support/build/_docker/env.default \
${{ matrix.stack }} deploy.sh --overwrite \
extensions/no-debug-non-zts-${{ matrix.series }}/redis-6.0.2
- name: Build relay extension
if: matrix.series != 20180731 && (matrix.stack != 'heroku-22' || matrix.series >= 20210902)
shell: 'script -q -e -c "bash {0}"'
run: |
docker run --rm -ti \
--env UPSTREAM_S3_BUCKET=lang-php \
--env UPSTREAM_S3_PREFIX=dist-${{ matrix.stack }}-stable/ \
--env-file=${BUILDPACK}/support/build/_docker/env.default \
${{ matrix.stack }} deploy.sh --overwrite \
extensions/no-debug-non-zts-${{ matrix.series }}/relay-0.6.8
- name: Build swoole extension
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
shell: 'script -q -e -c "bash {0}"'
run: |
docker run --rm -ti \
--env UPSTREAM_S3_BUCKET=lang-php \
--env UPSTREAM_S3_PREFIX=dist-${{ matrix.stack }}-stable/ \
--env-file=${BUILDPACK}/support/build/_docker/env.default \
${{ matrix.stack }} deploy.sh --overwrite \
extensions/no-debug-non-zts-${{ matrix.series }}/swoole-4.8.13
- name: Build openswoole extension
if: matrix.stack != 'heroku-22' || matrix.series >= 20210902
shell: 'script -q -e -c "bash {0}"'
run: |
docker run --rm -ti \
--env UPSTREAM_S3_BUCKET=lang-php \
--env UPSTREAM_S3_PREFIX=dist-${{ matrix.stack }}-stable/ \
--env-file=${BUILDPACK}/support/build/_docker/env.default \
${{ matrix.stack }} deploy.sh --overwrite \
extensions/no-debug-non-zts-${{ matrix.series }}/openswoole-4.12.1