mirror of
https://github.com/JakeHillion/drgn.git
synced 2024-12-23 09:43:06 +00:00
dd0885bacd
actions/virtual-environments@15a610677b changed the default version of Clang from 10 to 11, but `apt-get install libomp-dev` still installs libomp-10-dev. Ideally, the correct version of libomp would already be pre-installed (see actions/virtual-environments#3506), but for now make sure we install the correct version. Signed-off-by: Omar Sandoval <osandov@osandov.com>
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.9, 3.8, 3.7, 3.6]
|
|
cc: [gcc, clang]
|
|
fail-fast: false
|
|
env:
|
|
CC: ${{ matrix.cc }}
|
|
CFLAGS: -Wall -Werror -g -O2
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install busybox-static libelf-dev libdw-dev qemu-kvm zstd ${{ matrix.cc == 'clang' && 'libomp-$(clang --version | sed -rn "s/.*clang version ([0-9]+).*/\\1/p")-dev' || '' }}
|
|
pip install mypy
|
|
- name: Generate version.py
|
|
run: python setup.py --version
|
|
- name: Check with mypy
|
|
run: mypy --strict --no-warn-return-any drgn _drgn.pyi
|
|
- name: Build and test with ${{ matrix.cc }}
|
|
run: python setup.py test -K
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
- name: Install dependencies
|
|
run: pip install black isort
|
|
- name: Check with black
|
|
run: black --check --diff .
|
|
- name: Check with isort
|
|
run: isort --check --diff .
|