Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Zheng-Bicheng committed Jun 17, 2024
1 parent 977db2c commit aa945fb
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 71 deletions.
125 changes: 56 additions & 69 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,56 @@
# name: Build Package

# on:
# push:
# branches: [ "develop" ]
# pull_request:
# branches: [ "develop" ]

# permissions:
# contents: read

# jobs:
# build:
# # For the sake of simplicity in testing, the Paddle2ONNX packaging program will temporarily run on Ubuntu-latest.
# # However, to ensure the stability of the packaging system, we will need to fix the Ubuntu version in the future.
# runs-on: ubuntu-latest

# # For the sake of simplicity in testing, the Paddle2ONNX packaging program will temporarily only package executable files for Python 3.8.
# # In the future, we will need to extend support to cover Python 3.8 through Python 3.10.
# steps:
# - name: Setup Python 3.8
# uses: actions/setup-python@v5
# with:
# python-version: '3.8'

# # Checkout the latest branch of Paddle2ONNX.
# - name: Checkout Paddle2ONNX
# uses: actions/checkout@v4
# with:
# submodules: true
# path: paddle2onnx

# # Checkout the branch(v3.16.0) of Paddle2ONNX.
# - name: Checkout Protobuf
# uses: actions/checkout@v4
# with:
# repository: protocolbuffers/protobuf
# ref: v3.16.0
# path: protobuf

# # Build Protobuf, detailed process can refer to the [Paddle2ONNX construction documentation](https://github.com/PaddlePaddle/Paddle2ONNX/blob/develop/docs/zh/compile.md).
# - name: Build Protobuf
# working-directory: ./protobuf
# run: |
# #============
# cmake ./cmake -B build_wd -Dprotobuf_BUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install_dir
# cmake --build ./build_wd
# cmake --build ./build_wd -- install
# echo "$PWD/install_dir/bin" >> $GITHUB_PATH

# # Install Dependencies for Python
# - name: Install Dependencies for Python
# run: |
# python -m pip install --upgrade pip
# pip install setuptools wheel auditwheel auditwheel-symbols build
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

# # Build Paddle2ONNX
# - name: Build Paddle2ONNX
# working-directory: ./paddle2onnx
# run: |
# python -m build
# python -m pip install dist/*.whl

# # Install Test
# - name: Run Test
# working-directory: ./paddle2onnx/tests
# run: |
# bash run.sh python
name: Build Package

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

permissions:
contents: read

jobs:
build:
# For the sake of simplicity in testing, the Paddle2ONNX packaging program will temporarily run on Ubuntu-latest.
# However, to ensure the stability of the packaging system, we will need to fix the Ubuntu version in the future.
runs-on: ubuntu-latest

# For the sake of simplicity in testing, the Paddle2ONNX packaging program will temporarily only package executable files for Python 3.8.
# In the future, we will need to extend support to cover Python 3.8 through Python 3.10.
steps:
- name: Setup Python 3.8
uses: actions/setup-python@v5
with:
python-version: '3.8'

# Checkout the latest branch of Paddle2ONNX.
- name: Checkout Paddle2ONNX
uses: actions/checkout@v4
with:
submodules: true
path: paddle2onnx

# Download protobuf
- name: Download protobuf
working-directory: ./paddle2onnx
run: |
source .github/workflows/scripts/download_protobuf.sh
# Install Dependencies for Python
- name: Install Dependencies for Python
run: |
python -m pip install --upgrade pip
pip install setuptools wheel auditwheel auditwheel-symbols build
# Build Paddle2ONNX
- name: Build Paddle2ONNX
working-directory: ./paddle2onnx
run: |
python -m build
python -m pip install dist/*.whl
# Install Test
- name: Run Test
working-directory: ./paddle2onnx/tests
run: |
bash run.sh python
6 changes: 5 additions & 1 deletion .github/workflows/release_linux_aarch64.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: LinuxRelease_aarch64

# on:
# release:
# types: [published]

on:
push:
branches: [ "develop" ]
Expand Down Expand Up @@ -33,7 +37,7 @@ jobs:
uses: docker://quay.io/pypa/manylinux2014_aarch64:latest
with:
entrypoint: bash
args: .github/workflows/scripts/entrypoint.sh ${{ matrix.python-version }} manylinux2014_aarch64
args: .github/workflows/scripts/entrypoint.sh ${{ matrix.python-version }}

- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/download_protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ else
echo "The system only supports (Linux and Darwin), but the current system is $OS."
fi

protobuf_url="https://bj.bcebos.com/fastdeploy/third_libs/$protobuf_tgz_name"
protobuf_url="https://bj.bcebos.com/paddle2onnx/third_party/$protobuf_tgz_name"
wget $protobuf_url
protobuf_svae_dir="$PWD/installed_protobuf"
mkdir -p $protobuf_svae_dir
Expand Down

0 comments on commit aa945fb

Please sign in to comment.