-
Notifications
You must be signed in to change notification settings - Fork 173
54 lines (44 loc) · 1.33 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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@v5
with:
python-version: '3.x'
- name: Checkout Paddle2ONNX
uses: actions/checkout@v4
with:
submodules: true
path: paddle2onnx
- 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/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel auditwheel auditwheel-symbols
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build Paddle2ONNX
working-directory: ./paddle2onnx
run: |
python setup.py install