From 59d0bbcfa1300c8ad2da5d3de7925e1ae9a23b4e Mon Sep 17 00:00:00 2001 From: Zhang Jun Date: Wed, 27 Mar 2024 14:45:36 +0800 Subject: [PATCH] use github action to build paddle2onnx --- .github/workflows/build.yml | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..dd1b34ca3 --- /dev/null +++ b/.github/workflows/build.yml @@ -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