-
Notifications
You must be signed in to change notification settings - Fork 104
51 lines (43 loc) · 1.58 KB
/
build-and-test.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
name: Build And Test
on:
pull_request:
branches:
- main
types: [synchronize, opened, reopened, ready_for_review]
jobs:
test:
runs-on: ubuntu-latest
container:
image: nvcr.io/nvidia/tritonserver:24.10-py3
volumes:
- ${{ github.workspace }}:/core
# Mount /usr so we can free space
- /usr:/host_usr
env:
AGENT_TOOLSDIRECTORY: "$AGENT_TOOLSDIRECTORY"
steps:
- uses: actions/checkout@v3
- name: Free space
run: |
rm -rf \
/host_usr/share/dotnet /host_usr/local/lib/android /opt/ghc \
/host_usr/local/share/powershell /host_usr/share/swift /host_usr/local/.ghcup \
/host_usr/lib/jvm
rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install dependencies
run: |
apt update
apt install -y --no-install-recommends clang-format-15 cmake libb64-dev rapidjson-dev libre2-dev
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 && rm /tmp/boost.tar.gz
pip install build pytest
- name: Build
run: |
mkdir -p /core/build
cd /core/build
cmake -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/install -DTRITON_CORE_HEADERS_ONLY=OFF ..
make -j8
- name: Run tests with pytest
run: |
cd /core
python3 -m pip install --force-reinstall build/python/generic/wheel/dist/tritonserver-*.whl
pytest python/test -v