Skip to content

Commit 6bcec1d

Browse files
authored
[CI] Resolve CI compilation failures on MacOSX (#17271)
* Debug, list configs in base conda environment * Add the "auto-update-conda: true" flag for miniconda setup It looks like the base environment provides `conda==24.5.0`, but the `tvm-build` environment only provides `conda==23.9.0`, and the error in `cargo build` is triggered from within the `tvm-build` environment. Seeing if it just needs to be allowed to update to a newer `conda` version. * Attempt bumping the required conda version The `conda-build` package specifies compatibility with `conda >= 23.7`, but the `libmamba` requirement requirement isn't provided until `23.10`. Possibly an incompatibility, where the default solver is decided based on the base environment's `conda` version, but the availability is based on the `tvm-build` environment. * Try adding "conda-solver: classic" Since libmamba isn't available inside the generated environment * Exit on cmake failure in Windows build * Exit on first error for Windows conda build From what I can tell, batch scripts do not have an equivalent to `set -e`, so this needs to be added to every command in the batch scripts.
1 parent 517c420 commit 6bcec1d

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

.github/actions/setup/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ runs:
1515
channel-priority: strict
1616
environment-file: conda/build-environment.yaml
1717
auto-activate-base: false
18+
conda-solver: classic
1819
use-only-tar-bz2: true
1920
python-version: 3.9
2021
condarc-file: conda/condarc
@@ -25,6 +26,7 @@ runs:
2526
channel-priority: strict
2627
environment-file: conda/build-environment.yaml
2728
auto-activate-base: false
29+
conda-solver: classic
2830
use-only-tar-bz2: true
2931
python-version: 3.9
3032
condarc-file: conda/condarc
@@ -33,3 +35,5 @@ runs:
3335
run: |
3436
conda info
3537
conda list
38+
conda info --envs
39+
conda list --name base

conda/build_win.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@
1515
:: specific language governing permissions and limitations
1616
:: under the License.
1717

18-
conda build --output-folder=conda/pkg conda/recipe
18+
echo on
19+
20+
conda build --output-folder=conda/pkg conda/recipe || exit /b

conda/recipe/bld.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cmake ^
3232
-DUSE_RANDOM=ON ^
3333
-DUSE_PROFILER=ON ^
3434
-DINSTALL_DEV=ON ^
35-
%SRC_DIR%
35+
%SRC_DIR% || exit /b
3636

3737
cd ..
3838
:: defer build to install stage to avoid rebuild.

conda/recipe/install_libtvm.bat

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
:: specific language governing permissions and limitations
1616
:: under the License.
1717

18-
cmake --build build --config Release --target install
18+
echo on
19+
20+
cmake --build build --config Release --target install || exit /b
1921

2022
:: Copy files into library bin so that they can be found
21-
cp %LIBRARY_LIB%\tvm.dll %LIBRARY_BIN%\tvm.dll
22-
cp %LIBRARY_LIB%\tvm_runtime.dll %LIBRARY_BIN%\tvm_runtime.dll
23+
cp %LIBRARY_LIB%\tvm.dll %LIBRARY_BIN%\tvm.dll || exit /b
24+
cp %LIBRARY_LIB%\tvm_runtime.dll %LIBRARY_BIN%\tvm_runtime.dll || exit /b

conda/recipe/install_tvm_python.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
:: under the License.
1717
echo on
1818

19-
cd %SRC_DIR%\python
20-
%PYTHON% setup.py install --single-version-externally-managed --record=%SRC_DIR%\record.txt
19+
cd %SRC_DIR%\python || exit /b
20+
%PYTHON% setup.py install --single-version-externally-managed --record=%SRC_DIR%\record.txt || exit /b

0 commit comments

Comments
 (0)