Skip to content

Commit 2497864

Browse files
[Github] Remove call to llvm-project-tests from libclang tests
This allows for removing llvm-project-tests.yml. This significantly reduces the complexity of this workflow (including the complexity of llvm-project-tests.yml) at the cost of a little bit of duplication with the other workflows that were also using llvm-project-tests.yml. Reviewers: tstellar, DeinAlptraum Reviewed By: DeinAlptraum Pull Request: #153876
1 parent f8cd582 commit 2497864

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

.github/workflows/libclang-python-tests.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ permissions:
44
contents: read
55

66
on:
7-
workflow_dispatch:
87
push:
98
branches:
109
- 'main'
@@ -13,29 +12,46 @@ on:
1312
- 'clang/tools/libclang/**'
1413
- 'clang/CMakeList.txt'
1514
- '.github/workflows/libclang-python-tests.yml'
16-
- '.github/workflows/llvm-project-tests.yml'
1715
pull_request:
1816
paths:
1917
- 'clang/bindings/python/**'
2018
- 'clang/tools/libclang/**'
2119
- 'clang/CMakeList.txt'
2220
- '.github/workflows/libclang-python-tests.yml'
23-
- '.github/workflows/llvm-project-tests.yml'
2421

2522
jobs:
2623
check-clang-python:
2724
# Build libclang and then run the libclang Python binding's unit tests.
25+
# There is an issue running on "windows-2019".
26+
# See https://github.com/llvm/llvm-project/issues/76601#issuecomment-1873049082.
2827
name: Build and run Python unit tests
2928
if: github.repository == 'llvm/llvm-project'
29+
runs-on: ubuntu-24.04
3030
strategy:
3131
fail-fast: false
3232
matrix:
3333
python-version: ["3.8", "3.13"]
34-
uses: ./.github/workflows/llvm-project-tests.yml
35-
with:
36-
build_target: check-clang-python
37-
projects: clang
38-
# There is an issue running on "windows-2019".
39-
# See https://github.com/llvm/llvm-project/issues/76601#issuecomment-1873049082.
40-
os_list: '["ubuntu-24.04"]'
41-
python_version: ${{ matrix.python-version }}
34+
steps:
35+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
36+
- name: Setup Python
37+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
- name: Setup ccache
41+
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
42+
with:
43+
max-size: 2G
44+
key: spirv-ubuntu-24.04
45+
variant: sccache
46+
- name: Build and Test
47+
run: |
48+
mkdir build
49+
cmake -GNinja \
50+
-S llvm \
51+
-B build \
52+
-DCMAKE_BUILD_TYPE=Release \
53+
-DLLVM_ENABLE_ASSERTIONS=ON \
54+
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
55+
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
56+
-DLLVM_ENABLE_PROJECTS=clang
57+
ninja -C build check-clang-python

0 commit comments

Comments
 (0)