3333 if : ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }}
3434 outputs :
3535 version : ${{ steps.version.outputs.value }}
36- should_run : ${{ steps.check_static_analysis.outputs.should_run }}
3736
3837 steps :
3938 - name : Checkout repository
4443 id : version
4544 run : |
4645 echo "value=$(python3 -u scripts/utils.py --version)" >>$GITHUB_OUTPUT
47- - name : Check if static analysis is required
48- id : check_static_analysis
49- run : |
50- if python3 -u scripts/run_static_analysis.py --check-changed-files; then
51- echo "should_run=false" >> $GITHUB_OUTPUT
52- else
53- echo "should_run=true" >> $GITHUB_OUTPUT
54- fi
5546 - name : Remove artifacts
5647 uses : swift-project/delete-artifact@swift
5748 with :
7263 uses : actions/checkout@v4
7364 with :
7465 fetch-depth : ' 0'
66+ submodules : ' true'
7567 - name : Install gitlint
7668 run : |
7769 pip install gitlint==0.19.1
@@ -114,29 +106,28 @@ jobs:
114106 uses : actions/upload-pages-artifact@v3
115107 with :
116108 path : docs/html/
117-
118- staticAnalysis :
119- runs-on : ubuntu-22.04
120- needs : [ preBuild, checks ]
121- if : ${{ needs.preBuild.outputs.should_run == 'true' }}
122- steps :
109+ - name : Check if clang-tidy analysis is required
110+ id : check_need_clang_tidy
111+ run : |
112+ if python3 -u scripts/run_static_analysis.py --check-changed-files; then
113+ echo "should_run_clang_tidy=false" >> $GITHUB_OUTPUT
114+ else
115+ echo "should_run_clang_tidy=true" >> $GITHUB_OUTPUT
116+ fi
123117 - name : Install Qt
118+ if : ${{ steps.check_need_clang_tidy.outputs.should_run_clang_tidy == 'true' }}
124119 uses : jurplel/install-qt-action@v4
125120 with :
126121 version : ${{ env.qt_version }}
127122 modules : ' qtmultimedia'
128123 cache : true
129124 - name : Install dependencies
125+ if : ${{ steps.check_need_clang_tidy.outputs.should_run_clang_tidy == 'true' }}
130126 run : |
131127 sudo apt-get -y install dbus-x11 libglu1-mesa-dev libpulse-dev libdbus-1-dev ninja-build
132128 pip3 install requests conan
133- - name : Checkout repository
134- uses : actions/checkout@v4
135- with :
136- submodules : true
137- fetch-depth : 0
138129 - name : Checkout externals
139- if : ${{ env.use_externals == 'true' }}
130+ if : ${{ env.use_externals == 'true' && steps.check_need_clang_tidy.outputs.should_run_clang_tidy == 'true' }}
140131 uses : actions/checkout@v4
141132 env :
142133 EXTERNALS_PAT : ${{ secrets.EXTERNALS_PAT }}
@@ -146,6 +137,7 @@ jobs:
146137 token : ${{ env.EXTERNALS_PAT }}
147138 path : ' third_party/externals'
148139 - name : Install conan dependencies
140+ if : ${{ steps.check_need_clang_tidy.outputs.should_run_clang_tidy == 'true' }}
149141 shell : bash
150142 env :
151143 ARTIFACTORY_USER : ${{ secrets.ARTIFACTORY_USER }}
@@ -157,6 +149,7 @@ jobs:
157149 conan remote login swift "$ARTIFACTORY_USER" --password "$ARTIFACTORY_TOKEN"
158150 conan install . --output-folder=build_conan --deployer=full_deploy -pr=ci/profile_linux
159151 - name : Run clang-tidy
152+ if : ${{ steps.check_need_clang_tidy.outputs.should_run_clang_tidy == 'true' }}
160153 shell : bash
161154 run : |
162155 mkdir build && pushd build
@@ -166,7 +159,7 @@ jobs:
166159
167160 buildLinux :
168161 runs-on : ubuntu-22.04
169- needs : [preBuild, checks, staticAnalysis ]
162+ needs : [preBuild, checks]
170163 env :
171164 BACKTRACE_SYMBOL_TOKEN : ${{ secrets.BACKTRACE_SYMBOL_TOKEN }}
172165 BACKTRACE_MINIDUMP_TOKEN : ${{ secrets.BACKTRACE_MINIDUMP_TOKEN }}
@@ -270,7 +263,7 @@ jobs:
270263
271264 buildWin64 :
272265 runs-on : windows-2022
273- needs : [preBuild, checks, staticAnalysis ]
266+ needs : [preBuild, checks]
274267 env :
275268 BACKTRACE_SYMBOL_TOKEN : ${{ secrets.BACKTRACE_SYMBOL_TOKEN }}
276269 BACKTRACE_MINIDUMP_TOKEN : ${{ secrets.BACKTRACE_MINIDUMP_TOKEN }}
@@ -381,7 +374,7 @@ jobs:
381374
382375 buildMacOS :
383376 runs-on : macos-13
384- needs : [preBuild, checks, staticAnalysis ]
377+ needs : [preBuild, checks]
385378 env :
386379 BACKTRACE_SYMBOL_TOKEN : ${{ secrets.BACKTRACE_SYMBOL_TOKEN }}
387380 BACKTRACE_MINIDUMP_TOKEN : ${{ secrets.BACKTRACE_MINIDUMP_TOKEN }}
@@ -490,7 +483,7 @@ jobs:
490483
491484 postBuild :
492485 runs-on : ubuntu-22.04
493- needs : [preBuild, checks, staticAnalysis, buildLinux, buildWin64, buildMacOS]
486+ needs : [preBuild, checks, buildLinux, buildWin64, buildMacOS]
494487
495488 steps :
496489 - name : Download xswiftbus-thin
0 commit comments