Skip to content

Commit

Permalink
setup python
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Dec 20, 2024
1 parent 7017686 commit 56ef069
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/pnnx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,25 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

env:
PYTHONUSERBASE: ${{ github.workspace }}/torch

steps:
- uses: actions/checkout@v4

- name: setup-python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: setup-pytorch
run: |
export PYTHONUSERBASE=$GITHUB_WORKSPACE/torch
python -m pip install --upgrade pip
pip install --user torch --index-url https://download.pytorch.org/whl/cpu
python3 -m pip install --upgrade pip
pip3 install --user torch --index-url https://download.pytorch.org/whl/cpu
- name: build-pnnx
run: |
export PYTHONUSERBASE=$GITHUB_WORKSPACE/torch
cd tools/pnnx
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j 4
- name: quick-test
run: |
export PYTHONUSERBASE=$GITHUB_WORKSPACE/torch
cd tools/pnnx
cd build && ctest --output-on-failure -R test_nn_Conv

0 comments on commit 56ef069

Please sign in to comment.