Skip to content

Commit 323d42f

Browse files
committed
Harden CI artifact packaging and Docker wait
1 parent 509f60c commit 323d42f

1 file changed

Lines changed: 19 additions & 8 deletions

File tree

.github/workflows/build-nabla.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
Set-MpPreference -DisableArchiveScanning $true
5151
Set-MpPreference -DisableScanningMappedNetworkDrivesForFullScan $true
5252
53-
$maxAttempts = 12
53+
$maxAttempts = 24
5454
$delaySeconds = 5
5555
$dockerReady = $false
5656
@@ -299,13 +299,24 @@ jobs:
299299
tar -cvf "${{ steps.set-prefix.outputs.prefix }}-install.tar" ${{ env.install }}
300300
$sourceTar = "${{ steps.set-prefix.outputs.prefix }}-source.tar"
301301
$sourceList = "${{ steps.set-prefix.outputs.prefix }}-source-files.txt"
302-
$sourceFiles = @(
303-
rg --files -uu . `
304-
-g '*.c' -g '*.cc' -g '*.cpp' -g '*.cxx' `
305-
-g '*.h' -g '*.hh' -g '*.hpp' -g '*.hxx' `
306-
-g '*.inc' -g '*.inl' -g '*.ipp' -g '*.tpp' -g '*.ixx' `
307-
-g '!examples_tests/media/**' -g '!.git/**'
308-
)
302+
if (Get-Command rg -ErrorAction SilentlyContinue) {
303+
$sourceFiles = @(
304+
rg --files -uu . `
305+
-g '*.c' -g '*.cc' -g '*.cpp' -g '*.cxx' `
306+
-g '*.h' -g '*.hh' -g '*.hpp' -g '*.hxx' `
307+
-g '*.inc' -g '*.inl' -g '*.ipp' -g '*.tpp' -g '*.ixx' `
308+
-g '!examples_tests/media/**' -g '!.git/**'
309+
)
310+
}
311+
else {
312+
$sourceFiles = @(
313+
git ls-files --cached --recurse-submodules |
314+
Where-Object {
315+
$_ -match '\.(c|cc|cpp|cxx|h|hh|hpp|hxx|inc|inl|ipp|tpp|ixx)$' -and
316+
$_ -notlike 'examples_tests/media/*'
317+
}
318+
)
319+
}
309320
310321
if ($sourceFiles.Count -eq 0) {
311322
throw "No source-like files found for source artifact packaging."

0 commit comments

Comments
 (0)