-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
81 lines (76 loc) · 4.35 KB
/
Makefile
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
PHP_MAKEFILE = Makefile-php
COMMIT=develop
REPO_PREFIX=elifesciences/
# these targets will build the php versions for your current platform and store them in the local docker
# pushing isn't provided, as we want to push multi-arch manifests to the tags
build-php: build-php-7.1 build-php-7.2 build-php-7.3 build-php-7.4 build-php-8.0 build-php-8.1 build-php-8.2 build-php-8.3 build-php-8.4
build-php-7.1:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.1 build
build-php-7.2:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.2 build
build-php-7.3:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.3 build
build-php-7.4:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.4 build
build-php-8.0:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.0 build
build-php-8.1:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.1 build
build-php-8.2: build-php-8.2
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.2 build
build-php-8.3: build-php-8.3
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.3 build
build-php-8.4: build-php-8.4
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.4 build
# run the baseline tests that the images run
test-php: test-php-7.1 test-php-7.2 test-php-7.3 test-php-7.4 test-php-8.0 test-php-8.1 test-php-8.2 test-php-8.3 test-php-8.4
test-php-7.1:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.1 test
test-php-7.2:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.2 test
test-php-7.3:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.3 test
test-php-7.4:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.4 test
test-php-8.0:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.0 test
test-php-8.1:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.1 test
test-php-8.2:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.2 test
test-php-8.3:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.3 test
test-php-8.4:
@$(MAKE) -f $(PHP_MAKEFILE) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.4 test
# build and test targets
build-and-test-php: build-and-test-php-7.1 build-and-test-php-7.2 build-and-test-php-7.3 build-and-test-php-7.4 build-and-test-php-8.0 build-and-test-php-8.1 build-and-test-php-8.2 build-and-test-php-8.3 build-and-test-php-8.4
build-and-test-php-7.1: build-php-7.1 test-php-7.1
build-and-test-php-7.2: build-php-7.2 test-php-7.2
build-and-test-php-7.3: build-php-7.3 test-php-7.3
build-and-test-php-7.4: build-php-7.4 test-php-7.4
build-and-test-php-8.0: build-php-8.0 test-php-8.0
build-and-test-php-8.1: build-php-8.1 test-php-8.1
build-and-test-php-8.2: build-php-8.2 test-php-8.2
build-and-test-php-8.3: build-php-8.3 test-php-8.3
build-and-test-php-8.4: build-php-8.4 test-php-8.4
# these targets utilise docker buildx to build multi-arch images,
# and push to docker hub (as local docker can't store multi-arch image manifest)
buildx-and-push-php: buildx-and-push-php-7.1 buildx-and-push-php-7.2 buildx-and-push-php-7.3 buildx-and-push-php-7.4 buildx-and-push-php-8.0 buildx-and-push-php-8.1 buildx-and-push-php-8.2 buildx-and-push-php-8.3 buildx-and-push-php-8.4
buildx-and-push-php-7.1:
@$(MAKE) -f $(PHP_MAKEFILE) COMMIT=$(COMMIT) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.1 buildx
buildx-and-push-php-7.2:
@$(MAKE) -f $(PHP_MAKEFILE) COMMIT=$(COMMIT) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.2 buildx
buildx-and-push-php-7.3:
@$(MAKE) -f $(PHP_MAKEFILE) COMMIT=$(COMMIT) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.3 buildx
buildx-and-push-php-7.4:
@$(MAKE) -f $(PHP_MAKEFILE) COMMIT=$(COMMIT) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=7.4 buildx
buildx-and-push-php-8.0:
@$(MAKE) -f $(PHP_MAKEFILE) COMMIT=$(COMMIT) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.0 buildx
buildx-and-push-php-8.1:
@$(MAKE) -f $(PHP_MAKEFILE) COMMIT=$(COMMIT) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.1 buildx
buildx-and-push-php-8.2:
@$(MAKE) -f $(PHP_MAKEFILE) COMMIT=$(COMMIT) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.2 buildx
buildx-and-push-php-8.3:
@$(MAKE) -f $(PHP_MAKEFILE) COMMIT=$(COMMIT) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.3 buildx
buildx-and-push-php-8.4:
@$(MAKE) -f $(PHP_MAKEFILE) COMMIT=$(COMMIT) REPO_PREFIX=$(REPO_PREFIX) PHP_VERSION=8.4 buildx