build: Use smaller build image #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build And Test | |
on: | |
pull_request: | |
branches: | |
- main | |
types: [synchronize, opened, reopened, ready_for_review] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:24.04 | |
volumes: | |
- ${{ github.workspace }}:/core | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
apt update -y | |
apt install -y --no-install-recommends clang-format-15 cmake libb64-dev rapidjson-dev libre2-dev git wget software-properties-common | |
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 | |
# To avoid system/pip package conflict errors - use a venv: | |
# https://stackoverflow.com/questions/75602063/pip-install-r-requirements-txt-is-failing-this-environment-is-externally-mana | |
#python3 -m venv .venv | |
#source .venv/bin/activate | |
apt install -y python3 python3-pip | |
python3 -m 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 .. | |
export TRITON_PYBIND="_c/triton_bindings.cpython-310-x86_64-linux-gnu.so" | |
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 |