Skip to content

Add ini-path option of build command #74

Add ini-path option of build command

Add ini-path option of build command #74

Workflow file for this run

name: MacOS build
on:
pull_request:
push:
tags:
- '*'
jobs:
macos:
name: PHP ${{ matrix.php-version }} ${{ matrix.arch }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
php-version: ["8.1"]
arch: ["x86_64"]
max-parallel: 4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download PHP Cli
id: php_cli
run: |
gh run download 3826528969 -R hyperf/lwmbs -n cli_${{ matrix.php-version }}_${{ matrix.arch }}_ad4bf78451bf9894c4711694556132cc8f268ebf4a4607ba487984cdd338efad
chmod 755 ./php
- name: Download Composer
id: composer
run: |
wget https://getcomposer.org/download/2.3.7/composer.phar
chmod 755 ./composer.phar
- name: Vendor Installation
id: vendor_installation
run: |
cd src
../php ../composer.phar install -o
- name: Create ~/.box folder
id: create_folder
run: |
cd ~
mkdir .box
chmod 755 .box
- name: Build Box
id: box
continue-on-error: true
run: |
./php src/bin/hyperf.php config set github.access-token ${{ env.GITHUB_TOKEN }}
./php src/bin/hyperf.php config set-php-version ${{ matrix.php-version }}
./php src/bin/hyperf.php build-prepare
./php src/bin/hyperf.php build-self --no-dev
mv ~/.box/box ./box
- name: Upload artifact for box
if: steps.box.outcome == 'success'
uses: actions/upload-artifact@v3
with:
name: box_${{ matrix.arch }}
path: |
box
- name: Fail if box build failed
if: steps.box.outcome != 'success'
run: |
false
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.3
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset
if: steps.box.outcome == 'success' && steps.get_release.outputs.upload_url
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./box
asset_name: box_${{ matrix.arch }}_macos
asset_content_type: application/x-sh