Merge pull request #1211 from jzhang533/setup_github_action_build #3
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
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 Protobuf | |
uses: actions/checkout@v4 | |
with: | |
repository: protocolbuffers/protobuf | |
ref: v3.16.0 | |
path: protobuf | |
- 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" >> $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 |