-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1210 from jzhang533/setup_github_action_build
use github action to build paddle2onnx, will merge, so the workflow can be triggered
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build Package | ||
|
||
on: | ||
push: | ||
branches: [ "develop" ] | ||
pull_request: | ||
branches: [ "develop" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Checkout Paddle2ONNX | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
path: paddle2onnx | ||
|
||
- name: Show Working directory | ||
run: ls | ||
|
||
- name: Checkout and Build Protobuf | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: protocolbuffers/protobuf | ||
ref: v3.16.0 | ||
path: 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" >> $GITHUB_PATH | ||
- name: Show Working directory | ||
run: ls | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools auditwheel auditwheel-symbols | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi |