diff --git a/.github/workflows/ci-db-tests.yml b/.github/workflows/ci-db-tests.yml index 7a4aa3d1..234167d1 100644 --- a/.github/workflows/ci-db-tests.yml +++ b/.github/workflows/ci-db-tests.yml @@ -32,7 +32,7 @@ jobs: with: php-version: ${{ matrix.php-version }} extensions: ${{ env.extensions }} - key: db-tests-extensions-${{ inputs.platform }} + key: db-tests-extensions-${{ matrix.php-version }}-${{ inputs.platform }} - name: Cache extensions uses: actions/cache@v2 with: diff --git a/.github/workflows/ci-mutation-tests.yml b/.github/workflows/ci-mutation-tests.yml index 16937a2e..85ff6a8e 100644 --- a/.github/workflows/ci-mutation-tests.yml +++ b/.github/workflows/ci-mutation-tests.yml @@ -25,7 +25,7 @@ jobs: with: php-version: ${{ matrix.php-version }} extensions: ${{ env.extensions }} - key: mutation-tests-extensions-${{ inputs.test-group }} + key: mutation-tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }} - name: Cache extensions uses: actions/cache@v2 with: diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 078bc551..630c9614 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -31,7 +31,7 @@ jobs: with: php-version: ${{ matrix.php-version }} extensions: ${{ env.extensions }} - key: tests-extensions-${{ inputs.test-group }} + key: tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }} - name: Cache extensions uses: actions/cache@v2 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c76f47bc..2be038e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: with: php-version: ${{ matrix.php-version }} extensions: ${{ env.extensions }} - key: tests-extensions-${{ matrix.command }} + key: tests-extensions-${{ matrix.php-version }}-${{ matrix.command }} - name: Cache extensions uses: actions/cache@v2 with: diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 6ff6ec15..88068a16 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -12,15 +12,30 @@ jobs: matrix: php-version: ['8.1'] swoole: ['yes', 'no'] + env: + extensions: openswoole-4.11.1 steps: - name: Checkout code uses: actions/checkout@v2 + - name: Setup cache environment + id: extcache + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php-version }} + extensions: ${{ env.extensions }} + key: publish-release-extensions-${{ matrix.php-version }}-${{ matrix.swoole }} + - name: Cache extensions + uses: actions/cache@v2 + with: + path: ${{ steps.extcache.outputs.dir }} + key: ${{ steps.extcache.outputs.key }} + restore-keys: ${{ steps.extcache.outputs.key }} - name: Use PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} tools: composer - extensions: openswoole-4.11.1 + extensions: ${{ env.extensions }} - if: ${{ matrix.swoole == 'yes' }} run: ./build.sh ${GITHUB_REF#refs/tags/v} - if: ${{ matrix.swoole == 'no' }} diff --git a/.github/workflows/publish-swagger-spec.yml b/.github/workflows/publish-swagger-spec.yml index 83864389..f78abb2a 100644 --- a/.github/workflows/publish-swagger-spec.yml +++ b/.github/workflows/publish-swagger-spec.yml @@ -11,6 +11,8 @@ jobs: strategy: matrix: php-version: ['8.1'] + env: + extensions: openswoole-4.11.1 steps: - name: Checkout code uses: actions/checkout@v2 @@ -18,12 +20,25 @@ jobs: id: determine_version run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}" shell: bash + - name: Setup cache environment + id: extcache + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php-version }} + extensions: ${{ env.extensions }} + key: publish-release-extensions-${{ matrix.php-version }} + - name: Cache extensions + uses: actions/cache@v2 + with: + path: ${{ steps.extcache.outputs.dir }} + key: ${{ steps.extcache.outputs.key }} + restore-keys: ${{ steps.extcache.outputs.key }} - name: Use PHP uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} tools: composer - extensions: openswoole-4.11.1 + extensions: ${{ env.extensions }} coverage: none - run: composer install --no-interaction --prefer-dist - run: composer swagger:inline