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