From 26f13f56f13716d3d242ee4ea261a3e45b6ec1a4 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 15:43:42 +0800 Subject: [PATCH 01/15] CI adjustment --- .github/workflows/main-ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 90a692ac..815b0be1 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -1,14 +1,20 @@ name: CI -on: [push, pull_request] +on: + push: + branches: '**' + tags: '**' + pull_request: + schedule: + - cron: '0 0 * * 0' jobs: build: runs-on: ubuntu-latest strategy: matrix: - php_version: ["7.1", "7.2", "7.3", "7.4", "8.0"] - service: [php-fpm, php-worker, workspace, laravel-horizon] + php_version: ["7.2", "7.3", "7.4", "8.0"] + service: [php-fpm, php-worker, workspace, laravel-horizon, 'nginx redis'] steps: - uses: actions/checkout@v2 - name: Build the Docker image From 1ea4bfbd18bef39adfcf79a08af66bed36a16947 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 16:18:21 +0800 Subject: [PATCH 02/15] Update main-ci.yml php-fpm install ext --- .github/workflows/main-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 815b0be1..8cbd87e9 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: php_version: ["7.2", "7.3", "7.4", "8.0"] - service: [php-fpm, php-worker, workspace, laravel-horizon, 'nginx redis'] + service: [php-fpm, php-worker, workspace, laravel-horizon, 'nginx redis mysql mariadb percona minio mongo'] steps: - uses: actions/checkout@v2 - name: Build the Docker image @@ -22,4 +22,5 @@ jobs: PHP_VERSION: ${{ matrix.php_version }} run: | cp env-example .env + sed -i -- '201,272s/=false/=true/g' .env docker-compose build ${{ matrix.service }} From ed60170e6ed70a30f813b4f1ef1468334cbe55dd Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 16:28:07 +0800 Subject: [PATCH 03/15] Update main-ci.yml CI avoid CHANGE_SOURCE=true --- .github/workflows/main-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 8cbd87e9..531c3231 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -23,4 +23,5 @@ jobs: run: | cp env-example .env sed -i -- '201,272s/=false/=true/g' .env + sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env docker-compose build ${{ matrix.service }} From e494f0b863df0896529bcdb9ea2b413ff261cb84 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 18:30:57 +0800 Subject: [PATCH 04/15] skip PHPDBG --- .github/workflows/main-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 531c3231..8b734ba8 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -24,4 +24,5 @@ jobs: cp env-example .env sed -i -- '201,272s/=false/=true/g' .env sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env + sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env docker-compose build ${{ matrix.service }} From be587e8cc647f3c1ed49e8032871701f833f97bc Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 15:43:42 +0800 Subject: [PATCH 05/15] CI adjustment --- .github/workflows/main-ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 90a692ac..815b0be1 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -1,14 +1,20 @@ name: CI -on: [push, pull_request] +on: + push: + branches: '**' + tags: '**' + pull_request: + schedule: + - cron: '0 0 * * 0' jobs: build: runs-on: ubuntu-latest strategy: matrix: - php_version: ["7.1", "7.2", "7.3", "7.4", "8.0"] - service: [php-fpm, php-worker, workspace, laravel-horizon] + php_version: ["7.2", "7.3", "7.4", "8.0"] + service: [php-fpm, php-worker, workspace, laravel-horizon, 'nginx redis'] steps: - uses: actions/checkout@v2 - name: Build the Docker image From e9ffee151cf02e47a4d9ab27fcff42703d1933fb Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 16:18:21 +0800 Subject: [PATCH 06/15] Update main-ci.yml php-fpm install ext --- .github/workflows/main-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 815b0be1..8cbd87e9 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: php_version: ["7.2", "7.3", "7.4", "8.0"] - service: [php-fpm, php-worker, workspace, laravel-horizon, 'nginx redis'] + service: [php-fpm, php-worker, workspace, laravel-horizon, 'nginx redis mysql mariadb percona minio mongo'] steps: - uses: actions/checkout@v2 - name: Build the Docker image @@ -22,4 +22,5 @@ jobs: PHP_VERSION: ${{ matrix.php_version }} run: | cp env-example .env + sed -i -- '201,272s/=false/=true/g' .env docker-compose build ${{ matrix.service }} From 825a0660ed66bac802b389189e68aaef9b9c9f6f Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 16:28:07 +0800 Subject: [PATCH 07/15] Update main-ci.yml CI avoid CHANGE_SOURCE=true --- .github/workflows/main-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 8cbd87e9..531c3231 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -23,4 +23,5 @@ jobs: run: | cp env-example .env sed -i -- '201,272s/=false/=true/g' .env + sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env docker-compose build ${{ matrix.service }} From d03e7c7f700db1d4d9aeefdf41b7bbddc59c79ab Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 18:30:57 +0800 Subject: [PATCH 08/15] skip PHPDBG --- .github/workflows/main-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 531c3231..8b734ba8 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -24,4 +24,5 @@ jobs: cp env-example .env sed -i -- '201,272s/=false/=true/g' .env sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env + sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env docker-compose build ${{ matrix.service }} From d3c5b93b7caade27f8c6e15bd337939dcab25381 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 21:52:36 +0800 Subject: [PATCH 09/15] PHP 8.0 php-fpm swoole --- php-fpm/Dockerfile | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index e199744e..4f1fdbac 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -285,24 +285,21 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ ########################################################################### ARG INSTALL_SWOOLE=false -RUN if [ ${INSTALL_SWOOLE} = true ]; then \ - # Install Php Swoole Extension - if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - pecl -q install swoole-2.0.11; \ - else \ - if [ $(php -r "echo PHP_MINOR_VERSION;") = "0" ]; then \ - echo '' | pecl install swoole-4.3.5; \ +RUN set -eux; \ + if [ ${INSTALL_SWOOLE} = true ]; then \ + # Install Php Swoole Extension + if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "50600" ]; then \ + pecl install swoole-2.0.11; \ + elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70000" ]; then \ + pecl install swoole-4.3.5; \ + elif [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "70100" ]; then \ + pecl install swoole-4.6.0; \ else \ - if [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ]; then \ - echo '' | pecl install swoole-4.6.0; \ - else \ - echo '' | pecl install swoole; \ - fi \ - fi \ - fi && \ - docker-php-ext-enable swoole \ - && php -m | grep -q 'swoole' \ -;fi + pecl install swoole; \ + fi; \ + docker-php-ext-enable swoole; \ + php -m | grep -q 'swoole'; \ + fi ########################################################################### # Taint EXTENSION From e34e914d56e36817306e86f2e6f38bf85e3121c3 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 15:43:42 +0800 Subject: [PATCH 10/15] CI adjustment --- .github/workflows/main-ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 90a692ac..815b0be1 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -1,14 +1,20 @@ name: CI -on: [push, pull_request] +on: + push: + branches: '**' + tags: '**' + pull_request: + schedule: + - cron: '0 0 * * 0' jobs: build: runs-on: ubuntu-latest strategy: matrix: - php_version: ["7.1", "7.2", "7.3", "7.4", "8.0"] - service: [php-fpm, php-worker, workspace, laravel-horizon] + php_version: ["7.2", "7.3", "7.4", "8.0"] + service: [php-fpm, php-worker, workspace, laravel-horizon, 'nginx redis'] steps: - uses: actions/checkout@v2 - name: Build the Docker image From e099d8a2727d3d64c641147c4fd0e1adde59b3cf Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 16:18:21 +0800 Subject: [PATCH 11/15] Update main-ci.yml php-fpm install ext --- .github/workflows/main-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 815b0be1..8cbd87e9 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: php_version: ["7.2", "7.3", "7.4", "8.0"] - service: [php-fpm, php-worker, workspace, laravel-horizon, 'nginx redis'] + service: [php-fpm, php-worker, workspace, laravel-horizon, 'nginx redis mysql mariadb percona minio mongo'] steps: - uses: actions/checkout@v2 - name: Build the Docker image @@ -22,4 +22,5 @@ jobs: PHP_VERSION: ${{ matrix.php_version }} run: | cp env-example .env + sed -i -- '201,272s/=false/=true/g' .env docker-compose build ${{ matrix.service }} From a528c95bfd9dea0fb130f8cc79f318d5e22f626c Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 16:28:07 +0800 Subject: [PATCH 12/15] Update main-ci.yml CI avoid CHANGE_SOURCE=true --- .github/workflows/main-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 8cbd87e9..531c3231 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -23,4 +23,5 @@ jobs: run: | cp env-example .env sed -i -- '201,272s/=false/=true/g' .env + sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env docker-compose build ${{ matrix.service }} From 7e2e6db3b44b6a5d5796b5440b7fbe4c2a9e3cdd Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 18:30:57 +0800 Subject: [PATCH 13/15] skip PHPDBG --- .github/workflows/main-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 531c3231..8b734ba8 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -24,4 +24,5 @@ jobs: cp env-example .env sed -i -- '201,272s/=false/=true/g' .env sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env + sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env docker-compose build ${{ matrix.service }} From c2c86d72af249f5c8e12af8f369eb6970de987a1 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 23:35:47 +0800 Subject: [PATCH 14/15] laravel-horizon update memcached version --- laravel-horizon/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index fe344947..5d2a4bf5 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -235,7 +235,7 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/2.2.0.tar.gz"; \ else \ - curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/v3.1.3.tar.gz"; \ + curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/v3.1.4.tar.gz"; \ fi \ && mkdir -p memcached \ && tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \ From 0718a9b8232c2b1b39ffa0dbfd27d3707c0f6462 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Tue, 16 Mar 2021 23:50:07 +0800 Subject: [PATCH 15/15] disable install ext and split job --- .github/workflows/main-ci.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index 8b734ba8..ecd31a73 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -9,12 +9,12 @@ on: - cron: '0 0 * * 0' jobs: - build: + build-php: runs-on: ubuntu-latest strategy: matrix: php_version: ["7.2", "7.3", "7.4", "8.0"] - service: [php-fpm, php-worker, workspace, laravel-horizon, 'nginx redis mysql mariadb percona minio mongo'] + service: [php-fpm, php-worker, workspace, laravel-horizon] steps: - uses: actions/checkout@v2 - name: Build the Docker image @@ -22,7 +22,22 @@ jobs: PHP_VERSION: ${{ matrix.php_version }} run: | cp env-example .env - sed -i -- '201,272s/=false/=true/g' .env + # sed -i -- '201,272s/=false/=true/g' .env + sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env + sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env + docker-compose build ${{ matrix.service }} + + build-other: + runs-on: ubuntu-latest + strategy: + matrix: + service: ['nginx', 'redis', 'mysql', 'mariadb', 'percona', 'minio', 'mongo'] + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: | + cp env-example .env + sed -i -- 's/=false/=true/g' .env sed -i -- 's/CHANGE_SOURCE=true/CHANGE_SOURCE=false/g' .env sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env docker-compose build ${{ matrix.service }}