This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 6bcec1d6c3 [CI] Resolve CI compilation failures on MacOSX (#17271)
6bcec1d6c3 is described below

commit 6bcec1d6c358268b12da733d995f61bb7384b0ac
Author: Eric Lunderberg <[email protected]>
AuthorDate: Mon Aug 19 08:29:59 2024 -0500

    [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.
---
 .github/actions/setup/action.yml    | 4 ++++
 conda/build_win.bat                 | 4 +++-
 conda/recipe/bld.bat                | 2 +-
 conda/recipe/install_libtvm.bat     | 8 +++++---
 conda/recipe/install_tvm_python.bat | 4 ++--
 5 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
index 40ddf4f906..6fd81c1d69 100644
--- a/.github/actions/setup/action.yml
+++ b/.github/actions/setup/action.yml
@@ -15,6 +15,7 @@ runs:
       channel-priority: strict
       environment-file: conda/build-environment.yaml
       auto-activate-base: false
+      conda-solver: classic
       use-only-tar-bz2: true
       python-version: 3.9
       condarc-file: conda/condarc
@@ -25,6 +26,7 @@ runs:
       channel-priority: strict
       environment-file: conda/build-environment.yaml
       auto-activate-base: false
+      conda-solver: classic
       use-only-tar-bz2: true
       python-version: 3.9
       condarc-file: conda/condarc
@@ -33,3 +35,5 @@ runs:
     run: |
       conda info
       conda list
+      conda info --envs
+      conda list --name base
diff --git a/conda/build_win.bat b/conda/build_win.bat
index 59d0d07340..e37a06ce7c 100644
--- a/conda/build_win.bat
+++ b/conda/build_win.bat
@@ -15,4 +15,6 @@
 :: specific language governing permissions and limitations
 :: under the License.
 
-conda build --output-folder=conda/pkg conda/recipe
+echo on
+
+conda build --output-folder=conda/pkg conda/recipe || exit /b
diff --git a/conda/recipe/bld.bat b/conda/recipe/bld.bat
index f8988b1357..561dcff878 100644
--- a/conda/recipe/bld.bat
+++ b/conda/recipe/bld.bat
@@ -32,7 +32,7 @@ cmake ^
       -DUSE_RANDOM=ON ^
       -DUSE_PROFILER=ON ^
       -DINSTALL_DEV=ON ^
-      %SRC_DIR%
+      %SRC_DIR% || exit /b
 
 cd ..
 :: defer build to install stage to avoid rebuild.
diff --git a/conda/recipe/install_libtvm.bat b/conda/recipe/install_libtvm.bat
index f423c521f8..c56f83bfaa 100644
--- a/conda/recipe/install_libtvm.bat
+++ b/conda/recipe/install_libtvm.bat
@@ -15,8 +15,10 @@
 :: specific language governing permissions and limitations
 :: under the License.
 
-cmake --build build --config Release --target install
+echo on
+
+cmake --build build --config Release --target install || exit /b
 
 :: Copy files into library bin so that they can be found
-cp %LIBRARY_LIB%\tvm.dll %LIBRARY_BIN%\tvm.dll
-cp %LIBRARY_LIB%\tvm_runtime.dll %LIBRARY_BIN%\tvm_runtime.dll
+cp %LIBRARY_LIB%\tvm.dll %LIBRARY_BIN%\tvm.dll || exit /b
+cp %LIBRARY_LIB%\tvm_runtime.dll %LIBRARY_BIN%\tvm_runtime.dll || exit /b
diff --git a/conda/recipe/install_tvm_python.bat 
b/conda/recipe/install_tvm_python.bat
index 96187468c2..07c0465b84 100644
--- a/conda/recipe/install_tvm_python.bat
+++ b/conda/recipe/install_tvm_python.bat
@@ -16,5 +16,5 @@
 :: under the License.
 echo on
 
-cd %SRC_DIR%\python
-%PYTHON% setup.py install --single-version-externally-managed 
--record=%SRC_DIR%\record.txt
+cd %SRC_DIR%\python || exit /b
+%PYTHON% setup.py install --single-version-externally-managed 
--record=%SRC_DIR%\record.txt || exit /b

Reply via email to