Skip to content

Commit

Permalink
Remove separate cmake_python_api github action (#1923)
Browse files Browse the repository at this point in the history
Remove separate cmake_python_api github action and have ci_build_cmake
and ci_build_cmake_llvm always create the python bindings.
    
This should cut down on rebuilding LLVM itself which takes ~5 minutes
with ccache and much longer on new builds.
  • Loading branch information
fzakaria authored Jan 17, 2024
1 parent 9c8a1b7 commit fd3df66
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 57 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/buildAndTestCMake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,7 @@ jobs:
run: |
./build_tools/github_actions/ci_build_cmake_llvm.sh "$LLVM_PROJECT_DIR" "$LLVM_BUILD_DIR"
- name: Build and Test StableHLO
- name: Build and Test StableHLO (with Python bindings)
shell: bash
run: |
./build_tools/github_actions/ci_build_cmake.sh "$LLVM_BUILD_DIR" "$STABLEHLO_BUILD_DIR"
- name: Build and Test StableHLO Python API
shell: bash
run: |
./build_tools/github_actions/ci_build_cmake_python_api.sh "$LLVM_PROJECT_DIR" "$STABLEHLO_PYTHON_BUILD_DIR" "$GITHUB_WORKSPACE"
./build_tools/github_actions/ci_build_cmake.sh "$LLVM_BUILD_DIR" "$STABLEHLO_BUILD_DIR"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ llvm-project
llvm-build
.vscode
.cache
.idea/
**/__pycache__
*.whl
**/*.egg-info/
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ add_definitions(${LLVM_DEFINITIONS})
#-------------------------------------------------------------------------------

if(STABLEHLO_ENABLE_BINDINGS_PYTHON)
if(NOT STABLEHLO_EXTERNAL_PROJECT_BUILD)
message(WARNING "StableHLO Python bindings are not supported in standalone mode")
endif()

include(MLIRDetectPythonEnv)
mlir_configure_python_dev_packages()
endif()
Expand Down
5 changes: 3 additions & 2 deletions build_tools/github_actions/ci_build_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ cmake -GNinja \
-B"$STABLEHLO_BUILD_DIR" \
-DLLVM_ENABLE_LLD=ON \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=On \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DMLIR_DIR="$LLVM_BUILD_DIR/lib/cmake/mlir" \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DSTABLEHLO_ENABLE_STRICT_BUILD=On
-DSTABLEHLO_ENABLE_STRICT_BUILD=ON \
-DSTABLEHLO_ENABLE_BINDINGS_PYTHON=ON

# Build and Test StableHLO
cd "$STABLEHLO_BUILD_DIR"
Expand Down
1 change: 1 addition & 0 deletions build_tools/github_actions/ci_build_cmake_llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ cmake -GNinja \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_TARGETS_TO_BUILD=host \
-DLLVM_INCLUDE_TOOLS=ON \
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_BUILD_TOOLS=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
Expand Down
44 changes: 0 additions & 44 deletions build_tools/github_actions/ci_build_cmake_python_api.sh

This file was deleted.

0 comments on commit fd3df66

Please sign in to comment.