66 package_name :
77 description : " Package name to build"
88 type : string
9+ packages_repository :
10+ description : " MSYS2 packages repository to build from"
11+ type : string
12+ default : " Windows-on-ARM-Experiments/MSYS2-packages"
13+ packages_branch :
14+ description : " MSYS2 packages branch to build from"
15+ type : string
16+ default : " woarm64"
17+ arch :
18+ description : " Architecture to build for"
19+ type : string
20+ default : " aarch64"
921 needs :
1022 description : " Parent workflow job dependencies"
1123 type : string
1224 dependencies :
1325 description : " Install additional dependencies"
1426 type : string
1527 default : " "
16- packages_repository :
17- description : " MSYS2 packages repository to build from"
28+ check :
29+ description : " Enable check step after the package is built"
30+ type : boolean
31+ default : false
32+ check_module :
33+ description : " Module to test"
1834 type : string
19- default : " Windows-on-ARM-Experiments/MSYS2-packages "
20- packages_branch :
21- description : " MSYS2 packages branch to build from "
35+ default : " "
36+ check_filter :
37+ description : " Test filter "
2238 type : string
23- default : " woarm64 "
39+ default : " "
2440
2541defaults :
2642 run :
2743 shell : msys2 {0}
2844
2945env :
3046 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47+ NO_CHECK : ${{ inputs.check && '0' || '1' }}
48+ NO_ARCHIVE : ${{ inputs.check && '1' || '0' }}
3149
3250jobs :
3351 build :
3452 name : Build ${{ inputs.package_name }}
3553 runs-on : windows-latest
54+ timeout-minutes : 720
3655
3756 steps :
3857 - uses : msys2/setup-msys2@v2
@@ -42,14 +61,24 @@ jobs:
4261 - name : Checkout repository
4362 uses : actions/checkout@v4
4463
64+ - name : Checkout ${{ inputs.packages_repository }} repository
65+ uses : actions/checkout@v4
66+ with :
67+ repository : ${{ inputs.packages_repository }}
68+ ref : ${{ inputs.packages_branch }}
69+ sparse-checkout : ${{ inputs.package_name }}
70+ path : ${{ github.workspace }}/packages
71+
4572 - name : Install dependencies
4673 run : |
4774 pacman -S --noconfirm \
4875 git \
4976 mingw-w64-x86_64-github-cli \
5077 mingw-w64-x86_64-jq \
5178 base-devel \
52- ${{ contains(inputs.packages_repository, 'MINGW') && 'mingw-w64-cross-gcc mingw-w64-x86_64-ccache' || ' ccache' }} \
79+ ccache \
80+ ${{ contains(inputs.packages_repository, 'MINGW') && format('{0}-{1}-{2}', 'mingw-w64', inputs.arch, 'gcc')|| '' }} \
81+ ${{ inputs.check && 'dejagnu' || '' }} \
5382 ${{ inputs.dependencies }}
5483
5584 - name : Download artifacts
@@ -67,13 +96,10 @@ jobs:
6796 run : |
6897 `cygpath "${{ github.workspace }}"`/.github/scripts/pthread-headers-hack-before.sh
6998
70- - name : Checkout ${{ inputs.packages_repository }} repository
71- uses : actions/checkout@v4
72- with :
73- repository : ${{ inputs.packages_repository }}
74- ref : ${{ inputs.packages_branch }}
75- sparse-checkout : ${{ inputs.package_name }}
76- path : ${{ github.workspace }}/packages
99+ - name : Patch Dejagnu
100+ if : ${{ inputs.check }}
101+ run : |
102+ `cygpath "${{ github.workspace }}"`/.github/scripts/patch-dejagnu.sh
77103
78104 - name : Enable Ccache
79105 id : enable-ccache
87113 key : main-ccache-${{ steps.enable-ccache.outputs.timestamp }}
88114 restore-keys : main-ccache-
89115
90- - name : Build ${{ inputs.package_name }}
116+ - name : Build ${{ inputs.check && 'and test' || '' }} ${{ inputs. package_name }}
91117 working-directory : ${{ github.workspace }}/packages/${{ inputs.package_name }}
92118 run : |
93119 ccache -svv || true
@@ -102,12 +128,21 @@ jobs:
102128 key : main-ccache-${{ steps.enable-ccache.outputs.timestamp }}
103129
104130 - name : Upload ${{ inputs.package_name }}
131+ if : ${{ !inputs.check }}
105132 uses : actions/upload-artifact@v4
106133 with :
107134 name : ${{ inputs.package_name }}
108135 retention-days : 1
109136 path : ${{ github.workspace }}/packages/${{ inputs.package_name }}/*.pkg.tar.zst
110137
138+ - name : Upload ${{ inputs.package_name }} test results
139+ if : ${{ inputs.check }}
140+ uses : actions/upload-artifact@v4
141+ with :
142+ name : ${{ inputs.package_name }}-tests
143+ retention-days : 14
144+ path : ${{ github.workspace }}/packages/${{ inputs.package_name }}/src/test-results
145+
111146 - name : Upload build folder
112147 if : failure()
113148 uses : actions/upload-artifact@v4
0 commit comments