forked from iree-org/iree
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (60 loc) · 2.12 KB
/
pkgci_unit_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# 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 Unit Test
on:
workflow_call:
inputs:
artifact_run_id:
type: string
default: ""
workflow_dispatch:
inputs:
artifact_run_id:
type: string
default: ""
jobs:
linux_x86_64:
name: Linux (x86_64)
runs-on: ubuntu-20.04
env:
PACKAGE_DOWNLOAD_DIR: ${{ github.workspace }}/.packages
VENV_DIR: ${{ github.workspace }}/.venv
steps:
- name: Checking out repository
uses: actions/[email protected]
with:
submodules: false
- uses: actions/[email protected]
with:
# Must match the subset of versions built in pkgci_build_packages.
python-version: "3.11"
- uses: actions/[email protected]
with:
name: linux_x86_64_release_packages
path: ${{ env.PACKAGE_DOWNLOAD_DIR }}
- name: Setup base venv
run: |
./build_tools/pkgci/setup_venv.py ${VENV_DIR} \
--artifact-path=${PACKAGE_DOWNLOAD_DIR} \
--fetch-gh-workflow=${{ inputs.artifact_run_id }}
source ${VENV_DIR}/bin/activate
pip install -r runtime/bindings/python/iree/runtime/build_requirements.txt
- name: Validate runtime wheel
run: |
source ${VENV_DIR}/bin/activate
echo "Testing default runtime package:"
python -m iree.runtime._package_test
echo "Testing tracy runtime package:"
# GH runners don't expose the TSC but we want to make sure the basic packaging
# works, so override the check with TRACY_NO_INVARIANT_CHECK=1 (per instructions
# if this is left off).
TRACY_NO_INVARIANT_CHECK=1 IREE_PY_RUNTIME=tracy \
python -m iree.runtime._package_test
- name: Validate compiler wheel
run: |
source ${VENV_DIR}/bin/activate
echo "Testing compiler package:"
python -m iree.compiler._package_test