mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
Fix CI
This commit is contained in:
parent
bf5bbf24f2
commit
26cff8ebd0
64
.github/workflows/test-pack-lib.yml
vendored
64
.github/workflows/test-pack-lib.yml
vendored
@ -20,37 +20,47 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: "Pack Lib Test (${{ matrix.lib }} for ${{ matrix.os.name }}-${{ matrix.os.arch }})"
|
name: "Pack Lib Test (${{ matrix.lib }} for ${{ matrix.runner }})"
|
||||||
runs-on: ${{ matrix.os.runs-on }}
|
runs-on: ${{ matrix.runner }}
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
runner:
|
||||||
- runs-on: ubuntu-latest
|
- ubuntu-latest
|
||||||
name: "linux"
|
- macos-13
|
||||||
arch: "x86_64"
|
- windows-latest
|
||||||
- runs-on: macos-13
|
- macos-14
|
||||||
name: "darwin"
|
|
||||||
arch: "x86_64"
|
|
||||||
- runs-on: windows-latest
|
|
||||||
name: "windows"
|
|
||||||
arch: "x86_64"
|
|
||||||
- runs-on: macos-14
|
|
||||||
name: "darwin"
|
|
||||||
arch: "aarch64"
|
|
||||||
lib:
|
lib:
|
||||||
- pkg-config
|
|
||||||
- zlib
|
- zlib
|
||||||
|
- pkg-config
|
||||||
- bzip2
|
- bzip2
|
||||||
- gmp
|
- gmp
|
||||||
exclude:
|
exclude:
|
||||||
- os:
|
- { runner: "windows-latest", lib: "pkg-config" }
|
||||||
runs-on: windows-latest
|
- { runner: "windows-latest", lib: "gmp" }
|
||||||
arch: "x86_64"
|
|
||||||
lib: pkg-config
|
|
||||||
lib: pkg-config
|
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
|
- name: "Process env string"
|
||||||
|
run: |
|
||||||
|
case "${{ matrix.runner }}" in
|
||||||
|
ubuntu-latest)
|
||||||
|
echo "OS=linux" >> $env:GITHUB_ENV
|
||||||
|
echo "ARCH=x86_64" >> $env:GITHUB_ENV
|
||||||
|
;;
|
||||||
|
windows-latest)
|
||||||
|
echo "OS=windows" >> $env:GITHUB_ENV
|
||||||
|
echo "ARCH=x86_64" >> $env:GITHUB_ENV
|
||||||
|
;;
|
||||||
|
macos-13)
|
||||||
|
echo "OS=darwin" >> $env:GITHUB_ENV
|
||||||
|
echo "ARCH=x86_64" >> $env:GITHUB_ENV
|
||||||
|
;;
|
||||||
|
macos-14)
|
||||||
|
echo "OS=darwin" >> $env:GITHUB_ENV
|
||||||
|
echo "ARCH=aarch64" >> $env:GITHUB_ENV
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
- name: "Checkout"
|
- name: "Checkout"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -69,7 +79,7 @@ jobs:
|
|||||||
path: vendor
|
path: vendor
|
||||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-php-
|
${{ runner.os }}-php
|
||||||
|
|
||||||
# Cache downloaded source
|
# Cache downloaded source
|
||||||
- id: cache-download
|
- id: cache-download
|
||||||
@ -86,16 +96,16 @@ jobs:
|
|||||||
- run: bin/spc download --for-libs="${{ matrix.lib }}" --debug --retry=5 --shallow-clone
|
- run: bin/spc download --for-libs="${{ matrix.lib }}" --debug --retry=5 --shallow-clone
|
||||||
|
|
||||||
- name: "Download pre-built pkg-config for *nix if possible"
|
- name: "Download pre-built pkg-config for *nix if possible"
|
||||||
if: matrix.os.name == 'linux' || matrix.os.name == 'darwin'
|
if: (env.OS == 'linux' || env.OS == 'darwin') && matrix.lib != 'pkg-config'
|
||||||
run: |
|
run: |
|
||||||
bin/spc download --for-libs="pkg-config" --debug --retry=5 --shallow-clone --prefer-pre-built
|
bin/spc download --for-libs="pkg-config" --debug --retry=5 --shallow-clone --prefer-pre-built
|
||||||
bin/spc build:libs pkg-config --debug
|
bin/spc build:libs pkg-config --debug
|
||||||
|
|
||||||
- if: matrix.os.name != 'windows' || matrix.lib != 'pkg-config'
|
- if: env.OS != 'windows' || matrix.lib != 'pkg-config'
|
||||||
run: bin/spc dev:pack-lib --debug ${{ matrix.lib }}
|
run: bin/spc dev:pack-lib --debug ${{ matrix.lib }}
|
||||||
|
|
||||||
- name: "Upload packed lib (${{ matrix.lib }} for ${{ matrix.os.name }}-${{ matrix.os.arch }})"
|
- name: "Upload packed lib (${{ matrix.lib }} for ${{ env.OS }}-${{ env.ARCH }})"
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: dist/${{ matrix.lib }}-${{ matrix.os.arch }}-${{ matrix.os.name }}.txz
|
path: dist/${{ matrix.lib }}-${{ env.ARCH }}-${{ env.OS }}.txz
|
||||||
name: ${{ matrix.lib }}-${{ matrix.os.arch }}-${{ matrix.os.name }}
|
name: ${{ matrix.lib }}-${{ env.ARCH }}-${{ env.OS }}
|
||||||
Loading…
x
Reference in New Issue
Block a user