@@ -40,25 +40,44 @@ jobs:
40
40
needs : Test-Scripts
41
41
strategy :
42
42
matrix :
43
- bitness : ['x86', 'x64']
43
+ config : [x86, x64, x64-standalone]
44
+ build-type : [system]
45
+ include :
46
+ - { config: x64-standalone, build-type: user }
44
47
steps :
45
48
46
49
- name : Checkout
47
50
uses : actions/checkout@v2
48
51
49
- - name : Build ${{ matrix.bitness }}
52
+ - name : Setup MSYS2
53
+ uses : msys2/setup-msys2@v2
54
+
55
+ - name : Check OpenOCD repository
56
+ shell : pwsh
57
+ run : |
58
+ $OpenOCDCommit = ((Get-Content .\config\repositories.json | ConvertFrom-Json).repositories | Where-Object { $_.href -like '*openocd.git' } | ForEach-Object { git ls-remote $_.href $_.tree }).Split("`t")[0]
59
+ $Bitness = (Get-Content .\config\${{ matrix.config }}.json | ConvertFrom-Json).bitness
60
+ Add-Content -Path $env:GITHUB_ENV -Value "OPENOCD_BUILD_ID=openocd-$OpenOCDCommit-$Bitness"
61
+
62
+ - name : Cache OpenOCD build
63
+ uses : actions/cache@v3
64
+ with :
65
+ path : build/openocd-install
66
+ key : ${{ env.OPENOCD_BUILD_ID }}
67
+
68
+ - name : Build ${{ matrix.config }} (${{ matrix.build-type }})
50
69
shell : pwsh
51
70
run : |
52
71
Set-StrictMode -Version Latest
53
72
$ErrorActionPreference = 'Stop'
54
73
$ProgressPreference = 'SilentlyContinue'
55
74
56
- .\build.ps1 .\config\${{ matrix.bitness }}.json -MSYS2Path C:\msys64
75
+ .\build.ps1 .\config\${{ matrix.config }}.json -MSYS2Path (msys2 -c 'cygpath -m /').TrimEnd('\/') -SkipSigning -Compression zlib -BuildType ${{ matrix.build-type }}
57
76
58
77
- name : Upload build artifacts
59
78
uses : actions/upload-artifact@v2
60
79
with :
61
- name : Package-${{ matrix.bitness }}
80
+ name : Package-${{ matrix.config }}-${{ matrix.build-type }}
62
81
path : bin/
63
82
64
83
Test-Installer :
67
86
strategy :
68
87
fail-fast : false
69
88
matrix :
70
- bitness : ['x86', 'x64']
71
- winver : ['2019', '2022']
89
+ winver : ['2022']
90
+ config : [x64, x64-standalone]
91
+ build-type : [system]
92
+ include :
93
+ - { winver: '2022', config: x64-standalone, build-type: user }
72
94
steps :
73
95
74
96
- name : Checkout
@@ -77,10 +99,10 @@ jobs:
77
99
- name : Download installer artifact
78
100
uses : actions/download-artifact@v2
79
101
with :
80
- name : Package-${{ matrix.bitness }}
102
+ name : Package-${{ matrix.config }}-${{ matrix.build-type }}
81
103
path : bin
82
104
83
- - name : Test installer
105
+ - name : Test ${{ matrix.config }} (${{ matrix.build-type }})
84
106
shell : pwsh
85
107
run : docker run --rm -v "$(Get-Location):C:\repo" mcr.microsoft.com/windows/servercore:ltsc${{ matrix.winver }}
86
108
powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "cd C:\repo; .\tests\setup.ps1"
89
111
uses : actions/upload-artifact@v2
90
112
if : ${{ always() }}
91
113
with :
92
- name : Installer-Logs-Windows-${{ matrix.winver }}-${{ matrix.bitness }}
114
+ name : Installer-Logs-Windows-${{ matrix.winver }}-${{ matrix.config }}-${{ matrix.build-type }}
93
115
path : logs/
0 commit comments