| # Copyright 2022 The IREE Authors |
| # |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| |
| # Workflow for running in-tree samples against releases periodically. |
| |
| name: samples |
| |
| on: |
| schedule: |
| # Weekdays at 13:00 UTC = 05:00 PST / 06:00 PDT. No one should be dealing |
| # with this on weekends. |
| - cron: "5 4 * * 1-5" |
| workflow_dispatch: |
| |
| permissions: |
| contents: read |
| |
| concurrency: |
| # A PR number if a pull request and otherwise the commit hash. This cancels |
| # queued and in-progress runs for the same PR (presubmit) or commit |
| # (postsubmit). The workflow name is prepended to avoid conflicts between |
| # different workflows. |
| group: ${{ github.workflow }}-${{ github.event.number || github.sha }} |
| cancel-in-progress: true |
| |
| jobs: |
| colab: |
| if: ${{ github.repository_owner == 'iree-org' || github.event_name != 'schedule' }} |
| runs-on: ubuntu-24.04 |
| steps: |
| - name: "Checking out repository" |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| - name: "Setting up Python" |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| with: |
| python-version: "3.11" |
| - name: "Testing Colab Notebooks" |
| run: ./samples/colab/test_notebooks.py |
| |
| samples: |
| if: ${{ github.repository_owner == 'iree-org' || github.event_name != 'schedule' }} |
| runs-on: ubuntu-24.04 |
| env: |
| CC: clang |
| CXX: clang++ |
| steps: |
| - name: "Checking out repository" |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| - name: "Checking out runtime submodules" |
| run: ./build_tools/scripts/git/update_runtime_submodules.sh |
| - name: "Installing build dependencies" |
| run: sudo apt update && sudo apt install -y ninja-build |
| - name: "Setting up Python" |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| with: |
| python-version: "3.11" |
| - name: "Testing Samples" |
| run: ./build_tools/testing/test_samples.sh |
| |
| # Aggregate job status and alerting on failures. |
| samples_summary: |
| if: always() |
| needs: |
| - colab |
| - samples |
| uses: ./.github/workflows/workflow_summary.yml |
| secrets: inherit |
| with: |
| jobs-json: ${{ toJson(needs) }} |