Skip to content

Commit

Permalink
Merge pull request #1210 from jzhang533/setup_github_action_build
Browse files Browse the repository at this point in the history
use github action to build paddle2onnx, will merge, so the workflow can be triggered
  • Loading branch information
jzhang533 authored Mar 27, 2024
2 parents 2cd690b + 59d0bbc commit dd17855
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
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

0 comments on commit dd17855

Please sign in to comment.