• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# From https://github.com/pytorch/test-infra/wiki/Using-Nova-Reusable-Build-Workflows
2name: Build Linux Wheels
3
4on:
5  pull_request:
6    paths:
7      - build/packaging/**
8      - .github/workflows/build-wheels-linux.yml
9  push:
10    branches:
11      - nightly
12      - release/*
13    tags:
14      # NOTE: Binary build pipelines should only get triggered on release candidate builds
15      # Release candidate tags look like: v1.11.0-rc1
16      - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
17      - ciflow/binaries/*
18  workflow_dispatch:
19
20jobs:
21  generate-matrix:
22    uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@release/2.5
23    with:
24      package-type: wheel
25      os: linux
26      test-infra-repository: pytorch/test-infra
27      test-infra-ref: release/2.5
28      with-cuda: disabled
29      with-rocm: disabled
30
31  build:
32    needs: generate-matrix
33    permissions:
34      id-token: write
35      contents: read
36    strategy:
37      fail-fast: false
38      matrix:
39        include:
40          - repository: pytorch/executorch
41            pre-script: build/packaging/pre_build_script.sh
42            post-script: build/packaging/post_build_script.sh
43            smoke-test-script: build/packaging/smoke_test.py
44            package-name: executorch
45    name: ${{ matrix.repository }}
46    uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@release/2.5
47    with:
48      repository: ${{ matrix.repository }}
49      ref: ""
50      test-infra-repository: pytorch/test-infra
51      test-infra-ref: release/2.5
52      build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
53      # ExecuTorch only needs the first layer of submodules; override the
54      # "recursive" default to do less work, and to give the buck daemon fewer
55      # files to look at.
56      submodules: true
57      env-var-script: build/packaging/env_var_script_linux.sh
58      pre-script: ${{ matrix.pre-script }}
59      post-script: ${{ matrix.post-script }}
60      package-name: ${{ matrix.package-name }}
61      smoke-test-script: ${{ matrix.smoke-test-script }}
62      trigger-event: ${{ github.event_name }}
63