Add build in CI #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: format | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Globally update npm | |
run: npm install -g npm | |
- name: 3rdparty | |
run: sudo apt-get install -yq clang-14 llvm-14 clang-format-14 | |
- name: Set up Python "3.10" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install python modules dependencies | |
run: | | |
python -m pip install --upgrade pip pipdeptree wheel | |
pip install -r requirements-linter.txt | |
- name: formatter | |
shell: bash | |
run: | | |
bash ./.github/scripts/format.sh | |
- name: Fix formatting | |
shell: bash | |
run: | | |
git add . | |
if [ -n "$(git diff-index --name-only HEAD --)" ]; \ | |
then \ | |
echo "Please, fix formatting with uploaded patch." | |
git diff --cached; \ | |
exit 1; \ | |
fi |