fix #6: compatibility with 8.2
[awesomized/ext-ion] / scripts / gen_github_workflow_ci.php
1 #!/usr/bin/env php
2 <?php echo "# generated file; do not edit!\n"; ?>
3
4 name: ci
5 on:
6 workflow_dispatch:
7 release:
8 types: [published]
9 pull_request:
10 paths-ignore:
11 - .dockerignore
12 - .editorconfig
13 - .gitignore
14 - AUTHORS
15 - CONTRIBUTING.md
16 - CREDITS
17 - Dockerfile
18 - 'docs/**'
19 - EXPERIMENTAL
20 - gen_stub.php*.diff
21 - LICENSE
22 - README.md
23 push:
24 paths-ignore:
25 - .dockerignore
26 - .editorconfig
27 - .gitignore
28 - AUTHORS
29 - CONTRIBUTING.md
30 - CREDITS
31 - Dockerfile
32 - 'docs/**'
33 - EXPERIMENTAL
34 - gen_stub.php*.diff
35 - LICENSE
36 - README.md
37
38 jobs:
39 <?php
40 $gen = include __DIR__ . "/ci/gen-matrix.php";
41 $cur = "8.1";
42 $job = $gen->github([
43 "cur" => [
44 "PHP" => $cur,
45 "enable_intl" => "yes",
46 "enable_debug",
47 "enable_zts",
48 ],
49 "cur-cov" => [
50 "CFLAGS" => "-O0 -g --coverage",
51 "CXXFLAGS" => "-O0 -g --coverage",
52 "PHP" => $cur,
53 "enable_intl" => "yes",
54 ]]);
55 foreach ($job as $id => $env) {
56 printf(" %s:\n", $id);
57 printf(" name: \"%s (%s)\"\n", $id, $env["PHP"]);
58 if ($env["PHP"] == "master") {
59 printf(" continue-on-error: true\n");
60 }
61 printf(" env:\n");
62 foreach ($env as $key => $val) {
63 printf(" %s: \"%s\"\n", $key, $val);
64 }
65 ?>
66 runs-on: ubuntu-20.04
67 steps:
68 - uses: actions/checkout@v2
69 with:
70 submodules: recursive
71 - name: Install
72 run: |
73 sudo apt-get install -y \
74 php-cli \
75 php-pear \
76 re2c
77 - name: Prepare
78 run: |
79 make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
80 - name: Build
81 run: |
82 make -f scripts/ci/Makefile ext PECL=ion || true # no package.xml yet
83 - name: Test
84 run: |
85 make -f scripts/ci/Makefile test
86 <?php if (isset($env["CFLAGS"]) && strpos($env["CFLAGS"], "--coverage") != false) : ?>
87 - name: Coverage
88 if: success()
89 run: |
90 find . -name '*.gc*'
91 cd .libs
92 bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
93 <?php endif; ?>
94
95 <?php
96 }