Update pkgs.json for latest Swoole version #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 6218236807 -R hyperf/lwmbs -n cli_${{ matrix.php-version }}_${{ matrix.arch }}_78ee8c86ed905c0569e22a6b2e2f46f25ec097c6ae2bfc53c8e790cf2d8c0b21 | |
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 |