Skip to content

Commit

Permalink
merge code for new_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Dec 30, 2024
2 parents a41ebc7 + e2beeb0 commit baeb347
Show file tree
Hide file tree
Showing 249 changed files with 2,943 additions and 4,727 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/artifact-hash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: artifact-hash

on:
workflow_dispatch:
inputs:
version:
required: true
description: "发版 版本号 tag"
default: 'v1.7.1'
type: string
php-version:
required: true
description: "PHP 版本号 "
default: 'v8.1.31,v8.2.27,v8.3.15,v8.4.2'
type: string
enable_upload_cloud_object_storage:
required: false
type: boolean
description: "上传到云对象存储 (默认不需要上传)"

jobs:
generate-artifact-hash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Show Release File Hash
run: |
bash sapi/scripts/generate-artifact-hash.sh --version ${{ inputs.version }} --php-version ${{ inputs.php-version }}
- name: production artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.version }}-sha256sum
retention-days: 90
path: |
${{ inputs.version }}-sha256sum
- name: upload artifacts to cloud object storage
if: ${{ 0 && (github.repository == 'swoole/swoole-cli') && (inputs.enable_upload_cloud_object_storage == true) }}
env:
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
run: |
bash sapi/scripts/tencent-cloud-object-storage.sh --upload-all --swoole-cli-version ${{ inputs.version }}
9 changes: 4 additions & 5 deletions .github/workflows/auto-cache-pool-tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
key: source-code-tarball-pool

- name: Clean Source Code Tarball Cache On Release
if: startsWith(github.ref, 'refs/tags/')
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run:
rm -rf ${{ github.workspace }}/pool/*

Expand All @@ -84,8 +84,8 @@ jobs:
composer install --no-interaction --no-autoloader --no-scripts --profile --no-dev
composer dump-autoload --optimize --profile --no-dev
php prepare.php +inotify +apcu +ds +xlswriter +ssh2 +uuid +mongodb --show-tarball-hash=1
php prepare.php +apcu +ds +xlswriter +ssh2 +uuid @macos --show-tarball-hash=1
php prepare.php +inotify --show-tarball-hash=1
php prepare.php @macos --show-tarball-hash=1
cd ${{ github.workspace }}/pool/
zip -9 -r ${WORK_DIR}/all-deps.zip ext lib
Expand All @@ -100,7 +100,6 @@ jobs:
ls -A pool/ext/
- name: production artifacts
if: 1
uses: actions/upload-artifact@v4
with:
name: all-deps
Expand All @@ -111,7 +110,7 @@ jobs:
- name: gh release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
files: |
all-deps.zip
Expand Down
86 changes: 0 additions & 86 deletions .github/workflows/build-debian-builder-container.sh

This file was deleted.

19 changes: 15 additions & 4 deletions .github/workflows/linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build-linux-aarch64
on: [ push, pull_request ]

env:
BUILD_PHP_VERSION: 8.2.13
BUILD_PHP_VERSION: 8.2.27

jobs:
linux-aarch64:
Expand All @@ -12,9 +12,10 @@ jobs:
strategy:
matrix:
php-version:
- "8.2.13"
- "8.1.27"
# - "8.3.3"
- "8.2.27"
- "8.1.31"
- "8.3.15"
- "8.4.2"
steps:
- uses: actions/checkout@v4
- name: Show Environment Info
Expand Down Expand Up @@ -207,3 +208,13 @@ jobs:
files: |
php-cli-v${{ env.APP_VERSION }}-linux-arm64.tar.xz
php-cli-v${{ env.APP_VERSION }}-linux-arm64-debug.tar.xz
- name: upload artifacts to cloud object storage
if: ${{ 0 && (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }}
env:
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
run: |
bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-linux-arm64.tar.xz
8 changes: 7 additions & 1 deletion .github/workflows/linux-riscv64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ on: [ push, pull_request ]
jobs:
linux-riscv:
if: 0
runs-on: ubuntu-latest
runs-on:
# - ubuntu-latest
# https://github.com/apps/riscv-builders
# https://github.com/mengzhuo/GhostWrite/blob/main/.github/workflows/test.yml
- riscv-builders
- soc-spacemit-k1
- soc-starfive-jh7100
steps:
- uses: actions/checkout@v4
- name: Prepare Source Code
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/linux-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ on:

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
BUILD_PHP_VERSION: 8.2.13
BUILD_PHP_VERSION: 8.2.27

jobs:
linux-x86_64:
if: 1
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Show Environment Info
run: |
echo "${{ github.event.head_commit.message }}"
echo "${{ github.event.workflow_run.head_commit.message }}"
echo $PATH
env
docker info
Expand Down Expand Up @@ -187,3 +188,11 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
with:
files: privoxy-${{ env.PRIVOXY_VERSION }}-linux-x64.tar.xz
- name: upload artifacts to cloud object storage
if: ${{ 0 && (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }}
env:
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
run: |
48 changes: 26 additions & 22 deletions .github/workflows/macos-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build-macos-aarch64
on: [ push, pull_request ]

env:
BUILD_PHP_VERSION: 8.2.13
BUILD_PHP_VERSION: 8.2.27

jobs:
macos-aarch64:
Expand All @@ -17,13 +17,14 @@ jobs:
strategy:
matrix:
php-version:
- "8.2.13"
- "8.1.27"
# - "8.3.3"
- "8.2.27"
- "8.1.31"
- "8.3.15"
- "8.4.2"

steps:
- uses: actions/checkout@v4
- name: Prepare build environment
- name: Show Environment Info
run: |
set -x
uname -s
Expand All @@ -32,24 +33,12 @@ jobs:
sysctl -n hw.ncpu
env
echo $HOME
sw_vers
xcodebuild -version
brew config
bash sapi/quickstart/macos/macos-init.sh
# sudo rm -rf /Library/Developer/CommandLineTools
# xcode-select --install
# sudo xcode-select --reset
# sudo xcode-select -switch /Library/Developer/CommandLineTools
# softwareupdate --list --verbose
# softwareupdate --install -a
# xcode-select --install
# export SDKROOT=$(xcrun --show-sdk-path)
xcrun --show-sdk-path
ls -lh $(xcrun --show-sdk-path)
# sudo xcode-select --switch /Applications/Xcode.app
# export MACOSX_DEPLOYMENT_TARGET=12.6
clang --version
ifconfig
export IPV6=$(ifconfig en0 | grep "inet6 " | grep -v "inet6 fe80:" | awk '{print $2}' | cut -d'/' -f1 | sed -n '2p')
Expand All @@ -61,6 +50,10 @@ jobs:
echo "BUILD_PHP_VERSION=${{ matrix.php-version }}" >> $GITHUB_ENV
- name: Prepare Build Environment
run: |
bash sapi/quickstart/macos/macos-init.sh
export PATH="/opt/homebrew/opt/libtool/bin:$PATH"
ls -lha /opt/homebrew/opt/libtool/bin/
libtoolize --version
Expand Down Expand Up @@ -124,7 +117,7 @@ jobs:
composer install --no-interaction --no-autoloader --no-scripts --profile
composer dump-autoload --optimize --profile
php prepare.php --without-docker=1 +ds +apcu +xlswriter +ssh2 +pgsql +uuid -mongodb --with-build-type=release --with-libavif=1 --with-php-version=${{ env.BUILD_PHP_VERSION }}
php prepare.php --without-docker=1 --with-php-version=${{ env.BUILD_PHP_VERSION }}
- name: Build
run: |
Expand All @@ -142,6 +135,7 @@ jobs:
run: |
./thirdparty/php-src/sapi/cli/php -v
./thirdparty/php-src/sapi/cli/php -m
./thirdparty/php-src/sapi/cli/php --ri mongodb
./thirdparty/php-src/sapi/cli/php --ri gd
./thirdparty/php-src/sapi/cli/php --ri swoole
./thirdparty/php-src/sapi/cli/php --ri pgsql
Expand Down Expand Up @@ -175,3 +169,13 @@ jobs:
files: |
php-cli-v${{ env.BUILD_PHP_VERSION }}-macos-arm64.tar.xz
php-cli-v${{ env.BUILD_PHP_VERSION }}-macos-arm64-debug.tar.xz
- name: upload artifacts to cloud object storage
if: ${{ 0 && (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }}
env:
OSS_SECRET_ID: ${{ secrets.QCLOUD_OSS_SECRET_ID }}
OSS_SECRET_KEY: ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
OSS_BUCKET: ${{ vars.QCLOUD_OSS_BUCKET }}
OSS_REGION: ${{ vars.QCLOUD_OSS_REGION }}
run: |
bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${{ github.workspace }}/swoole-cli-v${{ env.APP_VERSION }}-macos-arm64.tar.xz
Loading

0 comments on commit baeb347

Please sign in to comment.