Debian Codegraph @

.github/workflows/msys2.yml

raw
1 name: msys2
2
3 concurrency:
4 group: msys2-${{ github.head_ref || github.ref }}
5 cancel-in-progress: true
6
7 on:
8 push:
9 branches:
10 - master
11 # Stable branches such as 0.56 or 1.0
12 - '[0-9]+.[0-9]+'
13 paths:
14 - "mesonbuild/**"
15 - "test cases/**"
16 - "unittests/**"
17 - ".github/workflows/msys2.yml"
18 - "run*tests.py"
19 pull_request:
20 paths:
21 - "mesonbuild/**"
22 - "test cases/**"
23 - "unittests/**"
24 - ".github/workflows/msys2.yml"
25 - "run*tests.py"
26
27 permissions:
28 contents: read
29
30 jobs:
31 test:
32 runs-on: windows-2022
33 name: ${{ matrix.NAME }}
34 strategy:
35 fail-fast: false
36 matrix:
37 include:
38 - NAME: gccx86ninja
39 MSYSTEM: MINGW32
40 MSYS2_ARCH: i686
41 MSYS2_CURSES: ncurses
42 COMPILER: gcc
43 TOOLCHAIN: toolchain
44 - NAME: gccx64ninja
45 MSYSTEM: MINGW64
46 MSYS2_ARCH: x86_64
47 MSYS2_CURSES: pdcurses
48 COMPILER: gcc
49 TOOLCHAIN: toolchain
50 - NAME: clangx64ninja
51 MSYSTEM: MINGW64
52 MSYS2_ARCH: x86_64
53 MSYS2_CURSES:
54 COMPILER: clang
55 TOOLCHAIN: clang
56 env:
57 MESON_CI_JOBNAME: msys2-${{ matrix.NAME }}
58
59 defaults:
60 run:
61 shell: msys2 {0}
62
63 steps:
64 - uses: actions/checkout@v4
65
66 - uses: msys2/setup-msys2@v2
67 with:
68 msystem: ${{ matrix.MSYSTEM }}
69 update: true
70 install: >-
71 base-devel
72 git
73 mercurial
74 lcov
75 wget
76 unzip
77 mingw-w64-${{ matrix.MSYS2_ARCH }}-cmake
78 mingw-w64-${{ matrix.MSYS2_ARCH }}-glib2
79 mingw-w64-${{ matrix.MSYS2_ARCH }}-libxml2
80 mingw-w64-${{ matrix.MSYS2_ARCH }}-ninja
81 mingw-w64-${{ matrix.MSYS2_ARCH }}-pkg-config
82 mingw-w64-${{ matrix.MSYS2_ARCH }}-python
83 mingw-w64-${{ matrix.MSYS2_ARCH }}-python-lxml
84 mingw-w64-${{ matrix.MSYS2_ARCH }}-python-setuptools
85 mingw-w64-${{ matrix.MSYS2_ARCH }}-python-pip
86 mingw-w64-${{ matrix.MSYS2_ARCH }}-python-fastjsonschema
87 mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.MSYSTEM != 'MINGW32' && 'objfw' || 'ninja' }}
88 mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.MSYSTEM != 'MINGW32' && 'llvm' || 'ninja' }}
89 mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.TOOLCHAIN }}
90
91 - name: Install dependencies
92 run: |
93 python3 -m pip --disable-pip-version-check install gcovr pefile pytest pytest-subtests pytest-xdist
94
95 - name: Install pypy3 on x86_64
96 run: |
97 mkdir pypy3local
98 pushd pypy3local
99 wget -nv https://downloads.python.org/pypy/pypy3.8-v7.3.9-win64.zip
100 unzip pypy3.8-v7.3.9-win64.zip
101 mv pypy3.8-v7.3.9-win64/* ./
102 popd
103 if: ${{ matrix.MSYS2_ARCH == 'x86_64' }}
104
105 - name: Run Tests
106 run: |
107 if [[ "${{ matrix.MSYS2_ARCH }}" == "x86_64" ]]; then
108 # There apparently is no clean way to add to the PATH in the
109 # previous step?
110 # See for instance https://github.com/msys2/setup-msys2/issues/171
111 export PATH=$PATH:$PWD/pypy3local
112 # Make sure it is on the PATH
113 pypy3 -c "import sys; print(sys.version)"
114 fi
115 export PATHEXT="$PATHEXT;.py"
116
117 if [[ '${{ matrix.COMPILER }}' == 'clang' ]]; then
118 export CC=clang
119 export CXX=clang++
120 export OBJC=clang
121 export OBJCXX=clang++
122 fi
123
124 if [[ "${{ matrix.MSYS2_CURSES }}" != "" ]]; then
125 pacman --noconfirm --needed -S mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.MSYS2_CURSES }}
126 fi
127
128 MSYSTEM= python3 ./run_tests.py --backend=ninja
129
130 - uses: actions/upload-artifact@v4
131 with:
132 name: ${{ matrix.NAME }}
133 path: meson-test-run.*