Skip to content

Run mlir tests with python bindings enabled #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/llvm-project-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ on:
required: false
projects:
required: false
extra_cmake_args:
required: false
default: ""
type: string

workflow_call:
inputs:
build_target:
Expand All @@ -20,6 +25,11 @@ on:
required: true
type: string

extra_cmake_args:
required: false
default: ""
type: string

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
Expand Down Expand Up @@ -57,6 +67,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install Ninja
uses: llvm/actions/install-ninja@main
# actions/checkout deletes any existing files in the new git directory,
Expand All @@ -65,6 +76,9 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 250
- name: Install requirements.txt
if: inputs.projects == 'mlir'
run: pip install -r mlir/python/requirements.txt
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1
with:
Expand All @@ -85,7 +99,17 @@ jobs:
# This should be a no-op for non-mac OSes
PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//12
with:
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'
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
-DLLVM_ENABLE_ASSERTIONS=ON
${{ inputs.extra_cmake_args }}

build_target: '${{ inputs.build_target }}'

- name: Build and Test libclc
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mlir-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ jobs:
with:
build_target: check-mlir
projects: mlir
extra_cmake_args: -DMLIR_ENABLE_BINDINGS_PYTHON=ON