Skip to content

Commit 7f10e95

Browse files
Enables testing for pull requests
1 parent 1bc36c3 commit 7f10e95

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/build-and-test.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build And Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types: [synchronize, opened, reopened, ready_for_review]
8+
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
container:
14+
image: nvcr.io/nvidia/tritonserver:24.10-py3
15+
volumes:
16+
- ${{ github.workspace }}:/server
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Install dependencies
22+
run: |
23+
apt update
24+
apt install -y --no-install-recommends clang-format-15 cmake libb64-dev rapidjson-dev libre2-dev libssl-dev
25+
wget -O /tmp/boost.tar.gz https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz && (cd /tmp && tar xzf boost.tar.gz) && mv /tmp/boost_1_80_0/boost /usr/include/boost
26+
pip install pytest requests /opt/tritonserver/python/*.whl pydantic tritonclient[all]
27+
28+
- name: Build
29+
run: |
30+
mkdir -p /server/build
31+
cd /server/build
32+
cmake -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/install ..
33+
make -j8
34+
35+
- name: Run tests with pytest
36+
run: |
37+
cd /server
38+
python3 -m pip install --force-reinstall build/triton-server/python/generic/wheel/dist/tritonfrontend-*.whl
39+
pytest qa/L0_python_api/ -v

0 commit comments

Comments
 (0)