Skip to content

Commit e851bbc

Browse files
mgehre-amdkonstantinschwarz
authored andcommitted
ci: Run check-mlir on PRs
1 parent 538fd4e commit e851bbc

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
# lldb. Using this setup-python action to make 3.10 the default
8989
# python fixes this.
9090
- name: Setup Python
91+
if: inputs.projects != 'mlir'
9192
uses: actions/setup-python@v5
9293
with:
9394
python-version: ${{ inputs.python_version }}
@@ -100,6 +101,12 @@ jobs:
100101
- uses: actions/checkout@v4
101102
with:
102103
fetch-depth: 250
104+
- name: Install requirements.txt
105+
if: inputs.projects == 'mlir'
106+
run: |
107+
sudo apt-get update
108+
sudo apt-get install -y python3-dev python3-pip
109+
pip install -r mlir/python/requirements.txt
103110
- name: Setup ccache
104111
uses: hendrikmuhs/ccache-action@v1
105112
with:

.github/workflows/mlir-tests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: MLIR Tests
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch:
8+
pull_request:
9+
# Only builds on push populate the ccache that can be used by PRs
10+
push:
11+
branches: [ main, feature/fused-ops ]
12+
13+
concurrency:
14+
# Skip intermediate builds: always.
15+
# Cancel intermediate builds: only if it is a pull request build.
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
18+
19+
jobs:
20+
check_mlir:
21+
name: Test mlir
22+
uses: ./.github/workflows/llvm-project-tests.yml
23+
with:
24+
build_target: check-mlir
25+
projects: mlir
26+
cache-key: amd-mlir
27+
extra_cmake_args: -DMLIR_ENABLE_BINDINGS_PYTHON=ON
28+
os_list: '["ubuntu-22.04"]'

0 commit comments

Comments
 (0)