diff --git a/.github/workflows/build-wheels-linux.yml b/.github/workflows/build-wheels-linux.yml new file mode 100644 index 0000000000..973fe43e1a --- /dev/null +++ b/.github/workflows/build-wheels-linux.yml @@ -0,0 +1,50 @@ +name: Build Linux Wheels + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: wheel + os: linux + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/tensorrt + pre-script: packaging/pre_build_script.sh + post-script: "" + smoke-test-script: "" + package-name: torch-tensorrt + name: ${{ matrix.repository }} + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main + with: + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} + secrets: + AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} + AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} \ No newline at end of file diff --git a/packaging/post_build_script.sh b/packaging/post_build_script.sh new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packaging/pre_build_script.sh b/packaging/pre_build_script.sh new file mode 100644 index 0000000000..29a33e961a --- /dev/null +++ b/packaging/pre_build_script.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Install dependencies +TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()") +yum install -y ninja-build tensorrt-${TRT_VERSION}.* +wget https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-linux-amd64 \ + && mv bazelisk-linux-amd64 /usr/bin/bazel \ + && chmod +x /usr/bin/bazel \ No newline at end of file