From c18622caf999e2ddf7e2cda5bf4a50d6506c3931 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 27 May 2021 22:08:39 +0200 Subject: [PATCH 1/4] Add cache for PHP 7.3 test --- .drone.yml | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index d49840fdcf..beb39fc52b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -67,11 +67,36 @@ type: docker name: php7.3-mariadb steps: + - name: Restore cache + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + restore: true + cache_key: '{{ .Repo.Name }}_php73_{{ arch }}_{{ os }}' + archive_format: "gzip" + mount: + - '.composer' + volumes: + - name: cache + path: /tmp/cache - name: Composer install - image: friendicaci/php7.4:php7.4.18 + image: friendicaci/php7.3:php7.3.28 commands: - - composer validate - - composer install --prefer-dist + - export COMPOSER_HOME=.composer + - ./bin/composer.phar validate + - ./bin/composer.phar install --prefer-dist + - name: Rebuild cache + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + rebuild: true + cache_key: '{{ .Repo.Name }}_php73_{{ arch }}_{{ os }}' + archive_format: "gzip" + mount: + - '.composer' + volumes: + - name: cache + path: /tmp/cache - name: Test Friendica image: friendicaci/php7.3:php7.3.28 environment: @@ -105,6 +130,11 @@ services: - name: redis image: redis + +volumes: + - name: cache + host: + path: /tmp/drone-cache --- kind: pipeline type: docker From 3b5e64644b923e8b79e62a7fbf2c79fa24d52487 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 27 May 2021 22:11:47 +0200 Subject: [PATCH 2/4] Add cache for PHP 7.4 test --- .drone.yml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index beb39fc52b..2d24069296 100644 --- a/.drone.yml +++ b/.drone.yml @@ -141,11 +141,36 @@ type: docker name: php7.4-mariadb steps: + - name: Restore cache + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + restore: true + cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}' + archive_format: "gzip" + mount: + - '.composer' + volumes: + - name: cache + path: /tmp/cache - name: Composer install image: friendicaci/php7.4:php7.4.18 commands: - - composer validate - - composer install --prefer-dist + - export COMPOSER_HOME=.composer + - ./bin/composer.phar validate + - ./bin/composer.phar install --prefer-dist + - name: Rebuild cache + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + rebuild: true + cache_key: '{{ .Repo.Name }}_php74_{{ arch }}_{{ os }}' + archive_format: "gzip" + mount: + - '.composer' + volumes: + - name: cache + path: /tmp/cache - name: Test Friendica image: friendicaci/php7.4:php7.4.18 environment: From 269129ac4fb04e753c0e7d862f283b8502e85735 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 27 May 2021 22:12:27 +0200 Subject: [PATCH 3/4] Add cache for PHP 8.0 test --- .drone.yml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2d24069296..1b5f2ae700 100644 --- a/.drone.yml +++ b/.drone.yml @@ -222,11 +222,36 @@ type: docker name: php8.0-mariadb steps: + - name: Restore cache + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + restore: true + cache_key: '{{ .Repo.Name }}_php80_{{ arch }}_{{ os }}' + archive_format: "gzip" + mount: + - '.composer' + volumes: + - name: cache + path: /tmp/cache - name: Composer install - image: friendicaci/php7.4:php7.4.18 + image: friendicaci/php8.0:php8.0.5 commands: - - composer validate - - composer install --prefer-dist + - export COMPOSER_HOME=.composer + - ./bin/composer.phar validate + - ./bin/composer.phar install --prefer-dist + - name: Rebuild cache + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + rebuild: true + cache_key: '{{ .Repo.Name }}_php80_{{ arch }}_{{ os }}' + archive_format: "gzip" + mount: + - '.composer' + volumes: + - name: cache + path: /tmp/cache - name: Test Friendica image: friendicaci/php8.0:php8.0.5 environment: From 8df29bcb7fd17a7195e2044df85b14fbab167a94 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 27 May 2021 22:15:06 +0200 Subject: [PATCH 4/4] Add cache for PHP CS --- .drone.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.drone.yml b/.drone.yml index 1b5f2ae700..b45409a846 100644 --- a/.drone.yml +++ b/.drone.yml @@ -52,15 +52,45 @@ trigger: - pull_request steps: + - name: Restore cache + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + restore: true + cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}' + archive_format: "gzip" + mount: + - '.composer' + volumes: + - name: cache + path: /tmp/cache - name: Install dependencies image: composer commands: + - export COMPOSER_HOME=.composer - ./bin/composer.phar run cs:install + - name: Rebuild cache + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + rebuild: true + cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}' + archive_format: "gzip" + mount: + - '.composer' + volumes: + - name: cache + path: /tmp/cache - name: Run coding standards check image: friendicaci/php-cs commands: - export CHANGED_FILES="$(git diff --name-status ${DRONE_COMMIT_BEFORE}..${DRONE_COMMIT_AFTER} | grep ^A | cut -f2)" - /check-php-cs.sh + +volumes: + - name: cache + host: + path: /tmp/drone-cache --- kind: pipeline type: docker @@ -216,6 +246,11 @@ services: - name: redis image: redis + +volumes: + - name: cache + host: + path: /tmp/drone-cache --- kind: pipeline type: docker @@ -285,3 +320,8 @@ services: - name: redis image: redis + +volumes: + - name: cache + host: + path: /tmp/drone-cache