Skip to content

Commit b5fa896

Browse files
authored
Merge branch 'master' into MinyazevR-use-system-box2D
2 parents b1aeda0 + 90af964 commit b5fa896

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

.github/workflows/common_build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: ./.github/workflows/setup_environment.yml
4141
with:
4242
os: ubuntu-latest
43-
lint: true
43+
lint_vera: true
4444
build: false
4545
build_installer: false
4646

@@ -93,6 +93,7 @@ jobs:
9393
build_installer: false
9494
qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=use_system_box2D CONFIG+=use_system_qscintilla2 CONFIG+=use_system_quazip"
9595
trik_python3_version_minor: 10
96+
lint_clazy: true
9697

9798
build-ubuntu-debug-tests:
9899
needs: lint

.github/workflows/setup_environment.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ on:
1010
required: false
1111
type: string
1212
default: "time"
13-
lint:
13+
lint_vera:
14+
required: false
15+
type: boolean
16+
default: false
17+
lint_clazy:
1418
required: false
1519
type: boolean
1620
default: false
@@ -99,7 +103,7 @@ jobs:
99103
uses: actions/checkout@v4
100104
with:
101105
submodules: recursive
102-
fetch-depth: 0
106+
fetch-depth: 2
103107

104108
- name: Remove thirdparty submodules (use from libs from distro)
105109
run: |
@@ -127,11 +131,11 @@ jobs:
127131
INSTALL_INSTALLER_ENVIRONMENT: ${{ inputs.linux_installer_environment }}
128132
if: ${{ inputs.build }}
129133

130-
- name: Lint
134+
- name: Lint Vera
131135
run: |
132136
sudo apt-get update && sudo apt-get install -y --no-install-recommends qttools5-dev-tools qtbase5-dev vera++
133137
${{ inputs.executor }} buildScripts/github/vera_translation.sh
134-
if: ${{ inputs.lint }}
138+
if: ${{ inputs.lint_vera }}
135139

136140
- name: Restore cache
137141
uses: actions/cache@v4
@@ -155,6 +159,7 @@ jobs:
155159
CONFIG: ${{ inputs.config }}
156160
EXECUTOR: ${{ inputs.executor }}
157161
QMAKE_EXTRA: ${{ inputs.qmake_extra }}
162+
NEED_COMPILE_DATABASE: ${{ inputs.lint_clazy }}
158163
if: ${{ inputs.build }}
159164

160165
- name: Save build cache
@@ -171,6 +176,17 @@ jobs:
171176
TESTS: ${{ inputs.tests }}
172177
if: ${{ inputs.build == true }}
173178

179+
- name: Clazy-standalone
180+
uses: MinyazevR/clazy-standalone-action@v0.3.2
181+
with:
182+
checks: 'level0,level1,level2'
183+
database: './compile_commands.json'
184+
fail-on-warning: true
185+
install-stable: true
186+
only-diff: true
187+
ignore-dirs: '^(buildScripts|thirdparty|installer)$'
188+
if: ${{ inputs.lint_clazy }}
189+
174190
- name: Build Installer
175191
run: |
176192
buildScripts/github/build_installer.sh

buildScripts/github/build_internal.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ rm -f .qmake.cache
1515
qmake -Wall PYTHON_VERSION=3.$TRIK_PYTHON3_VERSION_MINOR PYTHON_PATH=/usr CONFIG+=$CONFIG $QMAKE_EXTRA $PROJECT.pro
1616
make -j $(nproc) qmake_all 2>&1 | tee -a build.log
1717
ccache -s
18-
make -j $(nproc) all 2>&1 | tee -a build.log
18+
if [ "$NEED_COMPILE_DATABASE" = "true" ]; then
19+
bear -- make -j $(nproc) all 2>&1 | tee -a build.log
20+
else
21+
make -j $(nproc) all 2>&1 | tee -a build.log
22+
fi
1923
ccache -s
2024
ls bin

0 commit comments

Comments
 (0)