Skip to content

pt1

pt1 #216

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
build_asan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build Python+ASAN
shell: /usr/bin/bash {0}
run: |
git clone --depth=1 -b 3.10 https://github.com/python/cpython.git
cd cpython
./configure --with-assertions --with-address-sanitizer --with-undefined-behavior-sanitizer --with-pydebug --disable-shared "--prefix=$(pwd)/opt"
make -j2
make install
./python -m ensurepip
- name: Fetch fixtures
run: ./script/fetch-fixtures
- name: Test
run: |
CFLAGS="-O0 -g" ./cpython/python setup.py test
./cpython/python -c 'import tree_sitter'
build:
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, python: "3.12.0", install_libcxx: false }
- { os: ubuntu-latest, python: "3.12.0", install_libcxx: true }
- { os: ubuntu-latest, python: "3.11.6", install_libcxx: false }
- { os: ubuntu-latest, python: "3.11.6", install_libcxx: true }
- { os: ubuntu-latest, python: "3.10.11", install_libcxx: false }
- { os: ubuntu-latest, python: "3.10.11", install_libcxx: true }
- { os: ubuntu-latest, python: "3.8.17", install_libcxx: false }
- { os: ubuntu-latest, python: "3.8.17", install_libcxx: true }
- { os: ubuntu-20.04, python: "3.6.8", install_libcxx: false }
- { os: ubuntu-20.04, python: "3.6.8", install_libcxx: true }
- { os: ubuntu-latest, python: pypy-3.7, install_libcxx: false }
- { os: ubuntu-latest, python: pypy-3.7, install_libcxx: true }
- { os: macos-latest, python: "3.12.0", install_libcxx: false }
- { os: macos-latest, python: "3.11.6", install_libcxx: false }
- { os: macos-latest, python: "3.10.11", install_libcxx: false }
- { os: macos-latest, python: "3.8.17", install_libcxx: false }
- { os: macos-latest, python: "3.6.8", install_libcxx: false }
- { os: macos-latest, python: pypy-3.7, install_libcxx: false }
- { os: windows-latest, python: "3.12.0", install_libcxx: false }
- { os: windows-latest, python: "3.11.6", install_libcxx: false }
- { os: windows-latest, python: "3.10.11", install_libcxx: false }
- { os: windows-latest, python: "3.8.10", install_libcxx: false }
- { os: windows-latest, python: "3.6.8", install_libcxx: false }
- { os: windows-latest, python: pypy-3.7, install_libcxx: false }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Uninstall libcxx
if: ${{ matrix.os == 'ubuntu-latest' && !matrix.install_libcxx }}
run: |
DEBIAN_FRONTEND=noninteractive sudo apt-get purge -y 'libc++*'
- name: Install libcxx
if: ${{ matrix.install_libcxx }}
run: |
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y libc++-dev libc++abi-dev
- name: Install dependencies if Python version is 3.12.0+
if: ${{ matrix.python == '3.12.0' }}
run: |
python -m pip install .
- name: Install flake8
run: python -m pip install flake8
- name: Fetch fixtures
run: ./script/fetch-fixtures
- name: Lint
run: ./script/lint
- name: Test
shell: bash
run: |
CFLAGS="-O0 -g" python setup.py test