blob: 88df0165cfd77ac933e40652540963c1fffb1b32 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
name: Check that Boost libraries were built
description: Check that Boost libraries were built
inputs:
boost-dir:
description: Boost directory
required: false
libraries:
description: Libraries to check
required: true
platform:
description: Target platform
required: false
default: x64
configuration:
description: Configuration to check
required: false
default: Debug
runs:
using: composite
steps:
- run: |
$boost_dir = '${{ inputs.boost-dir }}'
if (-not $boost_dir) {
$boost_dir = $env:BOOST_DIR
}
$libraries = '${{ inputs.libraries }}'
$libraries = $libraries.Split(' ')
$stagedir = Join-Path 'stage' '${{ inputs.platform }}' '${{ inputs.configuration }}'
$librarydir = Join-Path $boost_dir $stagedir 'lib'
function Get-FileStubs {
param(
[Parameter(Mandatory=$true)]
[string] $lib
)
if ($lib -eq 'test') {
"prg_exec_monitor","test_exec_monitor","unit_test_framework"
} else {
@($lib)
}
}
$files = @()
foreach ($lib in $libraries) {
$stubs = Get-FileStubs $lib
foreach ($stub in $stubs) {
$files += "${env:CI_LIB_PREFIX}boost_$stub${env:CI_LIB_EXT}"
}
}
$files = $files | Sort-Object
echo '----------------------------------------------------------------'
echo 'Expected files'
echo '----------------------------------------------------------------'
echo $files
echo ''
echo '----------------------------------------------------------------'
echo 'Actual files'
echo '----------------------------------------------------------------'
echo (Get-ChildItem $librarydir | Sort-Object Name).Name
$missing = @()
foreach ($file in $files) {
if (!(Test-Path (Join-Path $librarydir $file) -Type Leaf)) {
$missing += $file
}
}
if ($missing.Count -ne 0) {
throw "These libraries are missing: $($missing -join ', ')"
}
shell: pwsh
|