Skip to content

Commit 3819160

Browse files
committed
fixup! CI: add a GHA for doing a basic build test
Call msys2-tests composite workflows to run tests using built artifacts. Signed-off-by: Jeremy Drake <[email protected]>
1 parent 2817697 commit 3819160

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/build.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: build
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
build:
710
runs-on: windows-latest
@@ -34,3 +37,59 @@ jobs:
3437
with:
3538
name: install
3639
path: _dest/
40+
41+
generate-msys2-tests-matrix:
42+
runs-on: ubuntu-latest
43+
outputs:
44+
matrix: ${{ steps.matrix.outputs.matrix }}
45+
steps:
46+
- id: matrix
47+
uses: msys2/msys2-tests/gha-matrix-gen@main
48+
49+
msys2-tests:
50+
needs: [build, generate-msys2-tests-matrix]
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
include: ${{ fromJson(needs.generate-msys2-tests-matrix.outputs.matrix) }}
55+
56+
name: msys2-tests ${{ matrix.msystem }}-${{ matrix.cc }}
57+
runs-on: ${{ matrix.runner }}
58+
env:
59+
CC: ${{ matrix.cc }}
60+
CXX: ${{ matrix.cxx }}
61+
FC: ${{ matrix.fc }}
62+
steps:
63+
- id: msys2
64+
uses: msys2/setup-msys2@v2
65+
with:
66+
msystem: ${{ matrix.msystem }}
67+
update: true
68+
install: ${{ matrix.packages }}
69+
70+
- name: Add staging repo
71+
shell: msys2 {0}
72+
run: |
73+
sed -i '1s|^|[staging]\nServer = https://repo.msys2.org/staging/\nSigLevel = Never\n|' /etc/pacman.conf
74+
75+
- name: Update using staging
76+
shell: pwsh
77+
run: |
78+
msys2 -c 'pacman --noconfirm -Suuy'
79+
$ErrorActionPreference = 'Stop'
80+
$PSNativeCommandUseErrorActionPreference = $true
81+
msys2 -c 'pacman --noconfirm -Suu'
82+
83+
- name: Download msys2-runtime artifact
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: install
87+
path: ${{ steps.msys2.outputs.msys2-location }}
88+
89+
- name: uname -a
90+
shell: msys2 {0}
91+
run: uname -a
92+
93+
- name: Run tests
94+
uses: msys2/msys2-tests@main
95+

0 commit comments

Comments
 (0)