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 : true
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 :
@@ -33,18 +49,24 @@ defaults:
3349env :
3450 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3551 CLEAN_BUILD : 1
52+ NO_CHECK : ${{ inputs.check && '0' || '1' }}
53+ NO_ARCHIVE : ${{ inputs.check && '1' || '0' }}
54+ MODULE : ${{ inputs.check_module }}
55+ FILTER : ${{ inputs.check_filter }}
3656
3757jobs :
3858 build :
3959 name : Build ${{ inputs.package_name }}
4060 runs-on : >-
4161 ${{ fromJson(inputs.runner_arch == 'aarch64'
4262 && '["Windows", "ARM64", "Blackhex"]'
43- || '["windows-latest"]') }}
63+ || (inputs.check && '["Windows", "X64", "GCC"]' || '["windows-latest"]')
64+ ) }}
65+ timeout-minutes : ${{ inputs.check && 720 || 180 }}
4466
4567 steps :
4668 - name : Kill hanging processes
47- if : ${{ inputs.runner_arch == 'aarch64' }}
69+ if : ${{ inputs.runner_arch == 'aarch64' || inputs.check }}
4870 shell : powershell
4971 run : |
5072 tasklist
6183 git config --global core.longpaths true
6284
6385 - name : Fix $PATH
64- if : ${{ inputs.runner_arch == 'aarch64' }}
86+ if : ${{ inputs.runner_arch == 'aarch64' || inputs.check }}
6587 shell : powershell
6688 run : |
6789 Write-Output "GITHUB_PATH: $env:GITHUB_PATH"
@@ -118,7 +140,10 @@ jobs:
118140 mingw-w64-x86_64-github-cli \
119141 mingw-w64-x86_64-jq \
120142 base-devel \
121- ${{ contains(inputs.packages_repository, 'MINGW') && 'mingw-w64-cross-mingwarm64-gcc mingw-w64-cross-mingwarm64-windows-default-manifest mingw-w64-x86_64-gcc-libs' || '' }} \
143+ ${{ (contains(inputs.packages_repository, 'MINGW') && inputs.cross)
144+ && 'mingw-w64-cross-mingwarm64-gcc mingw-w64-cross-mingwarm64-windows-default-manifest mingw-w64-x86_64-gcc-libs'
145+ || '' }} \
146+ ${{ inputs.check && 'dejagnu' || '' }} \
122147 ${{ inputs.dependencies }}
123148
124149 - name : Download artifacts
@@ -136,6 +161,11 @@ jobs:
136161 run : |
137162 `cygpath "${{ github.workspace }}"`/.github/scripts/pthread-headers-hack-before.sh
138163
164+ - name : Patch Dejagnu
165+ if : ${{ inputs.check }}
166+ run : |
167+ `cygpath "${{ github.workspace }}"`/.github/scripts/patch-dejagnu.sh
168+
139169 - name : Setup MINGWARM64 environment
140170 if : ${{ inputs.runner_arch == 'aarch64' }}
141171 run : |
@@ -153,7 +183,7 @@ jobs:
153183 key : ${{ inputs.package_name }}-ccache-${{ steps.enable-ccache.outputs.timestamp }}
154184 restore-keys : ${{ inputs.package_name }}-
155185
156- - name : Build ${{ inputs.package_name }}
186+ - name : Build ${{ inputs.check && 'and test' || '' }} ${{ inputs. package_name }}
157187 working-directory : ${{ github.workspace }}/packages/${{ inputs.package_name }}
158188 run : |
159189 `cygpath "${{ github.workspace }}"`/.github/scripts/build-package.sh ${{ inputs.packages_repository }}
@@ -166,12 +196,21 @@ jobs:
166196 key : ${{ inputs.package_name }}-ccache-${{ steps.enable-ccache.outputs.timestamp }}
167197
168198 - name : Upload ${{ inputs.package_name }}
199+ if : ${{ !inputs.check }}
169200 uses : actions/upload-artifact@v4
170201 with :
171202 name : ${{ inputs.package_name }}
172203 retention-days : 1
173204 path : ${{ github.workspace }}/packages/${{ inputs.package_name }}/*.pkg.tar.zst
174205
206+ - name : Upload ${{ inputs.package_name }} test results
207+ if : ${{ inputs.check }}
208+ uses : actions/upload-artifact@v4
209+ with :
210+ name : ${{ inputs.package_name }}-test-results
211+ retention-days : 14
212+ path : ${{ github.workspace }}/packages/${{ inputs.package_name }}/src/test-results
213+
175214 - name : Upload build folder
176215 if : failure()
177216 uses : actions/upload-artifact@v4
0 commit comments