Skip to content

Commit 6fb961a

Browse files
authored
[CI] Include static builds of the runtime as part of CI (#13612)
This PR partially addresses #13526 by adding static builds of tvm_runtime.a on Windows and Linux. Tested at https://github.com/gigiblender/tvm/actions/runs/3694697105
1 parent 7149142 commit 6fb961a

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,40 @@ jobs:
9797
run: >-
9898
python -m pytest -v tests/python/all-platform-minimal-test
9999
100+
Windows-Static-Runtime:
101+
if: ${{ github.repository == 'apache/tvm' }}
102+
runs-on: windows-2019
103+
steps:
104+
- uses: actions/checkout@v2
105+
with:
106+
submodules: 'recursive'
107+
- name: Set up environment
108+
uses: ./.github/actions/setup
109+
- name: Build static TVM runtime
110+
shell: bash -l {0}
111+
run: |
112+
tests/scripts/task_config_build_static.sh build
113+
cd build
114+
cmake .. -A x64 -DCMAKE_CONFIGURATION_TYPES="Release"
115+
cmake --build . --config Release --target runtime
116+
117+
Linux-Static-Runtime:
118+
if: ${{ github.repository == 'apache/tvm' }}
119+
runs-on: Ubuntu-20.04
120+
steps:
121+
- uses: actions/checkout@v2
122+
with:
123+
submodules: 'recursive'
124+
- name: Set up environment
125+
uses: ./.github/actions/setup
126+
- name: Build static TVM runtime
127+
shell: bash -l {0}
128+
run: |
129+
tests/scripts/task_config_build_static.sh build
130+
cd build
131+
cmake ..
132+
cmake --build . --config Release --target runtime
133+
100134
Android:
101135
if: ${{ github.repository == 'apache/tvm' }}
102136
runs-on: Ubuntu-20.04
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
19+
set -euxo pipefail
20+
21+
BUILD_DIR=$1
22+
mkdir -p "$BUILD_DIR"
23+
cd "$BUILD_DIR"
24+
cp ../cmake/config.cmake .
25+
26+
echo set\(USE_LIBBACKTRACE OFF\) >> config.cmake
27+
echo set\(USE_SORT ON\) >> config.cmake
28+
echo set\(USE_CUDA OFF\) >> config.cmake
29+
echo set\(BUILD_STATIC_RUNTIME ON\) >> config.cmake
30+
echo set\(USE_FALLBACK_STL_MAP ON\) >> config.cmake
31+
echo set\(USE_MSVC_MT ON\) >> config.cmake
32+
echo set\(USE_RPC OFF\) >> config.cmake
33+
echo set\(USE_GRAPH_EXECUTOR OFF\) >> config.cmake
34+
echo set\(USE_PROFILER OFF\) >> config.cmake
35+
echo set\(USE_AOT_EXECUTOR OFF\) >> config.cmake

0 commit comments

Comments
 (0)