Add clazy action #12
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: 🧪Clazy checks | |
on: | |
push: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get deps | |
run: | | |
sudo apt-get install \ | |
cmake \ | |
ninja-build \ | |
clang \ | |
qtbase5-dev \ | |
qt5keychain-dev \ | |
qtscript5-dev \ | |
qtwebengine5-dev | |
- name: Configure | |
run: | | |
mkdir -p build | |
cd build | |
cmake -GNinja \ | |
-Do2_BUILD_EXAMPLES:BOOL=ON \ | |
-Do2_WITH_TESTS=ON \ | |
-Do2_SHOW_TRACE:BOOL=ON \ | |
-Do2_WITH_DROPBOX:BOOL=ON \ | |
-Do2_WITH_FACEBOOK:BOOL=ON \ | |
-Do2_WITH_FLICKR:BOOL=ON \ | |
-Do2_WITH_GOOGLE:BOOL=ON \ | |
-Do2_WITH_HUBIC:BOOL=ON \ | |
-Do2_WITH_KEYCHAIN:BOOL=ON \ | |
-Do2_WITH_MSGRAPH:BOOL=ON \ | |
-Do2_WITH_OAUTH1:BOOL=ON \ | |
-Do2_WITH_QT5:BOOL=ON \ | |
-Do2_WITH_SKYDRIVE:BOOL=ON \ | |
-Do2_WITH_SMUGMUG:BOOL=ON \ | |
-Do2_WITH_SPOTIFY:BOOL=ON \ | |
-Do2_WITH_SURVEYMONKEY:BOOL=ON \ | |
-Do2_WITH_TWITTER:BOOL=ON \ | |
-Do2_WITH_UBER:BOOL=ON \ | |
-Do2_WITH_VIMEO:BOOL=ON \ | |
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | |
.. | |
cd .. | |
- name: Clazy action | |
id: clazy | |
uses: ./.github/actions/clazy | |
with: | |
checks: 'level0,level1,old-style-connect,no-overloaded-signal' | |
install-stable: true | |
database: build | |
- name: Check debug output | |
run: | | |
echo "Debug log contents:" | |
cat /tmp/clazy-debug.log | |
echo "GITHUB_OUTPUT contents:" | |
cat $GITHUB_OUTPUT | |
- name: Check clazy output | |
run: | | |
echo "Full environment:" | |
env | |
echo "GitHub context:" | |
echo "${{ toJSON(github) }}" | |
echo "Step context:" | |
echo "${{ toJSON(steps.clazy) }}" | |
- name: Dump results | |
run: | | |
echo "Warnings count: ${{ steps.clazy.outputs.warnings-count }}" | |
echo "Errors count: ${{ steps.clazy.outputs.errors-count }}" | |
- name: Fail if warnings or errors exist | |
if: ${{ fromJSON(steps.clazy.outputs.warnings-count) > 0 || fromJSON(steps.clazy.outputs.errors-count) > 0 }} | |
run: exit 1 |