Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aarch64 CI and update the job id of lwmbs #69

Merged
merged 7 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 69 additions & 2 deletions .github/workflows/linux_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
- name: Download PHP Cli
id: php_cli
run: |
gh run download 3156437692 -R dixyes/lwmbs -n cli_static_${{ matrix.php-version }}_musl_${{ matrix.arch }}_66708887d489fdf980d2c5a1c6d9b1f040d1f739ab19944385c9e129a6d4176a
gh run download 3467507234 -R dixyes/lwmbs -n cli_static_${{ matrix.php-version }}_musl_${{ matrix.arch }}_4a49a73ed0d2c889c319df5a8eba65257673730ee5e23fe5e9d9ff7e7ff97454
ls -a
chmod 755 ./php

- name: Download Composer
id: composer
run: |
wget https://getcomposer.org/download/2.3.7/composer.phar
wget https://getcomposer.org/download/2.4.4/composer.phar
chmod 755 ./composer.phar

- name: Vendor Installation
Expand Down Expand Up @@ -64,6 +64,73 @@ jobs:
path: |
box

- name: Fail if box build failed
if: steps.box.outcome != 'success'
run: |
false
steps:
aarch64:
name: PHP ${{ matrix.php-version }} ${{ matrix.arch }}
runs-on: [self-hosted, linux, arm64]
strategy:
fail-fast: false
matrix:
php-version: [ "8.1" ]
arch: [ "aarch64" ]
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 3467507234 -R dixyes/lwmbs -n cli_static_${{ matrix.php-version }}_musl_${{ matrix.arch }}_4a49a73ed0d2c889c319df5a8eba65257673730ee5e23fe5e9d9ff7e7ff97454
ls -a
chmod 755 ./php

- name: Download Composer
id: composer
run: |
wget https://getcomposer.org/download/2.4.4/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 ~
rm -rf .box
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
./box version
rm -rf ~/.box

- name: Upload artifact for box
if: steps.box.outcome == 'success'
uses: actions/upload-artifact@v3
with:
name: box_${{ matrix.arch }}_linux
path: |
box

- name: Fail if box build failed
if: steps.box.outcome != 'success'
run: |
Expand Down
89 changes: 87 additions & 2 deletions .github/workflows/linux_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
- name: Download PHP Cli
id: php_cli
run: |
gh run download 3156437692 -R dixyes/lwmbs -n cli_static_${{ matrix.php-version }}_musl_${{ matrix.arch }}_66708887d489fdf980d2c5a1c6d9b1f040d1f739ab19944385c9e129a6d4176a
gh run download 3467507234 -R dixyes/lwmbs -n cli_static_${{ matrix.php-version }}_musl_${{ matrix.arch }}_4a49a73ed0d2c889c319df5a8eba65257673730ee5e23fe5e9d9ff7e7ff97454
ls -a
chmod 755 ./php

- name: Download Composer
id: composer
run: |
wget https://getcomposer.org/download/2.3.7/composer.phar
wget https://getcomposer.org/download/2.4.4/composer.phar
chmod 755 ./composer.phar

- name: Vendor Installation
Expand All @@ -43,6 +43,91 @@ jobs:
- name: Create ~/.box folder
id: create_folder
run: |
cd ~
rm -rf .box
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
./box version
rm -rf ~/.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
steps:

- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Release Asset
if: steps.box.outcome == 'success'
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 }}_linux
asset_content_type: application/x-sh
aarch64:
name: PHP ${{ matrix.php-version }} ${{ matrix.arch }}
runs-on: [self-hosted, linux, arm64]
strategy:
fail-fast: false
matrix:
php-version: [ "8.1" ]
arch: [ "aarch64" ]
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 3467507234 -R dixyes/lwmbs -n cli_static_${{ matrix.php-version }}_musl_${{ matrix.arch }}_4a49a73ed0d2c889c319df5a8eba65257673730ee5e23fe5e9d9ff7e7ff97454
ls -a
chmod 755 ./php

- name: Download Composer
id: composer
run: |
wget https://getcomposer.org/download/2.4.4/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
Expand Down