-
Notifications
You must be signed in to change notification settings - Fork 4.2k
56 lines (50 loc) · 1.31 KB
/
pnnx.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
55
56
name: pnnx
on:
push:
branches: [master]
paths:
- '.github/workflows/pnnx.yml'
- 'tools/pnnx/**'
- '!tools/pnnx/README.md'
pull_request:
branches: [master]
paths:
- '.github/workflows/pnnx.yml'
- 'tools/pnnx/**'
- '!tools/pnnx/README.md'
concurrency:
group: pnnx-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
PYTHONUSERBASE: ${{ github.workspace }}/torch
UseMultiToolTask: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: setup-pytorch
run: |
python3 -m pip config set global.break-system-packages true
pip3 install --user torch --index-url https://download.pytorch.org/whl/cpu
pip3 install --user numpy packaging
- name: build-pnnx
run: |
cd tools/pnnx
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release -j 4
- name: quick-test
if: matrix.os != 'windows-latest'
run: |
cd tools/pnnx
cd build && ctest -C Release --output-on-failure -R test_nn_Conv