[TEST] Mark known MSVC/clang-cl ORC JIT limitations as xfail #92
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, | |
| # software distributed under the License is distributed on an | |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| # KIND, either express or implied. See the License for the | |
| # specific language governing permissions and limitations | |
| # under the License. | |
| name: OrcJIT Build | |
| on: | |
| push: | |
| paths: | |
| - "addons/tvm-ffi-orcjit/**" | |
| - ".github/workflows/orcjit-build.yml" | |
| workflow_dispatch: | |
| jobs: | |
| build_wheels: | |
| name: ${{ matrix.os }} (${{ matrix.arch }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - {os: ubuntu-latest, arch: x86_64, build: "cp312-manylinux_x86_64"} | |
| - {os: ubuntu-24.04-arm, arch: aarch64, build: "cp312-manylinux_aarch64"} | |
| - {os: macos-14, arch: arm64, build: "cp312-macosx_arm64"} | |
| - {os: windows-latest, arch: AMD64, build: "cp312-win_amd64"} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - uses: ./.github/actions/detect-env-vars | |
| id: env_vars | |
| - name: Build and test wheels | |
| uses: pypa/cibuildwheel@v3.1.4 | |
| with: | |
| package-dir: addons/tvm-ffi-orcjit | |
| output-dir: wheelhouse | |
| env: | |
| CIBW_BUILD: ${{ matrix.build }} | |
| CIBW_ARCHS_LINUX: ${{ matrix.arch }} | |
| CIBW_ARCHS_MACOS: ${{ matrix.arch }} | |
| CIBW_ARCHS_WINDOWS: ${{ matrix.arch }} | |
| CIBW_BUILD_VERBOSITY: 1 | |
| CMAKE_BUILD_PARALLEL_LEVEL: ${{ steps.env_vars.outputs.cpu_count }} | |
| CIBW_BEFORE_ALL_LINUX: bash {project}/addons/tvm-ffi-orcjit/tools/install_llvm.sh | |
| CIBW_BEFORE_ALL_MACOS: >- | |
| sudo mkdir -p /opt/llvm && | |
| sudo chown -R $(whoami) /opt/llvm && | |
| bash {project}/addons/tvm-ffi-orcjit/tools/install_llvm.sh | |
| CIBW_BEFORE_ALL_WINDOWS: >- | |
| powershell -ExecutionPolicy Bypass -File {project}\addons\tvm-ffi-orcjit\tools\install_llvm.ps1 | |
| CIBW_TEST_REQUIRES: pytest | |
| CIBW_BEFORE_TEST_LINUX: >- | |
| pip install apache-tvm-ffi && | |
| (cd {project}/addons/tvm-ffi-orcjit/tests && | |
| cmake -B build -DCMAKE_C_COMPILER=/opt/llvm/bin/clang | |
| -DCMAKE_CXX_COMPILER=/opt/llvm/bin/clang++ -DPython_EXECUTABLE=$(which python) && | |
| cmake --build build && | |
| cmake --install build && | |
| cmake -B build-gcc -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ | |
| -DTEST_OBJ_INSTALL_SUFFIX=-gcc -DPython_EXECUTABLE=$(which python) && | |
| cmake --build build-gcc && | |
| cmake --install build-gcc) && | |
| (cd {project}/addons/tvm-ffi-orcjit/examples/quick-start && | |
| cmake -B build -DCMAKE_CXX_COMPILER=/opt/llvm/bin/clang++ -DPython_EXECUTABLE=$(which python) && | |
| cmake --build build) | |
| CIBW_BEFORE_TEST_MACOS: >- | |
| pip install apache-tvm-ffi && | |
| (cd {project}/addons/tvm-ffi-orcjit/tests && | |
| cmake -B build -DCMAKE_C_COMPILER=/opt/llvm/bin/clang | |
| -DCMAKE_CXX_COMPILER=/opt/llvm/bin/clang++ -DPython_EXECUTABLE=$(which python) && | |
| cmake --build build && | |
| cmake --install build && | |
| cmake -B build-appleclang -DCMAKE_C_COMPILER=/usr/bin/clang | |
| -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DTEST_OBJ_INSTALL_SUFFIX=-appleclang | |
| -DPython_EXECUTABLE=$(which python) && | |
| cmake --build build-appleclang && | |
| cmake --install build-appleclang) && | |
| (cd {project}/addons/tvm-ffi-orcjit/examples/quick-start && | |
| cmake -B build -DCMAKE_CXX_COMPILER=/opt/llvm/bin/clang++ -DPython_EXECUTABLE=$(which python) && | |
| cmake --build build) | |
| CIBW_BEFORE_TEST_WINDOWS: >- | |
| pip install apache-tvm-ffi && | |
| pushd {project}\addons\tvm-ffi-orcjit\tests && | |
| cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DPython_EXECUTABLE=%PYTHON% && | |
| cmake --build build && | |
| cmake --install build && | |
| cmake -B build-msvc -G "Visual Studio 17 2022" | |
| -DTEST_OBJ_INSTALL_SUFFIX=-msvc -DPython_EXECUTABLE=%PYTHON% && | |
| cmake --build build-msvc --config Release && | |
| cmake --install build-msvc --config Release && | |
| cmake -B build-clangcl -G "Visual Studio 17 2022" -T ClangCL | |
| -DTEST_OBJ_INSTALL_SUFFIX=-clang-cl -DPython_EXECUTABLE=%PYTHON% && | |
| cmake --build build-clangcl --config Release && | |
| cmake --install build-clangcl --config Release && | |
| popd && | |
| pushd {project}\addons\tvm-ffi-orcjit\examples\quick-start && | |
| cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DPython_EXECUTABLE=%PYTHON% && | |
| cmake --build build && | |
| popd | |
| CIBW_TEST_COMMAND: >- | |
| pytest {project}/addons/tvm-ffi-orcjit/tests -v && | |
| (cd {project}/addons/tvm-ffi-orcjit/examples/quick-start && | |
| python run.py --lang cpp && | |
| python run.py --lang c) | |
| CIBW_TEST_COMMAND_WINDOWS: >- | |
| pytest {project}\addons\tvm-ffi-orcjit\tests -v && | |
| pushd {project}\addons\tvm-ffi-orcjit\examples\quick-start && | |
| python run.py --lang c && | |
| popd | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ strategy.job-index }} | |
| path: wheelhouse/*.whl |