Test package-based CI workflow #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024 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 | |
name: PkgCI Test Package | |
on: | |
pull_request: | |
# workflow_call: | |
# inputs: | |
# artifact_run_id: | |
# type: string | |
# default: "" | |
# workflow_dispatch: | |
# inputs: | |
# artifact_run_id: | |
# type: string | |
# default: "" | |
# TODO(scotttodd): input for release tag or artifact location | |
# inputs: | |
# release_id: | |
# description: "Release id to publish" | |
# required: true | |
# package_version: | |
# description: "Version of the package" | |
# required: true | |
# build_run_id: | |
# description: "Run ID for the build_package.yml workflow that triggered this workflow" | |
# required: true | |
# TODO(scotttodd): switch to runtime submodules only | |
# * Use a Docker image with `lit` installed (`python -m pip install lit`) | |
# * `run: ./build_tools/scripts/git/update_runtime_submodules.sh` | |
jobs: | |
linux_x86_64_cpu: | |
name: Test on Linux (x86_64) CPU | |
runs-on: ubuntu-22.04 | |
container: docker://ghcr.io/nod-ai/cpubuilder_ubuntu_jammy_ghr_x86_64:main | |
steps: | |
- name: "Checking out repository" | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: "Marking git safe.directory" | |
run: git config --global --add safe.directory '*' | |
- name: "Checking out runtime submodules" | |
run: ./build_tools/scripts/git/update_runtime_submodules.sh | |
- name: "Downloading release package" | |
uses: robinraju/release-downloader@368754b9c6f47c345fcfbf42bcb577c2f0f5f395 # v1.9 | |
with: | |
repository: "openxla/iree" | |
tag: "candidate-20240131.787" | |
fileName: "iree-dist-*-linux-x86_64.tar.xz" | |
- name: "Extracting package archive" | |
run: | | |
mkdir iree-dist | |
find . -iname "iree-dist-*" -exec tar -xf {} -C "iree-dist" \; | |
- name: "Installing lit" | |
run: python3 -m pip install lit | |
- name: "Building tests" | |
run: bash ./build_tools/pkgci/build_tests_using_package.sh iree-dist | |
- name: "Testing package" | |
run: ./build_tools/pkgci/test_package.sh |