travis -> gh-actions
authorMichael Wallner <mike@php.net>
Fri, 15 Jan 2021 09:26:19 +0000 (10:26 +0100)
committerMichael Wallner <mike@php.net>
Fri, 15 Jan 2021 09:26:19 +0000 (10:26 +0100)
.github/workflows/ci.yml [new file with mode: 0644]
.gitmodules
.travis.yml [deleted file]
README.md
gen_travis_yml.php [deleted file]
scripts/ci [new submodule]
scripts/gen_github_workflow_ci.php [new file with mode: 0755]
travis/pecl [deleted submodule]

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644 (file)
index 0000000..1b1d5fa
--- /dev/null
@@ -0,0 +1,390 @@
+# generated file; do not edit!
+
+name: ci
+on:
+  workflow_dispatch:
+  push:
+  pull_request:
+
+jobs:
+  old-matrix-0:
+    name: old-matrix-0
+    env:
+      PHP: "7.0"
+      enable_debug: "yes"
+      enable_maintainer_zts: "yes"
+      PECLs: "propro,pecl_http:http:3.2.4"
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - name: Prepare Test
+        run: |
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
+  old-matrix-1:
+    name: old-matrix-1
+    env:
+      PHP: "7.1"
+      enable_debug: "yes"
+      enable_maintainer_zts: "yes"
+      PECLs: "propro,pecl_http:http:3.2.4"
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - name: Prepare Test
+        run: |
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
+  old-matrix-2:
+    name: old-matrix-2
+    env:
+      PHP: "7.2"
+      enable_debug: "yes"
+      enable_maintainer_zts: "yes"
+      PECLs: "propro,pecl_http:http:3.2.4"
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - name: Prepare Test
+        run: |
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
+  old-matrix-3:
+    name: old-matrix-3
+    env:
+      PHP: "7.3"
+      enable_debug: "yes"
+      enable_maintainer_zts: "yes"
+      PECLs: "propro,pecl_http:http:3.2.4"
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - name: Prepare Test
+        run: |
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
+  old-matrix-4:
+    name: old-matrix-4
+    env:
+      PHP: "7.4"
+      enable_debug: "yes"
+      enable_maintainer_zts: "yes"
+      PECLs: "propro,pecl_http:http:3.2.4"
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - name: Prepare Test
+        run: |
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
+  master-0:
+    name: master-0
+    continue-on-error: true
+    env:
+      PHP: "master"
+      enable_debug: "yes"
+      enable_zts: "yes"
+      PECLs: "m6w6/ext-http:http:master"
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - name: Prepare Test
+        run: |
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
+  cur-dbg-zts-0:
+    name: cur-dbg-zts-0
+    env:
+      PHP: "8.0"
+      enable_debug: "yes"
+      enable_zts: "yes"
+      PECLs: "pecl_http:http:4.0.0"
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - name: Prepare Test
+        run: |
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
+  cur-dbg-zts-1:
+    name: cur-dbg-zts-1
+    env:
+      PHP: "8.0"
+      enable_debug: "no"
+      enable_zts: "yes"
+      PECLs: "pecl_http:http:4.0.0"
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - name: Prepare Test
+        run: |
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
+  cur-dbg-zts-2:
+    name: cur-dbg-zts-2
+    env:
+      PHP: "8.0"
+      enable_debug: "yes"
+      enable_zts: "no"
+      PECLs: "pecl_http:http:4.0.0"
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - name: Prepare Test
+        run: |
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
+  cur-dbg-zts-3:
+    name: cur-dbg-zts-3
+    env:
+      PHP: "8.0"
+      enable_debug: "no"
+      enable_zts: "no"
+      PECLs: "pecl_http:http:4.0.0"
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            libcurl4-openssl-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - name: Prepare Test
+        run: |
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+
index e53f88c8d93cfb1c4195f5dd3a14376171acb2b4..72fd52f1e1a07f3d22140bf70a526cdf31e361f9 100644 (file)
@@ -1,4 +1,3 @@
-[submodule "travis-pecl"]
-       path = travis/pecl
-       url = https://github.com/m6w6/travis-pecl.git
-       branch = master
+[submodule "scripts/ci"]
+       path = scripts/ci
+       url = https://github.com/m6w6/pecl-ci.git
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644 (file)
index 7b4e48a..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-# autogenerated file; do not edit
-language: c
-
-addons:
- apt:
-  packages:
-   - php-cli
-   - php-pear
-   - valgrind
-
-env:
- matrix:
-  - PHP=5.6 enable_debug=yes enable_maintainer_zts=yes enable_json=yes
-  - PHP=7.0 enable_debug=yes enable_maintainer_zts=yes enable_json=yes
-  - PHP=7.1 enable_debug=yes enable_maintainer_zts=yes enable_json=yes
-  - PHP=7.2 enable_debug=yes enable_maintainer_zts=yes enable_json=yes
-  - PHP=7.3 enable_debug=yes enable_maintainer_zts=yes enable_json=yes
-  - PHP=7.4 enable_debug=yes enable_maintainer_zts=yes enable_json=yes
-  - PHP=master enable_debug=yes enable_maintainer_zts=yes enable_json=yes
-  - PHP=8.0 enable_debug=no enable_maintainer_zts=no enable_json=yes
-  - PHP=8.0 enable_debug=yes enable_maintainer_zts=no enable_json=yes
-  - PHP=8.0 enable_debug=no enable_maintainer_zts=yes enable_json=yes
-  - PHP=8.0 enable_debug=yes enable_maintainer_zts=yes enable_json=yes
-  - CFLAGS='-O0 -g --coverage' CXXFLAGS='-O0 -g --coverage' PHP=8.0 enable_json=yes
-
-cache:
- directories:
-  - $HOME/cache
-
-before_cache:
- - find $HOME/cache -name '*.gcda' -o -name '*.gcno' -delete
-
-install:
- - make -f travis/pecl/Makefile php
-
-script:
- - make -f travis/pecl/Makefile ext PECL=json_post
- - make -f travis/pecl/Makefile test
-
-after_success:
- - test -n "$CFLAGS" && cd .libs && bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
index 689ee8c2a49c56c636f310c51cf867eab9abc072..bb0304aed02786614fab169bc80256426384f0fb 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
 # ext-json_post
 
-[![Build Status](https://travis-ci.org/m6w6/ext-json_post.svg?branch=master)](https://travis-ci.org/m6w6/ext-json_post)
+[![Build Status](https://github.com/m6w6/ext-json_post/workflows/ci/badge.svg?branch=master)](https://github.com/m6w6/ext-json_post/actions?query=branch%3Amaster+workflow%3Aci)
+[![codecov](https://codecov.io/gh/m6w6/ext-json_post/branch/master/graph/badge.svg?token=Nku9tz8EMj)](https://codecov.io/gh/m6w6/ext-json_post)
 
 JSON POST handler 
 
@@ -8,7 +9,7 @@ JSON POST handler
 
 See the [online markdown reference](https://mdref.m6w6.name/json_post).
 
-## Installing
+## Install
 
 ### PECL
 
diff --git a/gen_travis_yml.php b/gen_travis_yml.php
deleted file mode 100755 (executable)
index ba9d41d..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env php
-# autogenerated file; do not edit
-language: c
-
-addons:
- apt:
-  packages:
-   - php-cli
-   - php-pear
-   - valgrind
-
-env:
- matrix:
-<?php
-
-$cur = "8.0";
-$gen = include "./travis/pecl/gen-matrix.php";
-$env = $gen([
-       "PHP" => ["5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "master"],
-       "enable_debug" => "yes",
-       "enable_maintainer_zts" => "yes",
-       "enable_json" => "yes"
-], [
-       "PHP" => $cur,
-       "enable_debug",
-       "enable_maintainer_zts",
-       "enable_json" => "yes"
-], [
-       "CFLAGS" => "'-O0 -g --coverage'",
-       "CXXFLAGS" => "'-O0 -g --coverage'",
-       "PHP" => $cur,
-       "enable_json" => "yes"
-]);
-foreach ($env as $grp) {
-       foreach ($grp as $e) {
-               printf("  - %s\n", $e);
-       }
-}
-
-?>
-
-cache:
- directories:
-  - $HOME/cache
-
-before_cache:
- - find $HOME/cache -name '*.gcda' -o -name '*.gcno' -delete
-
-install:
- - make -f travis/pecl/Makefile php
-
-script:
- - make -f travis/pecl/Makefile ext PECL=json_post
- - make -f travis/pecl/Makefile test
-
-after_success:
- - test -n "$CFLAGS" && cd .libs && bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
diff --git a/scripts/ci b/scripts/ci
new file mode 160000 (submodule)
index 0000000..547c8e8
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 547c8e89e38d6e899914c05ddf6598669bd16532
diff --git a/scripts/gen_github_workflow_ci.php b/scripts/gen_github_workflow_ci.php
new file mode 100755 (executable)
index 0000000..3c7761b
--- /dev/null
@@ -0,0 +1,76 @@
+#!/usr/bin/env php
+<?php echo "# generated file; do not edit!\n"; ?>
+
+name: ci
+on:
+  workflow_dispatch:
+  push:
+  pull_request:
+
+jobs:
+<?php
+
+$cur = "8.0";
+$gen = include __DIR__ . "/ci/gen-matrix.php";
+$job = $gen->github([
+"old-matrix" => [
+       "PHP" => ["5.6", "7.0", "7.1", "7.2", "7.3", "7.4"],
+       "enable_debug" => "yes",
+       "enable_maintainer_zts" => "yes",
+], 
+"master" => [
+       "PHP" => "master",
+       "enable_debug" => "yes",
+       "enable_zts" => "yes",
+],
+"cur-dbg-zts" => [
+       "PHP" => $cur,
+       "enable_debug",
+       "enable_zts",
+],
+"cur-cov" => [
+       "CFLAGS" => "-O0 -g --coverage",
+       "CXXFLAGS" => "-O0 -g --coverage",
+       "PHP" => $cur,
+]]);
+foreach ($job as $id => $env) {
+    printf("  %s:\n", $id);
+    printf("    name: %s\n", $id);
+    if ($env["PHP"] == "master") {
+        printf("    continue-on-error: true\n");
+    }
+    printf("    env:\n");
+    foreach ($env as $key => $val) {
+        printf("      %s: \"%s\"\n", $key, $val);
+    }
+?>
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Install
+        run: |
+          sudo apt-get install -y \
+            php-cli \
+            php-pear \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=json_post
+      - name: Test
+        run: |
+          make -f scripts/ci/Makefile test
+<?php if (isset($env["CFLAGS"]) && strpos($env["CFLAGS"], "--coverage") != false) : ?>
+      - name: Coverage
+        if: success()
+        run: |
+          cd .libs
+          bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
+<?php endif; ?>
+
+<?php
+}
diff --git a/travis/pecl b/travis/pecl
deleted file mode 160000 (submodule)
index 4508f56..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4508f562f8ef3c07b4490bef0e7563e73ef9a5f0