Fix Windows builds #40
Workflow file for this run
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: 📊 Static Checks | |
on: [push, pull_request] | |
env: | |
CLANG_FORMAT_VERSION: "17" | |
BLACK_VERSION: "23.10" | |
jobs: | |
static-checks: | |
name: Static Checks (clang-format, black format, file format, documentation checks) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
#Install dependencies | |
sudo wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | | |
sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc | |
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ env.CLANG_FORMAT_VERSION }} main' | |
sudo apt-get update | |
sudo apt-get install -y \ | |
recode \ | |
dos2unix \ | |
clang-format-${{ env.CLANG_FORMAT_VERSION }} | |
sudo update-alternatives --remove-all clang-format | |
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${{ env.CLANG_FORMAT_VERSION }} 100 | |
python3 -m pip install black==${{ env.BLACK_VERSION }} | |
- name: File formatting checks (file_format.sh) | |
run: | | |
bash misc/scripts/file_format.sh | |
- name: Style checks via clang-format (clang_format.sh) | |
run: | | |
bash misc/scripts/clang_format.sh | |
- name: Python style checks via black (black_format.sh) | |
run: | | |
bash misc/scripts/black_format.sh | |
- name: Create patch file | |
if: failure() | |
run: | | |
git diff > static-checks.patch | |
- name: Upload patch file | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: patch-files | |
path: | | |
static-checks.patch | |
- name: JavaScript style and documentation checks via ESLint and JSDoc | |
run: | | |
#JavaScript style and documentation checks | |
cd platform/javascript | |
npm ci | |
npm run lint | |
npm run docs -- -d dry-run | |
- name: Documentation checks | |
run: | | |
doc/tools/make_rst.py --dry-run doc/classes modules |