typo
[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 push:
8 pull_request:
9
10 jobs:
11 <?php
12 $gen = include __DIR__ . "/ci/gen-matrix.php";
13 $cur = "8.1";
14 $job = $gen->github([
15 "cur" => [
16 "PHP" => $cur,
17 "enable_debug",
18 "enable_zts",
19 ],
20 "cur-cov" => [
21 "CFLAGS" => "-O0 -g --coverage",
22 "CXXFLAGS" => "-O0 -g --coverage",
23 "PHP" => $cur,
24 ]]);
25 foreach ($job as $id => $env) {
26 printf(" %s:\n", $id);
27 printf(" name: \"%s (%s)\"\n", $id, $env["PHP"]);
28 if ($env["PHP"] == "master") {
29 printf(" continue-on-error: true\n");
30 }
31 printf(" env:\n");
32 foreach ($env as $key => $val) {
33 printf(" %s: \"%s\"\n", $key, $val);
34 }
35 ?>
36 runs-on: ubuntu-20.04
37 steps:
38 - uses: actions/checkout@v2
39 with:
40 submodules: recursive
41 - name: Install
42 run: |
43 sudo apt-get install -y \
44 php-cli \
45 php-pear \
46 re2c
47 - name: Prepare
48 run: |
49 make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
50 - name: Build
51 run: |
52 make -f scripts/ci/Makefile ext PECL=ion || true # no package.xml yet
53 - name: Test
54 run: |
55 make -f scripts/ci/Makefile test
56 <?php if (isset($env["CFLAGS"]) && strpos($env["CFLAGS"], "--coverage") != false) : ?>
57 - name: Coverage
58 if: success()
59 run: |
60 cd .libs
61 bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
62 <?php endif; ?>
63
64 <?php
65 }