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' }}
49+ MODULE : ${{ inputs.check_module }}
50+ FILTER : ${{ inputs.check_filter }}
3151
3252jobs :
3353 build :
3454 name : Build ${{ inputs.package_name }}
3555 runs-on : windows-latest
56+ timeout-minutes : 720
3657
3758 steps :
3859 - uses : msys2/setup-msys2@v2
@@ -42,14 +63,24 @@ jobs:
4263 - name : Checkout repository
4364 uses : actions/checkout@v4
4465
66+ - name : Checkout ${{ inputs.packages_repository }} repository
67+ uses : actions/checkout@v4
68+ with :
69+ repository : ${{ inputs.packages_repository }}
70+ ref : ${{ inputs.packages_branch }}
71+ sparse-checkout : ${{ inputs.package_name }}
72+ path : ${{ github.workspace }}/packages
73+
4574 - name : Install dependencies
4675 run : |
4776 pacman -S --noconfirm \
4877 git \
4978 mingw-w64-x86_64-github-cli \
5079 mingw-w64-x86_64-jq \
5180 base-devel \
52- ${{ contains(inputs.packages_repository, 'MINGW') && 'mingw-w64-cross-gcc mingw-w64-x86_64-ccache' || ' ccache' }} \
81+ ccache \
82+ ${{ contains(inputs.packages_repository, 'MINGW') && format('{0}-{1}-{2}', 'mingw-w64', inputs.arch, 'gcc')|| '' }} \
83+ ${{ inputs.check && 'dejagnu' || '' }} \
5384 ${{ inputs.dependencies }}
5485
5586 - name : Download artifacts
@@ -67,13 +98,10 @@ jobs:
6798 run : |
6899 `cygpath "${{ github.workspace }}"`/.github/scripts/pthread-headers-hack-before.sh
69100
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
101+ - name : Patch Dejagnu
102+ if : ${{ inputs.check }}
103+ run : |
104+ `cygpath "${{ github.workspace }}"`/.github/scripts/patch-dejagnu.sh
77105
78106 - name : Enable Ccache
79107 id : enable-ccache
87115 key : main-ccache-${{ steps.enable-ccache.outputs.timestamp }}
88116 restore-keys : main-ccache-
89117
90- - name : Build ${{ inputs.package_name }}
118+ - name : Build ${{ inputs.check && 'and test' || '' }} ${{ inputs. package_name }}
91119 working-directory : ${{ github.workspace }}/packages/${{ inputs.package_name }}
92120 run : |
93121 ccache -svv || true
@@ -102,12 +130,21 @@ jobs:
102130 key : main-ccache-${{ steps.enable-ccache.outputs.timestamp }}
103131
104132 - name : Upload ${{ inputs.package_name }}
133+ if : ${{ !inputs.check }}
105134 uses : actions/upload-artifact@v4
106135 with :
107136 name : ${{ inputs.package_name }}
108137 retention-days : 1
109138 path : ${{ github.workspace }}/packages/${{ inputs.package_name }}/*.pkg.tar.zst
110139
140+ - name : Upload ${{ inputs.package_name }} test results
141+ if : ${{ inputs.check }}
142+ uses : actions/upload-artifact@v4
143+ with :
144+ name : ${{ inputs.package_name }}-test-results
145+ retention-days : 14
146+ path : ${{ github.workspace }}/packages/${{ inputs.package_name }}/src/test-results
147+
111148 - name : Upload build folder
112149 if : failure()
113150 uses : actions/upload-artifact@v4
0 commit comments