1818 description : " Architecture to build on"
1919 type : string
2020 default : " x86_64"
21+ cross :
22+ description : " Use MSYS2 -> MINGW cross-compiler"
23+ type : boolean
24+ default : false
2125 needs :
2226 description : " Parent workflow job dependencies"
2327 type : string
2428 dependencies :
2529 description : " Install additional dependencies"
2630 type : string
2731 default : " "
32+ check :
33+ description : " Enable check step after the package is built"
34+ type : boolean
35+ default : false
36+ check_module :
37+ description : " Module to test"
38+ type : string
39+ default : " "
40+ check_filter :
41+ description : " Test filter"
42+ type : string
43+ default : " "
2844
2945defaults :
3046 run :
3147 shell : msys2 {0}
3248
3349env :
3450 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35- CROSS_BUILD : ${{ inputs.runner_arch == 'aarch64' && '1' || '0' }}
51+ CROSS_BUILD : ${{ inputs.cross && '1' || '0' }}
3652 CLEAN_BUILD : 1
53+ NO_CHECK : ${{ inputs.check && '0' || '1' }}
54+ NO_ARCHIVE : ${{ inputs.check && '1' || '0' }}
55+ MODULE : ${{ inputs.check_module }}
56+ FILTER : ${{ inputs.check_filter }}
3757
3858jobs :
3959 build :
4060 name : Build ${{ inputs.package_name }}
4161 runs-on : >-
4262 ${{ fromJson(inputs.runner_arch == 'aarch64'
4363 && '["Windows", "ARM64", "Blackhex"]'
44- || '["windows-latest"]') }}
64+ || (inputs.check && '["Windows", "X64", "GCC"]' || '["windows-latest"]')
65+ ) }}
66+ timeout-minutes : ${{ inputs.check && 720 || 180 }}
4567
4668 steps :
4769 - name : Kill hanging processes
48- if : ${{ inputs.runner_arch == 'aarch64' }}
70+ if : ${{ inputs.runner_arch == 'aarch64' || inputs.check }}
4971 shell : powershell
5072 run : |
5173 tasklist
6284 git config --global core.longpaths true
6385
6486 - name : Fix $PATH
65- if : ${{ inputs.runner_arch == 'aarch64' }}
87+ if : ${{ inputs.runner_arch == 'aarch64' || inputs.check }}
6688 shell : powershell
6789 run : |
6890 Write-Output "GITHUB_PATH: $env:GITHUB_PATH"
@@ -114,14 +136,15 @@ jobs:
114136
115137 - name : Install dependencies
116138 run : >-
117- pacman -S --noconfirm
118- git
119- mingw-w64-x86_64-github-cli
120- mingw-w64-x86_64-jq
121- base-devel
122- ${{ contains(inputs.packages_repository, 'MINGW')
139+ pacman -S --noconfirm \
140+ git \
141+ mingw-w64-x86_64-github-cli \
142+ mingw-w64-x86_64-jq \
143+ base-devel \
144+ ${{ ( contains(inputs.packages_repository, 'MINGW') && inputs.cross )
123145 && 'mingw-w64-cross-mingwarm64-gcc mingw-w64-cross-mingwarm64-windows-default-manifest mingw-w64-x86_64-gcc-libs'
124- || 'mingw-w64-aarch64-gcc' }}
146+ || 'mingw-w64-aarch64-gcc' }} \
147+ ${{ inputs.check && 'dejagnu' || '' }} \
125148 ${{ inputs.dependencies }}
126149
127150 - name : Download artifacts
@@ -139,6 +162,11 @@ jobs:
139162 run : |
140163 `cygpath "${{ github.workspace }}"`/.github/scripts/pthread-headers-hack-before.sh
141164
165+ - name : Patch Dejagnu
166+ if : ${{ inputs.check }}
167+ run : |
168+ `cygpath "${{ github.workspace }}"`/.github/scripts/patch-dejagnu.sh
169+
142170 - name : Setup MINGWARM64 environment
143171 if : ${{ inputs.runner_arch == 'aarch64' }}
144172 run : |
@@ -156,7 +184,7 @@ jobs:
156184 key : ${{ inputs.package_name }}-ccache-${{ steps.enable-ccache.outputs.timestamp }}
157185 restore-keys : ${{ inputs.package_name }}-
158186
159- - name : Build ${{ inputs.package_name }}
187+ - name : Build ${{ inputs.check && 'and test' || '' }} ${{ inputs. package_name }}
160188 working-directory : ${{ github.workspace }}/packages/${{ inputs.package_name }}
161189 run : |
162190 `cygpath "${{ github.workspace }}"`/.github/scripts/build-package.sh ${{ inputs.packages_repository }}
@@ -169,12 +197,21 @@ jobs:
169197 key : ${{ inputs.package_name }}-ccache-${{ steps.enable-ccache.outputs.timestamp }}
170198
171199 - name : Upload ${{ inputs.package_name }}
200+ if : ${{ !inputs.check }}
172201 uses : actions/upload-artifact@v4
173202 with :
174203 name : ${{ inputs.package_name }}
175204 retention-days : 7
176205 path : ${{ github.workspace }}/packages/${{ inputs.package_name }}/*.pkg.tar.zst
177206
207+ - name : Upload ${{ inputs.package_name }} test results
208+ if : ${{ inputs.check }}
209+ uses : actions/upload-artifact@v4
210+ with :
211+ name : ${{ inputs.package_name }}-test-results
212+ retention-days : 14
213+ path : ${{ github.workspace }}/packages/${{ inputs.package_name }}/src/test-results
214+
178215 - name : Upload build folder
179216 if : failure()
180217 uses : actions/upload-artifact@v4
0 commit comments