Skip to content

samples

samples #472

Workflow file for this run

# 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/[email protected]
- name: "Setting up Python"
uses: actions/[email protected]
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/[email protected]
- 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/[email protected]
with:
python-version: "3.11"
- name: "Testing Samples"
run: ./build_tools/testing/test_samples.sh
web:
runs-on: ubuntu-20.04
container: gcr.io/iree-oss/emscripten@sha256:2dd4c52f1bb499ab365aad0111fe5538b685d88af38636b409b0cf6a576ab214
env:
VENV_DIR: ${{ github.workspace }}/.venv
defaults:
run:
shell: bash
steps:
- name: "Check out repository"
uses: actions/[email protected]
- name: "Mark git safe.directory"
run: git config --global --add safe.directory '*'
- name: "Check out runtime submodules"
run: ./build_tools/scripts/git/update_runtime_submodules.sh
- uses: actions/[email protected]
with:
python-version: "3.11"
- name: "Setup Python venv"
run: |
python3 -m venv ${VENV_DIR}
source ${VENV_DIR}/bin/activate
python3 -m pip install \
--find-links https://iree.dev/pip-release-links.html \
--upgrade \
iree-compiler \
iree-runtime
- name: "Test experimental web samples"
env:
HOST_TOOLS_BINARY_DIR: ${{ env.VENV_DIR }}/bin
IREE_EMPSCRIPTEN_BUILD_DIR: build-emscripten
run: |
source ${VENV_DIR}/bin/activate
./experimental/web/build_and_test_samples.sh ${HOST_TOOLS_BINARY_DIR}