File tree Expand file tree Collapse file tree 4 files changed +60
-0
lines changed Expand file tree Collapse file tree 4 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ Makefile
2+ Dockerfile
3+ docker-bake.hcl
4+ tests-docker-output
5+
16* .lo
27* .o
38.deps
Original file line number Diff line number Diff line change @@ -44,3 +44,5 @@ tests/*.mem
4444tmp-php.ini
4545
4646coverage_report /**
47+
48+ tests-docker-output
Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:1
2+
3+ FROM php_specified_version AS build
4+
5+ RUN <<EOF
6+ apt update
7+ apt upgrade -y
8+
9+ apt-get install -y build-essential git libnode-dev
10+
11+ cp -s /usr/lib/`uname -m`-linux-gnu/libv8* /usr/local/lib/
12+ cp -rs /usr/include/node/* /usr/local/include/
13+ EOF
14+
15+ # RUN git clone https://github.com/phpv8/v8js.git --branch php8 /tmp/php-v8js
16+ COPY --from=php-v8js-source-code / /tmp/php-v8js
17+ WORKDIR /tmp/php-v8js
18+
19+ RUN <<EOF
20+ phpize
21+ ./configure
22+ make -j$(nproc)
23+ make test > php$(php -r 'echo PHP_VERSION;' )_$(uname -m)-make_test_std 2>&1 || true
24+ ls php_test_results_*.txt && mv php_test_results_*.txt php$(php -r 'echo PHP_VERSION;' )_$(uname -m)-make_test_report || true
25+ EOF
26+
27+
28+
29+ FROM scratch
30+ COPY --from=build /tmp/php-v8js/*-make_test_* /
Original file line number Diff line number Diff line change 1+ # # Usage:
2+ # docker buildx bake
3+ # PHP_VERSION=8.3 docker buildx bake
4+ # PHP_VERSION=8.2 docker buildx bake
5+ # PHP_VERSION=8.1 docker buildx bake
6+
7+ group "default" {
8+ targets = [" main" ]
9+ platforms = [" linux/amd64" , " linux/arm64" ]
10+ }
11+
12+ variable "PHP_VERSION" {
13+ default = " 8.4"
14+ }
15+
16+ target "main" {
17+ dockerfile = " Dockerfile"
18+ contexts = {
19+ " php_specified_version" = " docker-image://php:${ PHP_VERSION } "
20+ " php-v8js-source-code" = " https://github.com/phpv8/v8js.git#php8"
21+ }
22+ output = [" type=local,dest=tests-docker-output/" ]
23+ }
You can’t perform that action at this time.
0 commit comments