| # 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 Examples of IREE usage 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: |
| runs-on: ubuntu-20.04 |
| steps: |
| - name: "Checking out repository" |
| uses: actions/checkout@v4.1.7 |
| - name: "Setting up Python" |
| uses: actions/setup-python@v5.1.0 |
| with: |
| python-version: "3.11" |
| - name: "Testing Colab Notebooks" |
| run: ./samples/colab/test_notebooks.py |
| |
| samples: |
| runs-on: ubuntu-20.04 |
| steps: |
| - name: "Checking out repository" |
| uses: actions/checkout@v4.1.7 |
| - 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 |
| echo "CC=clang" >> $GITHUB_ENV |
| echo "CXX=clang++" >> $GITHUB_ENV |
| - name: "Setting up Python" |
| uses: actions/setup-python@v5.1.0 |
| with: |
| python-version: "3.11" |
| - name: "Testing Samples" |
| run: ./build_tools/testing/test_samples.sh |
| |
| # TODO(scotttodd): Convert web test scripts to use installed compiler packages and local runtime |
| # builds, rather than local compiler builds. The host tools are too slow to build |
| # on standard sized runners (and for casual users). |
| |
| # web: |
| # runs-on: ubuntu-20.04 |
| # # TODO: remove dependence on magic matching build dir names |
| # env: |
| # HOST_BUILD_DIR: build-host-install |
| # steps: |
| # - name: "Checking out repository" |
| # uses: actions/checkout@v4.1.7 |
| # with: |
| # submodules: true |
| # - name: "Building host tools" |
| # run: | |
| # ./build_tools/github_actions/docker_run.sh \ |
| # --env "CCACHE_NAMESPACE=gcr.io/iree-oss/base@sha256:dc314b4fe30fc1315742512891357bffed4d1b62ffcb46258b1e0761c737b446" \ |
| # gcr.io/iree-oss/base@sha256:dc314b4fe30fc1315742512891357bffed4d1b62ffcb46258b1e0761c737b446 \ |
| # ./build_tools/cmake/build_host_tools.sh "${HOST_BUILD_DIR}" |
| # - name: "Testing Experimental Web Samples" |
| # env: |
| # IREE_EMPSCRIPTEN_BUILD_DIR: build-emscripten |
| # run: | |
| # ./build_tools/github_actions/docker_run.sh \ |
| # --env "IREE_HOST_BUILD_DIR=${HOST_BUILD_DIR}" \ |
| # --env "IREE_EMPSCRIPTEN_BUILD_DIR=${IREE_EMPSCRIPTEN_BUILD_DIR}" \ |
| # gcr.io/iree-oss/emscripten@sha256:2dd4c52f1bb499ab365aad0111fe5538b685d88af38636b409b0cf6a576ab214 \ |
| # ./experimental/web/build_and_test_samples.sh |