ci: enable python formatting check

This commit is contained in:
youben11
2022-03-29 14:21:35 +01:00
committed by Ayoub Benaissa
parent 51308058c1
commit b55f931d7b
2 changed files with 28 additions and 15 deletions

View File

@@ -25,8 +25,19 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- name: Format with clang-format
- name: Format with clang-format (Cpp)
run: sudo apt install moreutils && .github/workflows/scripts/format_cpp.sh
- name: Format with black (Python)
run: |
cd compiler
pip install -r lib/Bindings/Python/requirements_dev.txt
make check_python_format
- name: Lint with pylint (Python)
run: |
cd compiler
# compiler requirements to lint
pip install numpy
make python_lint
CheckLicense:
runs-on: ubuntu-latest
@@ -426,20 +437,20 @@ jobs:
- name: Build Parallel Python Package
id: build-wheel-linux
run: |
set -e
export HPX=${{ github.workspace }}/hpx
export HPX_INSTALL_DIR=$HPX/build
export CONCRETE_PROJECT=${{ github.workspace }}/concrete
sudo apt install -y ninja-build
pip install numpy pybind11==2.6.2 wheel auditwheel patchelf
cd compiler
mkdir build
make PARALLEL_EXECUTION_ENABLED=ON python-bindings
pip wheel --no-deps -w ./wheels .
auditwheel repair ./wheels/*.whl --plat linux_x86_64 -w ./wheels/
echo "::set-output name=ASSET_NAME::`find ./wheels/ -name *linux_x86_64*.whl | rev |cut -d "/" -f 1 |rev `"
# used later for python package test
echo "::set-output name=ASSET_NAME_PY`echo ${{ matrix.python }} |tr -d '.'`::`find ./wheels/ -name *linux_x86_64*.whl | rev |cut -d "/" -f 1 |rev `"
set -e
export HPX=${{ github.workspace }}/hpx
export HPX_INSTALL_DIR=$HPX/build
export CONCRETE_PROJECT=${{ github.workspace }}/concrete
sudo apt install -y ninja-build
pip install numpy pybind11==2.6.2 wheel auditwheel patchelf
cd compiler
mkdir build
make PARALLEL_EXECUTION_ENABLED=ON python-bindings
pip wheel --no-deps -w ./wheels .
auditwheel repair ./wheels/*.whl --plat linux_x86_64 -w ./wheels/
echo "::set-output name=ASSET_NAME::`find ./wheels/ -name *linux_x86_64*.whl | rev |cut -d "/" -f 1 |rev `"
# used later for python package test
echo "::set-output name=ASSET_NAME_PY`echo ${{ matrix.python }} |tr -d '.'`::`find ./wheels/ -name *linux_x86_64*.whl | rev |cut -d "/" -f 1 |rev `"
- name: Upload Python Package
uses: actions/upload-release-asset@v1

View File

@@ -0,0 +1,2 @@
black==22.3
pylint==2.11.1