-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
101 lines (76 loc) · 2.82 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
pwd := $(shell pwd)
composer := ./composer
.PHONY: \
phpcs \
phpcs-check \
phpstan \
clean \
docker-bash \
use-uopz \
use-runkit \
test \
test-uopz \
test-runkit \
ci-php-7.3-runkit-4.0.0a6 \
ci-php-7.3-runkit-3.0.0 \
ci-php-7.3-runkit-2.1.0 \
ci-php-7.3-runkit-1.0.11 \
ci-php-7.4-runkit-4.0.0a6 \
ci-php-8.0-runkit-4.0.0a6 \
ci-php-8.1-runkit-4.0.0a6 \
ci-php-7.3-uopz-6.1.2 \
ci-php-7.4-uopz-6.1.2 \
ci-php-8.0-uopz \
ci-php-8.1-uopz
$(composer):
curl -Ls https://raw.githubusercontent.com/tototoshi/composerx/main/composer > $(composer) && chmod +x $(composer)
clean:
rm -rf vendor/
$(composer) clear-cache
tools/php-cs-fixer/vendor/bin/php-cs-fixer:
mkdir -p tools/php-cs-fixer
$(composer) require --dev --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer
phpcs: tools/php-cs-fixer/vendor/bin/php-cs-fixer
./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix src
./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix test
phpcs-check: tools/php-cs-fixer/vendor/bin/php-cs-fixer
./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run src
./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run test
tools/phpstan/vendor/bin/phpstan:
mkdir -p tools/phpstan
$(composer) require --dev --working-dir=tools/phpstan phpstan/phpstan
phpstan: tools/phpstan/vendor/bin/phpstan
./tools/phpstan/vendor/bin/phpstan analyse src test
docker-bash:
docker build -t staticmock-dev -f Dockerfile .
docker run -it --rm -v $(pwd):$(pwd) -w $(pwd) staticmock-dev bash
use-uopz:
echo "extension=uopz.so" > $(PHP_INI_DIR)/conf.d/staticmock.ini
use-runkit7:
echo "extension=runkit7.so" > $(PHP_INI_DIR)/conf.d/staticmock.ini
test:
$(composer) exec phpunit test
test-uopz: use-uopz test
test-runkit7: use-runkit7 test
ci-php-7.3-runkit-4.0.0a6:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) php:7.3 ./ci/test-runkit.sh 4.0.0a6
ci-php-7.3-runkit-3.0.0:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) php:7.3 ./ci/test-runkit.sh 3.0.0
ci-php-7.3-runkit-2.1.0:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) php:7.3 ./ci/test-runkit.sh 2.1.0
ci-php-7.3-runkit-1.0.11:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) php:7.3 ./ci/test-runkit.sh 1.0.11
ci-php-7.4-runkit-4.0.0a6:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) php:7.4 ./ci/test-runkit.sh 4.0.0a6
ci-php-8.0-runkit-4.0.0a6:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) php:8.0 ./ci/test-runkit.sh 4.0.0a6
ci-php-8.1-runkit-4.0.0a6:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) php:8.1 ./ci/test-runkit.sh 4.0.0a6
ci-php-7.3-uopz-6.1.2:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) php:7.3 ./ci/test-uopz.sh 6.1.2
ci-php-7.4-uopz-6.1.2:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) php:7.4 ./ci/test-uopz.sh 6.1.2
ci-php-8.0-uopz:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) php:8.0 ./ci/test-uopz-master.sh
ci-php-8.1-uopz:
docker run --rm -v $(pwd):$(pwd) -w $(pwd) php:8.1 ./ci/test-uopz-master.sh