mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Update github action CI
This commit is contained in:
parent
b02fa68683
commit
6fab3e789d
43
.github/workflows/build-php.yml
vendored
43
.github/workflows/build-php.yml
vendored
@ -8,44 +8,31 @@ on:
|
|||||||
- "docker/**"
|
- "docker/**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
x86_64-step-1:
|
|
||||||
name: x86_64 Step 1
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Build Docker container for preparing PHP compile environment
|
|
||||||
run: cd docker/ && docker build . --tag static-php --build-arg USE_BACKUP_ADDRESS=yes
|
|
||||||
aarch64-step-1:
|
|
||||||
name: aarch64 Step 1
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Check Dockerfile to aarch64
|
|
||||||
run: cd docker/ && sed -ie 's/alpine:latest/multiarch\/alpine:aarch64-edge/g' Dockerfile
|
|
||||||
- name: Build Docker container for preparing PHP compile environment
|
|
||||||
run: cd docker/ && docker build . --tag static-php --build-arg USE_BACKUP_ADDRESS=yes
|
|
||||||
armv7l-step-1:
|
|
||||||
name: armv7l Step 1
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Check Dockerfile to armv7l
|
|
||||||
run: cd docker/ && sed -ie 's/alpine:latest/multiarch\/alpine:armv7-edge/g' Dockerfile
|
|
||||||
- name: Build Docker container for preparing PHP compile environment
|
|
||||||
run: cd docker/ && docker build . --tag static-php --build-arg USE_BACKUP_ADDRESS=yes
|
|
||||||
integration:
|
integration:
|
||||||
name: Build PHP ${{ matrix.php-versions }} for ${{ matrix.arch }}
|
name: Build PHP ${{ matrix.php-versions }} for ${{ matrix.arch }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: ${{ matrix.arch }}-step-1
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: [ "7.2.34", "7.3.33", "7.4.30", "8.0.20", "8.1.7" ]
|
php-versions: [ "7.2.34", "7.3.33", "7.4.30", "8.0.20", "8.1.7" ]
|
||||||
arch: [ "x86_64", "aarch64", "armv7l" ]
|
arch: [ "x86_64", "aarch64", "armv7l" ]
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Check Dockerfile to ${{ matrix.arch }}
|
||||||
|
run: |
|
||||||
|
cd docker/
|
||||||
|
if [[ "${{ matrix.arch }}" != "x86_64" ]]; then
|
||||||
|
if [[ "${{ matrix.arch }}" = "armv7l" ]]; then
|
||||||
|
sed -ie 's/alpine:latest/multiarch\/alpine:armv7-edge/g' Dockerfile
|
||||||
|
else
|
||||||
|
sed -ie 's/alpine:latest/multiarch\/alpine:${{ matrix.arch }}-edge/g' Dockerfile
|
||||||
|
fi
|
||||||
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
|
fi
|
||||||
- name: Build micro and PHP distribution ${{ matrix.php-versions }} for ${{ matrix.arch }}
|
- name: Build micro and PHP distribution ${{ matrix.php-versions }} for ${{ matrix.arch }}
|
||||||
run: |
|
run: |
|
||||||
mkdir ./dist && \
|
cd docker/ && docker build . --tag static-php --build-arg USE_BACKUP_ADDRESS=yes && \
|
||||||
docker run --rm -v $(pwd)/dist:/dist/ static-php build-php original ${{ matrix.php-versions }} all /dist/
|
mkdir ../dist && \
|
||||||
|
docker run --rm -v $(pwd)/../dist:/dist/ static-php build-php original ${{ matrix.php-versions }} all /dist/
|
||||||
- name: Pack PHP ${{ matrix.php-versions }} to archive
|
- name: Pack PHP ${{ matrix.php-versions }} to archive
|
||||||
run: |
|
run: |
|
||||||
cd dist
|
cd dist
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user