Add black/pylint to github actions

This commit is contained in:
tntexplosivesltd 2023-11-22 23:15:16 +13:00
parent e97e20bb6a
commit d6e91be015
2 changed files with 21 additions and 9 deletions

View File

@ -38,7 +38,7 @@ jobs:
build/ISLE.PDB
build/LEGO1.DLL
build/LEGO1.PDB
compare:
needs: build
runs-on: windows-latest
@ -96,7 +96,7 @@ jobs:
shell: bash
run: |
python3 tools/verexp/verexp.py legobin/LEGO1.DLL build/LEGO1.DLL
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
@ -104,7 +104,7 @@ jobs:
path: |
ISLEPROGRESS.*
LEGO1PROGRESS.*
upload:
needs: [build, compare]
runs-on: ubuntu-latest
@ -113,16 +113,16 @@ jobs:
- uses: actions/checkout@v3
with:
repository: 'probonopd/uploadtool'
- uses: actions/download-artifact@master
with:
name: Win32
path: build
- uses: actions/download-artifact@master
with:
name: Accuracy Report
- name: Upload Continuous Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@ -133,6 +133,6 @@ jobs:
build/LEGO1.DLL \
ISLEPROGRESS.* \
LEGO1PROGRESS.*
curl -X POST -F key=$UPLOAD_KEY -F 'file=@ISLEPROGRESS.SVG' https://legoisland.org/progress/
curl -X POST -F key=$UPLOAD_KEY -F 'file=@LEGO1PROGRESS.SVG' https://legoisland.org/progress/

View File

@ -3,12 +3,24 @@ name: Format
on: [push, pull_request]
jobs:
clang-format:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build isledecomp library
shell: bash
run: |
pip install black pylint tools/isledecomp
- name: Run pylint and black
shell: bash
run: |
pip install -r tools/reccmp/requirements.txt
pylint tools
black --check tools
- name: Run clang-format
run: |
pipx run "clang-format>=17,<18" \
@ -19,4 +31,4 @@ jobs:
LEGO1/*.cpp LEGO1/*.h \
LEGO1/realtime/*.cpp LEGO1/realtime/*.h \
LEGO1/tgl/*.h \
LEGO1/viewmanager/*.cpp LEGO1/viewmanager/*.h
LEGO1/viewmanager/*.cpp LEGO1/viewmanager/*.h