Update build.yml

This commit is contained in:
Jerry 2023-04-12 15:40:49 +08:00 committed by GitHub
parent 0b4253090d
commit 52d787c903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,12 @@ name: CI
on:
workflow_dispatch:
inputs:
operating-system:
required: true
type: choice
options:
- ubuntu-latest
- macos-latest
version:
required: true
default: '8.2'
@ -30,22 +36,19 @@ env:
jobs:
build:
strategy:
matrix:
operating-system: [ ubuntu-latest, macos-latest ]
name: static-php-cli build on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
name: build on ${{ inputs.operating-system }}
runs-on: ${{ inputs.operating-system }}
steps:
- uses: actions/checkout@v2
# Install macOS missing packages and mark os suffix
- if: ${{ matrix.operating-system == 'macos-latest' }}
- if: ${{ inputs.operating-system == 'macos-latest' }}
run: |
brew install automake gzip
echo "SPC_BUILD_OS=macos" >> $GITHUB_ENV
# Install Ubuntu missing packages and mark os suffix
- if: ${{ matrix.operating-system == 'ubuntu-latest' }}
- if: ${{ inputs.operating-system == 'ubuntu-latest' }}
run: |
sudo apt install musl-tools -y
echo "SPC_BUILD_OS=linux" >> $GITHUB_ENV