Skip to content

Commit 221931f

Browse files
committed
Run mlir tests with python bindings enabled
1 parent a5f29f1 commit 221931f

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.github/workflows/llvm-project-tests.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ on:
1010
required: false
1111
projects:
1212
required: false
13+
extra_cmake_args:
14+
required: false
15+
default: ""
16+
type: string
17+
1318
workflow_call:
1419
inputs:
1520
build_target:
@@ -20,6 +25,11 @@ on:
2025
required: true
2126
type: string
2227

28+
extra_cmake_args:
29+
required: false
30+
default: ""
31+
type: string
32+
2333
concurrency:
2434
# Skip intermediate builds: always.
2535
# Cancel intermediate builds: only if it is a pull request build.
@@ -57,6 +67,7 @@ jobs:
5767
uses: actions/setup-python@v4
5868
with:
5969
python-version: '3.11'
70+
6071
- name: Install Ninja
6172
uses: llvm/actions/install-ninja@main
6273
# actions/checkout deletes any existing files in the new git directory,
@@ -65,6 +76,9 @@ jobs:
6576
- uses: actions/checkout@v3
6677
with:
6778
fetch-depth: 250
79+
- name: Install requirements.txt
80+
if: inputs.projects == 'mlir'
81+
run: pip install -r mlir/python/requirements.txt
6882
- name: Setup ccache
6983
uses: hendrikmuhs/ccache-action@v1
7084
with:
@@ -85,7 +99,17 @@ jobs:
8599
# This should be a no-op for non-mac OSes
86100
PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//12
87101
with:
88-
cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DLLVM_TARGETS_TO_BUILD=host -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache'
102+
cmake_args: >-
103+
-GNinja
104+
-DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}"
105+
-DLLVM_TARGETS_TO_BUILD=host
106+
-DCMAKE_BUILD_TYPE=Release
107+
-DLLDB_INCLUDE_TESTS=OFF
108+
-DCMAKE_C_COMPILER_LAUNCHER=sccache
109+
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
110+
-DLLVM_ENABLE_ASSERTIONS=ON
111+
${{ inputs.extra_cmake_args }}
112+
89113
build_target: '${{ inputs.build_target }}'
90114

91115
- name: Build and Test libclc

.github/workflows/mlir-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ jobs:
2525
with:
2626
build_target: check-mlir
2727
projects: mlir
28+
extra_cmake_args: -DMLIR_ENABLE_BINDINGS_PYTHON=ON

0 commit comments

Comments
 (0)