• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: periodic
2
3on:
4  schedule:
5    # We have several schedules so jobs can check github.event.schedule to activate only for a fraction of the runs.
6    # Also run less frequently on weekends.
7    - cron: 45 0,8,16 * * *
8  push:
9    tags:
10      - ciflow/periodic/*
11    branches:
12      - release/*
13  workflow_dispatch:
14
15concurrency:
16  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}-${{ github.event.schedule }}
17  cancel-in-progress: true
18
19permissions: read-all
20
21jobs:
22  gather-models:
23    runs-on: ubuntu-22.04
24    outputs:
25      models: ${{ steps.gather-models.outputs.models }}
26    steps:
27      - uses: actions/checkout@v3
28        with:
29          submodules: 'false'
30      - uses: actions/setup-python@v4
31        with:
32          python-version: '3.10'
33      - name: Extract the list of models to test
34        id: gather-models
35        run: |
36          set -eux
37
38          PYTHONPATH="${PWD}" python .ci/scripts/gather_test_models.py --event "${GITHUB_EVENT_NAME}"
39
40  test-models-linux:
41    name: test-models-linux
42    uses: pytorch/test-infra/.github/workflows/linux_job.yml@release/2.5
43    needs: gather-models
44    strategy:
45      matrix: ${{ fromJSON(needs.gather-models.outputs.models) }}
46      fail-fast: false
47    with:
48      runner: ${{ matrix.runner }}
49      docker-image: executorch-ubuntu-22.04-clang12
50      submodules: 'true'
51      ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
52      timeout: ${{ matrix.timeout }}
53      script: |
54        # The generic Linux job chooses to use base env, not the one setup by the image
55        CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
56        conda activate "${CONDA_ENV}"
57
58        MODEL_NAME=${{ matrix.model }}
59        BUILD_TOOL=${{ matrix.build-tool }}
60        BACKEND=${{ matrix.backend }}
61        DEMO_BACKEND_DELEGATION=${{ matrix.demo_backend_delegation }}
62
63        PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "${BUILD_TOOL}"
64        # Build and test ExecuTorch
65        PYTHON_EXECUTABLE=python bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "${BACKEND}" "${DEMO_BACKEND_DELEGATION}"
66