58 lines · yaml
1name: Libclang Python Binding Tests2 3permissions:4 contents: read5 6on:7 push:8 branches:9 - 'main'10 paths:11 - 'clang/bindings/python/**'12 - 'clang/tools/libclang/**'13 - 'clang/CMakeList.txt'14 - '.github/workflows/libclang-python-tests.yml'15 pull_request:16 paths:17 - 'clang/bindings/python/**'18 - 'clang/tools/libclang/**'19 - 'clang/CMakeList.txt'20 - '.github/workflows/libclang-python-tests.yml'21 22jobs:23 check-clang-python:24 # 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.27 name: Build and run Python unit tests28 if: github.repository == 'llvm/llvm-project'29 runs-on: ubuntu-24.0430 strategy:31 fail-fast: false32 matrix:33 python-version: ["3.8", "3.13"]34 steps:35 - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.036 - name: Setup Python37 uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.038 with:39 python-version: ${{ matrix.python-version }}40 - name: Setup ccache41 uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.2042 with:43 max-size: 2G44 key: spirv-ubuntu-24.0445 variant: sccache46 - name: Build and Test47 run: |48 mkdir build49 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=clang57 ninja -C build check-clang-python58