|
| 1 | +{ |
| 2 | + "jobs": { |
| 3 | + "test": { |
| 4 | + "name": "PHP ${{ matrix.php.branch }}", |
| 5 | + "runs-on": "${{ matrix.os.image }}", |
| 6 | + "steps": [ |
| 7 | + { |
| 8 | + "uses": "actions/checkout@v2" |
| 9 | + }, |
| 10 | + { |
| 11 | + "name": "Install Nix", |
| 12 | + "uses": "cachix/install-nix-action@v14" |
| 13 | + }, |
| 14 | + { |
| 15 | + "name": "Set up Nix cache", |
| 16 | + "uses": "cachix/cachix-action@v10", |
| 17 | + "with": { |
| 18 | + "authToken": "${{ secrets.CACHIX_AUTH_TOKEN }}", |
| 19 | + "name": "fossar" |
| 20 | + } |
| 21 | + }, |
| 22 | + { |
| 23 | + "if": "${{ contains(fromJSON('[\"aarch64-darwin\",\"aarch64-linux\",\"i686-linux\",\"x86_64-darwin\",\"x86_64-linux\"]'), matrix.os.platform) && contains(fromJSON('[\"php56\",\"php70\",\"php71\",\"php72\",\"php73\",\"php74\",\"php80\",\"php81\"]'), matrix.php.attr) }}", |
| 24 | + "name": "Check that composer PHAR works", |
| 25 | + "run": "nix-build -A outputs.checks.${{ matrix.os.platform }}.${{ matrix.php.attr }}-composer-phar" |
| 26 | + }, |
| 27 | + { |
| 28 | + "if": "${{ contains(fromJSON('[\"aarch64-darwin\",\"aarch64-linux\",\"i686-linux\",\"x86_64-darwin\",\"x86_64-linux\"]'), matrix.os.platform) && contains(fromJSON('[\"php56\",\"php70\",\"php71\",\"php72\",\"php73\",\"php74\",\"php80\",\"php81\"]'), matrix.php.attr) }}", |
| 29 | + "name": "Build Imagick extension", |
| 30 | + "run": "nix-build -A outputs.checks.${{ matrix.os.platform }}.${{ matrix.php.attr }}-imagick" |
| 31 | + }, |
| 32 | + { |
| 33 | + "if": "${{ contains(fromJSON('[\"aarch64-darwin\",\"aarch64-linux\",\"i686-linux\",\"x86_64-darwin\",\"x86_64-linux\"]'), matrix.os.platform) && contains(fromJSON('[\"php56\"]'), matrix.php.attr) }}", |
| 34 | + "name": "Build MySQL extension", |
| 35 | + "run": "nix-build -A outputs.checks.${{ matrix.os.platform }}.${{ matrix.php.attr }}-mysql" |
| 36 | + }, |
| 37 | + { |
| 38 | + "if": "${{ contains(fromJSON('[\"aarch64-darwin\",\"aarch64-linux\",\"i686-linux\",\"x86_64-darwin\",\"x86_64-linux\"]'), matrix.os.platform) && contains(fromJSON('[\"php56\",\"php70\",\"php71\",\"php72\",\"php73\",\"php74\",\"php80\",\"php81\"]'), matrix.php.attr) }}", |
| 39 | + "name": "Validate php.extensions.mysqli default unix socket path", |
| 40 | + "run": "nix-build -A outputs.checks.${{ matrix.os.platform }}.${{ matrix.php.attr }}-mysqli-socket-path" |
| 41 | + }, |
| 42 | + { |
| 43 | + "if": "${{ contains(fromJSON('[\"aarch64-darwin\",\"aarch64-linux\",\"i686-linux\",\"x86_64-darwin\",\"x86_64-linux\"]'), matrix.os.platform) && contains(fromJSON('[\"php56\",\"php70\",\"php71\",\"php72\",\"php73\",\"php74\",\"php80\",\"php81\"]'), matrix.php.attr) }}", |
| 44 | + "name": "Validate php.extensions.pdo_mysql default unix socket path", |
| 45 | + "run": "nix-build -A outputs.checks.${{ matrix.os.platform }}.${{ matrix.php.attr }}-pdo_mysql-socket-path" |
| 46 | + }, |
| 47 | + { |
| 48 | + "if": "${{ contains(fromJSON('[\"aarch64-darwin\",\"aarch64-linux\",\"i686-linux\",\"x86_64-darwin\",\"x86_64-linux\"]'), matrix.os.platform) && contains(fromJSON('[\"php56\",\"php70\",\"php71\",\"php72\",\"php73\",\"php74\",\"php80\",\"php81\"]'), matrix.php.attr) }}", |
| 49 | + "name": "Build PHP", |
| 50 | + "run": "nix-build -A outputs.checks.${{ matrix.os.platform }}.${{ matrix.php.attr }}-php" |
| 51 | + }, |
| 52 | + { |
| 53 | + "if": "${{ contains(fromJSON('[\"aarch64-darwin\",\"aarch64-linux\",\"i686-linux\",\"x86_64-darwin\",\"x86_64-linux\"]'), matrix.os.platform) && contains(fromJSON('[\"php56\",\"php70\",\"php71\",\"php72\",\"php73\",\"php74\",\"php80\",\"php81\"]'), matrix.php.attr) }}", |
| 54 | + "name": "Build Redis extension", |
| 55 | + "run": "nix-build -A outputs.checks.${{ matrix.os.platform }}.${{ matrix.php.attr }}-redis" |
| 56 | + }, |
| 57 | + { |
| 58 | + "if": "${{ contains(fromJSON('[\"aarch64-darwin\",\"aarch64-linux\",\"i686-linux\",\"x86_64-darwin\",\"x86_64-linux\"]'), matrix.os.platform) && contains(fromJSON('[\"php56\",\"php70\",\"php71\",\"php72\",\"php73\",\"php74\"]'), matrix.php.attr) }}", |
| 59 | + "name": "Build Redis 3 extension", |
| 60 | + "run": "nix-build -A outputs.checks.${{ matrix.os.platform }}.${{ matrix.php.attr }}-redis3" |
| 61 | + }, |
| 62 | + { |
| 63 | + "if": "${{ contains(fromJSON('[\"aarch64-darwin\",\"aarch64-linux\",\"i686-linux\",\"x86_64-darwin\",\"x86_64-linux\"]'), matrix.os.platform) && contains(fromJSON('[\"php56\",\"php70\",\"php71\",\"php72\",\"php73\",\"php74\",\"php80\",\"php81\"]'), matrix.php.attr) }}", |
| 64 | + "name": "Build Tidy extension", |
| 65 | + "run": "nix-build -A outputs.checks.${{ matrix.os.platform }}.${{ matrix.php.attr }}-tidy" |
| 66 | + }, |
| 67 | + { |
| 68 | + "if": "${{ contains(fromJSON('[\"aarch64-darwin\",\"aarch64-linux\",\"i686-linux\",\"x86_64-darwin\",\"x86_64-linux\"]'), matrix.os.platform) && contains(fromJSON('[\"php56\",\"php70\",\"php71\",\"php72\",\"php73\",\"php74\",\"php80\",\"php81\"]'), matrix.php.attr) }}", |
| 69 | + "name": "Build Xdebug extension", |
| 70 | + "run": "nix-build -A outputs.checks.${{ matrix.os.platform }}.${{ matrix.php.attr }}-xdebug" |
| 71 | + } |
| 72 | + ], |
| 73 | + "strategy": { |
| 74 | + "fail-fast": false, |
| 75 | + "matrix": { |
| 76 | + "os": [ |
| 77 | + { |
| 78 | + "image": "ubuntu-20.04", |
| 79 | + "platform": "x86_64-linux" |
| 80 | + } |
| 81 | + ], |
| 82 | + "php": [ |
| 83 | + { |
| 84 | + "attr": "php56", |
| 85 | + "branch": "5.6" |
| 86 | + }, |
| 87 | + { |
| 88 | + "attr": "php70", |
| 89 | + "branch": "7.0" |
| 90 | + }, |
| 91 | + { |
| 92 | + "attr": "php71", |
| 93 | + "branch": "7.1" |
| 94 | + }, |
| 95 | + { |
| 96 | + "attr": "php72", |
| 97 | + "branch": "7.2" |
| 98 | + }, |
| 99 | + { |
| 100 | + "attr": "php73", |
| 101 | + "branch": "7.3" |
| 102 | + }, |
| 103 | + { |
| 104 | + "attr": "php74", |
| 105 | + "branch": "7.4" |
| 106 | + }, |
| 107 | + { |
| 108 | + "attr": "php80", |
| 109 | + "branch": "8.0" |
| 110 | + }, |
| 111 | + { |
| 112 | + "attr": "php81", |
| 113 | + "branch": "8.1" |
| 114 | + } |
| 115 | + ] |
| 116 | + } |
| 117 | + } |
| 118 | + } |
| 119 | + }, |
| 120 | + "name": "Test", |
| 121 | + "on": { |
| 122 | + "workflow_call": { |
| 123 | + "secrets": { |
| 124 | + "CACHIX_AUTH_TOKEN": { |
| 125 | + "required": true |
| 126 | + } |
| 127 | + } |
| 128 | + } |
| 129 | + } |
| 130 | +} |
0 commit comments