mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Update actions (#428)
* Update action versions * Use same dependency cache key naming logic Bring consistency across the whole pipeline
This commit is contained in:
parent
7a8e0a7e67
commit
15c2935d48
32
.github/workflows/build-linux-arm.yml
vendored
32
.github/workflows/build-linux-arm.yml
vendored
@ -45,14 +45,30 @@ jobs:
|
|||||||
name: build ${{ inputs.version }} on ${{ inputs.operating-system }}
|
name: build ${{ inputs.version }} on ${{ inputs.operating-system }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Cache composer dependencies
|
||||||
|
- id: cache-composer-deps
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: vendor
|
||||||
|
key: composer-dependencies
|
||||||
|
|
||||||
|
# If there's no Composer cache, install dependencies
|
||||||
|
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
|
||||||
|
run: composer update --no-dev --classmap-authoritative
|
||||||
|
|
||||||
|
- name: Generate hashed key for download cache
|
||||||
|
run: |
|
||||||
|
INPUT_HASH=$(echo "${{ runner.os }}-${{ inputs.version }}-${{ inputs.extensions }}" | sha256sum | awk '{print $1}')
|
||||||
|
echo "INPUT_HASH=${INPUT_HASH}" >> $GITHUB_ENV
|
||||||
|
|
||||||
# Cache downloaded source
|
# Cache downloaded source
|
||||||
- id: cache-download
|
- id: cache-download
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: downloads
|
path: downloads
|
||||||
key: php-${{ inputs.version }}-dependencies-${{ inputs.extensions }}
|
key: php-${{ env.INPUT_HASH }}
|
||||||
|
|
||||||
# With or without debug
|
# With or without debug
|
||||||
- if: inputs.debug == true
|
- if: inputs.debug == true
|
||||||
@ -75,31 +91,31 @@ jobs:
|
|||||||
|
|
||||||
# Upload cli executable
|
# Upload cli executable
|
||||||
- if: ${{ inputs.build-cli == true }}
|
- if: ${{ inputs.build-cli == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: php-${{ inputs.version }}-linux-${{ inputs.operating-system }}
|
name: php-${{ inputs.version }}-linux-${{ inputs.operating-system }}
|
||||||
path: buildroot/bin/php
|
path: buildroot/bin/php
|
||||||
|
|
||||||
# Upload micro self-extracted executable
|
# Upload micro self-extracted executable
|
||||||
- if: ${{ inputs.build-micro == true }}
|
- if: ${{ inputs.build-micro == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: micro-${{ inputs.version }}-linux-${{ inputs.operating-system }}
|
name: micro-${{ inputs.version }}-linux-${{ inputs.operating-system }}
|
||||||
path: buildroot/bin/micro.sfx
|
path: buildroot/bin/micro.sfx
|
||||||
|
|
||||||
# Upload fpm executable
|
# Upload fpm executable
|
||||||
- if: ${{ inputs.build-fpm == true }}
|
- if: ${{ inputs.build-fpm == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: php-fpm-${{ inputs.version }}-linux-${{ inputs.operating-system }}
|
name: php-fpm-${{ inputs.version }}-linux-${{ inputs.operating-system }}
|
||||||
path: buildroot/bin/php-fpm
|
path: buildroot/bin/php-fpm
|
||||||
|
|
||||||
# Upload extensions metadata
|
# Upload extensions metadata
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: license-files
|
name: license-files
|
||||||
path: buildroot/license/
|
path: buildroot/license/
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-meta
|
name: build-meta
|
||||||
path: |
|
path: |
|
||||||
|
|||||||
23
.github/workflows/build-linux-x86_64.yml
vendored
23
.github/workflows/build-linux-x86_64.yml
vendored
@ -39,11 +39,11 @@ jobs:
|
|||||||
name: build ${{ inputs.version }} on Linux x86_64
|
name: build ${{ inputs.version }} on Linux x86_64
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Cache composer dependencies
|
# Cache composer dependencies
|
||||||
- id: cache-composer-deps
|
- id: cache-composer-deps
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: vendor
|
path: vendor
|
||||||
key: composer-dependencies
|
key: composer-dependencies
|
||||||
@ -52,12 +52,17 @@ jobs:
|
|||||||
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
|
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
|
||||||
run: composer update --no-dev --classmap-authoritative
|
run: composer update --no-dev --classmap-authoritative
|
||||||
|
|
||||||
|
- name: Generate hashed key for download cache
|
||||||
|
run: |
|
||||||
|
INPUT_HASH=$(echo "${{ runner.os }}-${{ inputs.version }}-${{ inputs.extensions }}" | sha256sum | awk '{print $1}')
|
||||||
|
echo "INPUT_HASH=${INPUT_HASH}" >> $GITHUB_ENV
|
||||||
|
|
||||||
# Cache downloaded source
|
# Cache downloaded source
|
||||||
- id: cache-download
|
- id: cache-download
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: downloads
|
path: downloads
|
||||||
key: php-${{ inputs.version }}-dependencies-${{ inputs.extensions }}
|
key: php-${{ env.INPUT_HASH }}
|
||||||
|
|
||||||
# With or without debug
|
# With or without debug
|
||||||
- if: inputs.debug == true
|
- if: inputs.debug == true
|
||||||
@ -80,31 +85,31 @@ jobs:
|
|||||||
|
|
||||||
# Upload cli executable
|
# Upload cli executable
|
||||||
- if: ${{ inputs.build-cli == true }}
|
- if: ${{ inputs.build-cli == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: php-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
name: php-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
||||||
path: buildroot/bin/php
|
path: buildroot/bin/php
|
||||||
|
|
||||||
# Upload micro self-extracted executable
|
# Upload micro self-extracted executable
|
||||||
- if: ${{ inputs.build-micro == true }}
|
- if: ${{ inputs.build-micro == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: micro-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
name: micro-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
||||||
path: buildroot/bin/micro.sfx
|
path: buildroot/bin/micro.sfx
|
||||||
|
|
||||||
# Upload fpm executable
|
# Upload fpm executable
|
||||||
- if: ${{ inputs.build-fpm == true }}
|
- if: ${{ inputs.build-fpm == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: php-fpm-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
name: php-fpm-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
||||||
path: buildroot/bin/php-fpm
|
path: buildroot/bin/php-fpm
|
||||||
|
|
||||||
# Upload extensions metadata
|
# Upload extensions metadata
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: license-files
|
name: license-files
|
||||||
path: buildroot/license/
|
path: buildroot/license/
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-meta
|
name: build-meta
|
||||||
path: |
|
path: |
|
||||||
|
|||||||
23
.github/workflows/build-macos-aarch64.yml
vendored
23
.github/workflows/build-macos-aarch64.yml
vendored
@ -39,7 +39,7 @@ jobs:
|
|||||||
name: build ${{ inputs.version }} on macOS arm64
|
name: build ${{ inputs.version }} on macOS arm64
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Install macOS missing packages and mark os suffix
|
# Install macOS missing packages and mark os suffix
|
||||||
- run: |
|
- run: |
|
||||||
@ -58,7 +58,7 @@ jobs:
|
|||||||
|
|
||||||
# Cache composer dependencies
|
# Cache composer dependencies
|
||||||
- id: cache-composer-deps
|
- id: cache-composer-deps
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: vendor
|
path: vendor
|
||||||
key: composer-dependencies
|
key: composer-dependencies
|
||||||
@ -67,12 +67,17 @@ jobs:
|
|||||||
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
|
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
|
||||||
run: composer update --no-dev --classmap-authoritative
|
run: composer update --no-dev --classmap-authoritative
|
||||||
|
|
||||||
|
- name: Generate hashed key for download cache
|
||||||
|
run: |
|
||||||
|
INPUT_HASH=$(echo "${{ runner.os }}-${{ inputs.version }}-${{ inputs.extensions }}" | sha256sum | awk '{print $1}')
|
||||||
|
echo "INPUT_HASH=${INPUT_HASH}" >> $GITHUB_ENV
|
||||||
|
|
||||||
# Cache downloaded source
|
# Cache downloaded source
|
||||||
- id: cache-download
|
- id: cache-download
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: downloads
|
path: downloads
|
||||||
key: php-${{ inputs.version }}-dependencies-${{ inputs.extensions }}
|
key: php-${{ env.INPUT_HASH }}
|
||||||
|
|
||||||
# With or without debug
|
# With or without debug
|
||||||
- if: inputs.debug == true
|
- if: inputs.debug == true
|
||||||
@ -95,31 +100,31 @@ jobs:
|
|||||||
|
|
||||||
# Upload cli executable
|
# Upload cli executable
|
||||||
- if: ${{ inputs.build-cli == true }}
|
- if: ${{ inputs.build-cli == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: php-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
name: php-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
||||||
path: buildroot/bin/php
|
path: buildroot/bin/php
|
||||||
|
|
||||||
# Upload micro self-extracted executable
|
# Upload micro self-extracted executable
|
||||||
- if: ${{ inputs.build-micro == true }}
|
- if: ${{ inputs.build-micro == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: micro-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
name: micro-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
||||||
path: buildroot/bin/micro.sfx
|
path: buildroot/bin/micro.sfx
|
||||||
|
|
||||||
# Upload fpm executable
|
# Upload fpm executable
|
||||||
- if: ${{ inputs.build-fpm == true }}
|
- if: ${{ inputs.build-fpm == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: php-fpm-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
name: php-fpm-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
||||||
path: buildroot/bin/php-fpm
|
path: buildroot/bin/php-fpm
|
||||||
|
|
||||||
# Upload extensions metadata
|
# Upload extensions metadata
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: license-files
|
name: license-files
|
||||||
path: buildroot/license/
|
path: buildroot/license/
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-meta
|
name: build-meta
|
||||||
path: |
|
path: |
|
||||||
|
|||||||
23
.github/workflows/build-macos-x86_64.yml
vendored
23
.github/workflows/build-macos-x86_64.yml
vendored
@ -39,7 +39,7 @@ jobs:
|
|||||||
name: build ${{ inputs.version }} on macOS x86_64
|
name: build ${{ inputs.version }} on macOS x86_64
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Install macOS missing packages and mark os suffix
|
# Install macOS missing packages and mark os suffix
|
||||||
- run: |
|
- run: |
|
||||||
@ -56,7 +56,7 @@ jobs:
|
|||||||
|
|
||||||
# Cache composer dependencies
|
# Cache composer dependencies
|
||||||
- id: cache-composer-deps
|
- id: cache-composer-deps
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: vendor
|
path: vendor
|
||||||
key: composer-dependencies
|
key: composer-dependencies
|
||||||
@ -65,12 +65,17 @@ jobs:
|
|||||||
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
|
- if: steps.cache-composer-deps.outputs.cache-hit != 'true'
|
||||||
run: composer update --no-dev --classmap-authoritative
|
run: composer update --no-dev --classmap-authoritative
|
||||||
|
|
||||||
|
- name: Generate hashed key for download cache
|
||||||
|
run: |
|
||||||
|
INPUT_HASH=$(echo "${{ runner.os }}-${{ inputs.version }}-${{ inputs.extensions }}" | sha256sum | awk '{print $1}')
|
||||||
|
echo "INPUT_HASH=${INPUT_HASH}" >> $GITHUB_ENV
|
||||||
|
|
||||||
# Cache downloaded source
|
# Cache downloaded source
|
||||||
- id: cache-download
|
- id: cache-download
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: downloads
|
path: downloads
|
||||||
key: php-${{ inputs.version }}-dependencies-${{ inputs.extensions }}
|
key: php-${{ env.INPUT_HASH }}
|
||||||
|
|
||||||
# With or without debug
|
# With or without debug
|
||||||
- if: inputs.debug == true
|
- if: inputs.debug == true
|
||||||
@ -93,31 +98,31 @@ jobs:
|
|||||||
|
|
||||||
# Upload cli executable
|
# Upload cli executable
|
||||||
- if: ${{ inputs.build-cli == true }}
|
- if: ${{ inputs.build-cli == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: php-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
name: php-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
||||||
path: buildroot/bin/php
|
path: buildroot/bin/php
|
||||||
|
|
||||||
# Upload micro self-extracted executable
|
# Upload micro self-extracted executable
|
||||||
- if: ${{ inputs.build-micro == true }}
|
- if: ${{ inputs.build-micro == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: micro-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
name: micro-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
||||||
path: buildroot/bin/micro.sfx
|
path: buildroot/bin/micro.sfx
|
||||||
|
|
||||||
# Upload fpm executable
|
# Upload fpm executable
|
||||||
- if: ${{ inputs.build-fpm == true }}
|
- if: ${{ inputs.build-fpm == true }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: php-fpm-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
name: php-fpm-${{ inputs.version }}-${{ env.SPC_BUILD_OS }}
|
||||||
path: buildroot/bin/php-fpm
|
path: buildroot/bin/php-fpm
|
||||||
|
|
||||||
# Upload extensions metadata
|
# Upload extensions metadata
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: license-files
|
name: license-files
|
||||||
path: buildroot/license/
|
path: buildroot/license/
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-meta
|
name: build-meta
|
||||||
path: |
|
path: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user