travis -> gh-actions
authorMichael Wallner <mike@php.net>
Thu, 14 Jan 2021 15:03:56 +0000 (16:03 +0100)
committerMichael Wallner <mike@php.net>
Thu, 14 Jan 2021 15:03:56 +0000 (16:03 +0100)
.github/workflows/ci.yml [new file with mode: 0644]
.gitmodules
.travis.yml [deleted file]
scripts/ci [new submodule]
scripts/gen_github_workflow_ci.php [new file with mode: 0755]
scripts/gen_travis_yml.php [deleted file]
travis/pecl [deleted submodule]

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644 (file)
index 0000000..3bd0e91
--- /dev/null
@@ -0,0 +1,380 @@
+# 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: "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
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - 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: "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
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - 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: "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
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - 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: "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
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - 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: "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
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - 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
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - 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
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - 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
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - 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
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - 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
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - 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 01817ad..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# autogenerated file; do not edit
-language: c
-
-addons:
- apt:
-  packages:
-   - php-cli
-   - php-pear
-
-env:
-  - PHP=7.0 enable_debug=yes enable_maintainer_zts=yes
-  - PHP=7.1 enable_debug=yes enable_maintainer_zts=yes
-  - PHP=7.2 enable_debug=yes enable_maintainer_zts=yes
-  - PHP=7.3 enable_debug=yes enable_maintainer_zts=yes
-  - PHP=7.4 enable_debug=yes enable_maintainer_zts=yes
-  - PHP=master enable_debug=yes enable_maintainer_zts=yes
-  - PHP=8.0 enable_debug=no enable_maintainer_zts=no
-  - PHP=8.0 enable_debug=yes enable_maintainer_zts=no
-  - PHP=8.0 enable_debug=no enable_maintainer_zts=yes
-  - PHP=8.0 enable_debug=yes enable_maintainer_zts=yes
-
-matrix:
- fast_finish: true
- allow_failures:
-  - env: PHP=master enable_debug=yes enable_maintainer_zts=yes
-
-before_script:
- - make -f travis/pecl/Makefile php
- - make -f travis/pecl/Makefile ext PECL=raphf
-
-script:
- - make -f travis/pecl/Makefile test
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..cb181b3
--- /dev/null
@@ -0,0 +1,83 @@
+#!/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" => ["7.0", "7.1", "7.2", "7.3", "7.4"],
+       "enable_debug" => "yes",
+       "enable_maintainer_zts" => "yes",
+       "PECLs" => "pecl_http:http:3.2.4",
+], 
+"master" => [
+       "PHP" => "master",
+       "enable_debug" => "yes",
+       "enable_zts" => "yes",
+       "PECLs" => "m6w6/ext-http:http:master",
+],
+"cur-dbg-zts" => [
+       "PHP" => $cur,
+       "enable_debug",
+       "enable_zts",
+       "PECLs" => "pecl_http:http:4.0.0",
+]]);
+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 \
+            libcurl4-openssl-dev \
+            re2c
+      - name: Prepare
+        run: |
+          make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
+          if test -n "$PECLs"; then
+            IFS=$','
+            for pecl in $PECLs; do
+              make -f scripts/ci/Makefile pecl PECL=$pecl
+            done
+            unset IFS
+          fi
+
+      - name: Build
+        run: |
+          make -f scripts/ci/Makefile ext PECL=raphf
+      - 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 src/.libs
+          bash <(curl -s https://codecov.io/bash) -X xcode -X coveragepy
+<?php endif; ?>
+
+<?php
+}
diff --git a/scripts/gen_travis_yml.php b/scripts/gen_travis_yml.php
deleted file mode 100755 (executable)
index c68b396..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env php
-# autogenerated file; do not edit
-language: c
-
-addons:
- apt:
-  packages:
-   - php-cli
-   - php-pear
-
-env:
-<?php
-
-$cur = "8.0";
-$gen = include "./travis/pecl/gen-matrix.php";
-$env = $gen([
-       "PHP" => ["7.0", "7.1", "7.2", "7.3", "7.4", "master"],
-       "enable_debug" => "yes",
-       "enable_maintainer_zts" => "yes",
-], [
-       "PHP" => $cur,
-       "enable_debug",
-       "enable_maintainer_zts"
-]);
-foreach ($env as $grp) {
-       foreach ($grp as $e) {
-               printf("  - %s\n", $e);
-       }
-}
-
-?>
-
-matrix:
- fast_finish: true
- allow_failures:
-<?php
-$allow_failures = array_merge( ... array_map(function($a) {
-       return preg_grep('/^PHP=(master) /', $a);
-}, $env));
-foreach ($allow_failures as $e) {
-       printf("  - env: %s\n", $e);
-}
-?>
-
-before_script:
- - make -f travis/pecl/Makefile php
- - make -f travis/pecl/Makefile ext PECL=raphf
-
-script:
- - make -f travis/pecl/Makefile test
diff --git a/travis/pecl b/travis/pecl
deleted file mode 160000 (submodule)
index 4508f56..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 4508f562f8ef3c07b4490bef0e7563e73ef9a5f0