-
Notifications
You must be signed in to change notification settings - Fork 648
137 lines (132 loc) · 5.08 KB
/
validate_and_publish_release.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Publishes a draft snapshot, after performing validation to make sure all linux
# packages are stable.
name: Validate and Publish Release
on:
workflow_dispatch:
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
jobs:
validate_packages:
name: "Validate packages"
# TODO(jennik): Look into testing windows and macos builds.
runs-on: ubuntu-20.04
steps:
- name: Download packages
id: download_packages
uses: dawidd6/action-download-artifact@5e780fc7bbd0cac69fc73271ed86edf5dcb72d67 # v2.26.0
with:
github_token: ${{secrets.WRITE_ACCESS_TOKEN}}
workflow: build_package.yml
run_id: ${{ github.event.inputs.build_run_id }}
- name: Extract and display downloaded files
run: |
tar -xf wheels-linux-x86_64-main-dist-linux/iree-dist-${{ github.event.inputs.package_version }}-linux-x86_64.tar.xz
pwd
ls -R
- name: Set up python
id: set_up_python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.1.0
with:
python-version: "3.9"
- name: Install python packages
id: install_python_packages
run: |
python -m pip install -f file://$PWD/wheels-linux-x86_64-py-compiler-pkg/ iree-base-compiler[onnx]
python -m pip install -f file://$PWD/wheels-linux-x86_64-py-runtime-pkg/ iree-base-runtime
python -m pip install -f file://$PWD/wheels-linux-x86_64-py-tf-compiler-tools-pkg/ iree-tools-tflite iree-tools-tf
- name: Validate IREE Compiler Package
id: validate_compiler_package
run: |
echo "Testing compiler package:"
python -m iree.compiler._package_test
- name: Validate IREE Runtime Package
id: validate_runtime_package
run: |
echo "Testing default runtime:"
python -m iree.runtime._package_test
echo "Testing tracy runtime:"
# 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
# Binaries from the tarball
- name: Run iree-benchmark-executable
id: run_iree_benchmark_executable
run: ./bin/iree-benchmark-executable --help
- name: Run iree-benchmark-module
id: run_iree_benchmark_module
run: ./bin/iree-benchmark-module --help
- name: Run iree-dump-module
id: run_iree_dump_module
run: ./bin/iree-dump-module --help
- name: Run iree-cpuinfo
id: run_iree_cpuinfo
run: ./bin/iree-cpuinfo
- name: Run iree-flatcc-cli
id: run_iree_flatcc_cli
run: ./bin/iree-flatcc-cli --help
- name: Run iree-opt
id: run_iree_opt
run: ./bin/iree-opt --help
- name: Run iree-run-mlir
id: run_iree_run_mlir
run: ./bin/iree-run-mlir --help
- name: Run iree-run-module
id: run_iree_run_module
run: ./bin/iree-run-module --help
- name: Run iree-tblgen
id: run_iree_tblgen
run: ./bin/iree-tblgen --help
- name: Run iree-compile
id: run_iree-compile
run: ./bin/iree-compile --help
# Console scripts from the wheels.
- name: Py iree-run-module
id: py_iree-run-module
run: iree-run-module --help
- name: Py iree-benchmark-executable
id: py_iree_benchmark_executable
run: iree-benchmark-executable --help
- name: Py iree-benchmark-module
id: py_iree_benchmark_module
run: iree-benchmark-module --help
- name: Py iree-dump-module
id: py_iree_dump_module
run: iree-dump-module --help
- name: Py iree-cpuinfo
id: py_iree_cpuinfo
run: iree-cpuinfo
publish_release:
name: "Publish release"
needs: validate_packages
runs-on: ubuntu-20.04
steps:
- name: Publish Release
id: publish_release
uses: eregon/publish-release@46913fa2b3f7edc7345ae3c17f6d1b093a54916d # v1.0.5
env:
GITHUB_TOKEN: ${{ secrets.WRITE_ACCESS_TOKEN }}
with:
release_id: ${{ github.event.inputs.release_id }}
- name: Checking out repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
token: ${{ secrets.WRITE_ACCESS_TOKEN }}
# Get all history. Otherwise the latest-snapshot branch can't be
# fast-forwarded.
fetch-depth: 0
- name: Updating latest-snapshot branch
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df # v0.8.0
with:
github_token: ${{ secrets.WRITE_ACCESS_TOKEN }}
branch: latest-snapshot
force: true