blob: a15e574379bfa78cedb8e53485ec160ff32dd19a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
id = 2291
title = "building qemu with msys2 mingw64 in github actions, sed error unterminated address regex"
state = "opened"
created_at = "2024-04-18T12:17:50.194Z"
closed_at = "n/a"
labels = ["Build System", "hostos: Windows", "workflow::Needs Info"]
url = "https://gitlab.com/qemu-project/qemu/-/issues/2291"
host-os = "Windows"
host-arch = "X86"
qemu-version = "all"
guest-os = "n/a"
guest-arch = "n/a"
description = """in Github Actions (Windows)
```
$ make --trace -j $(nproc)
ninja: no work to do.
/d/a/qemu_app/qemu_app/qemu/BUILD/pyvenv/bin/meson introspect --targets --tests --benchmarks | D:/a/qemu_app/qemu_app/qemu/BUILD/pyvenv/bin/python3.exe -B scripts/mtest2make.py > Makefile.mtest
D:\\a\\_temp\\msys64\\mingw64\\bin\\sed.exe: -e expression #1, char 41: unterminated address regex
D:\\a\\_temp\\msys64\\mingw64\\bin\\sed.exe: -e expression #1, char 41: unterminated address regex
```"""
reproduce = """```sh
# enable symlinks in msys2 MINGW64 shell
export MSYS=winsymlinks:native
# download and extract qemu
curl -L https://download.qemu.org/qemu-9.0.0-rc4.tar.xz -O
tar xvJf qemu-9.0.0-rc4.tar.xz
mv qemu-9.0.0-rc4 qemu
# remove symlinks known to cause `git add` to fail, we will recreate these later in the yaml file
/usr/bin/rm -f qemu/roms/edk2/EmulatorPkg/Unix/Host/X11IncludeHack
/usr/bin/rm -f qemu/roms/skiboot/opal-ci/build-debian-unstable.sh
/usr/bin/rm -f qemu/roms/skiboot/opal-ci/build-fedora-rawhide.sh
/usr/bin/rm -f qemu/roms/u-boot/board/xilinx/zynq/zynq-cse-nand
/usr/bin/rm -f qemu/roms/u-boot/board/xilinx/zynqmp/avnet-ultra96-rev1
/usr/bin/rm -f qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-g-a2197-00-revA
/usr/bin/rm -f qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-m-a2197-01-revA
/usr/bin/rm -f qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-m-a2197-03-revA
/usr/bin/rm -f qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-mini
/usr/bin/rm -f qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-mini-emmc0
/usr/bin/rm -f qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-mini-emmc1
/usr/bin/rm -f qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-mini-qspi
/usr/bin/rm -f qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-p-a2197-00-revA
/usr/bin/rm -f qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-zcu104-revC
/usr/bin/rm -f qemu/roms/u-boot/include/ctype.h
/usr/bin/rm -f qemu/roms/u-boot/tools/binman/binman
/usr/bin/rm -f qemu/roms/u-boot/tools/dtoc/dtoc
/usr/bin/rm -f qemu/roms/u-boot/tools/microcode-tool
/usr/bin/rm -f qemu/roms/u-boot/tools/patman/patman
/usr/bin/rm -f qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/almalinux-8-prep.sh
/usr/bin/rm -f qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/alpine-317-prep.sh
/usr/bin/rm -f qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/alpine-edge-prep.sh
/usr/bin/rm -f qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/fedora-37-prep.sh
/usr/bin/rm -f qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/fedora-38-prep.sh
/usr/bin/rm -f qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/fedora-rawhide-prep.sh
# push qemu to github to test
git init
git add -Av
git commit -m "qemu fail"
git branch -M main
git remote add origin < a url to a newly created git repo to test the qemu build which currently fails with sed error >
git push origin
```
```yaml
# save this in the following file: .github/workflows/windows.yaml
# Job execution time - Each job in a workflow can run for up to 6 hours of execution time.
# Workflow run time - Each workflow run is limited to 35 days
name: windows
on:
push:
branches: [ "main" ]
workflow_dispatch:
defaults:
run:
shell: msys2 {0}
# each job runs under a NEW image
jobs:
build_qemu:
strategy:
matrix:
include:
- os: windows-latest
name: windows
sys: MINGW64
runs-on: ${{ matrix.os }}
name: build qemu - ${{ matrix.name }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
ref: ${{needs.should_run.outputs.output1}}
submodules: recursive
- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
path-type: strict
- name: update packages
run: |
pacman -Sy
- name: install qemu deps
run: |
# https://github.com/qemu/qemu/blob/master/.gitlab-ci.d/windows.yml#L84
pacman -S --noconfirm --needed pactoys
pacman -S --noconfirm --needed bison flex git
pacboy -S --noconfirm --needed make:p cmake:p gcc:p meson:p autotools:p ninja:p python:p python-sphinx:p python-sphinx_rtd_theme:p tools-git:p angleproject:p capstone:p curl:p cyrus-sasl:p dtc:p expat:p fontconfig:p freetype:p fribidi:p gcc-libs:p gdk-pixbuf2:p gettext:p glib2:p gmp:p gnutls:p graphite2:p gst-plugins-base:p gstreamer:p gtk3:p harfbuzz:p jbigkit:p lerc:p libc++:p libdatrie:p libdeflate:p libepoxy:p libffi:p libiconv:p libidn2:p libjpeg-turbo:p libnfs:p libpng:p libpsl:p libslirp:p libssh:p libssh2:p libtasn1:p libthai:p libtiff:p libunistring:p libunwind:p libusb:p libwebp:p libwinpthread-git:p lz4:p lzo2:p nettle:p openssl:p opus:p orc:p p11-kit:p pango:p pixman:p SDL2:p SDL2_image:p snappy:p spice:p usbredir:p xz:p zlib:p zstd:p brotli:p bzip2:p nghttp2 diffutils grep make sed:p binutils:p capstone:p curl:p cyrus-sasl:p dtc:p gcc:p glib2:p gnutls:p gtk3:p libgcrypt:p libjpeg-turbo:p libnfs:p libpng:p libssh:p libtasn1:p libusb:p lzo2:p nettle:p ninja:p pixman:p pkgconf:p python:p SDL2:p SDL2_image:p snappy:p spice:p usbredir:p zstd:p
- name: restore symlinks
run: |
export MSYS=winsymlinks:native
ln -s /opt/X11/include qemu/roms/edk2/EmulatorPkg/Unix/Host/X11IncludeHack
ln -s build-ubuntu-latest.sh qemu/roms/skiboot/opal-ci/build-debian-unstable.sh
ln -s build-fedora33.sh qemu/roms/skiboot/opal-ci/build-fedora-rawhide.sh
ln -s zynq-zc770-xm011 qemu/roms/u-boot/board/xilinx/zynq/zynq-cse-nand
ln -s zynqmp-zcu100-revC qemu/roms/u-boot/board/xilinx/zynqmp/avnet-ultra96-rev1
ln -s zynqmp-a2197-revA qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-g-a2197-00-revA
ln -s zynqmp-a2197-revA qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-m-a2197-01-revA
ln -s zynqmp-a2197-revA qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-m-a2197-03-revA
ln -s zynqmp-zcu102-rev1.0 qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-mini
ln -s zynqmp-zcu100-revC qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-mini-emmc0
ln -s zynqmp-zcu102-rev1.0 qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-mini-emmc1
ln -s zynqmp-zcu102-rev1.0 qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-mini-qspi
ln -s zynqmp-a2197-revA qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-p-a2197-00-revA
ln -s zynqmp-zcu104-revA qemu/roms/u-boot/board/xilinx/zynqmp/zynqmp-zcu104-revC
ln -s linux/ctype.h qemu/roms/u-boot/include/ctype.h
ln -s main.py qemu/roms/u-boot/tools/binman/binman
ln -s main.py qemu/roms/u-boot/tools/dtoc/dtoc
ln -s microcode-tool.py qemu/roms/u-boot/tools/microcode-tool
ln -s main.py qemu/roms/u-boot/tools/patman/patman
ln -s centos-stream-8-prep.sh qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/almalinux-8-prep.sh
ln -s alpine-prep.sh qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/alpine-317-prep.sh
ln -s alpine-prep.sh qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/alpine-edge-prep.sh
ln -s fedora-prep.sh qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/fedora-37-prep.sh
ln -s fedora-prep.sh qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/fedora-38-prep.sh
ln -s fedora-prep.sh qemu/tests/lcitool/libvirt-ci/ci/gitlab/all_mappings_prep_env/fedora-rawhide-prep.sh
# we dont use split.exe since we need only fails the build and need not upload the results
# there is no use in caching the build directory since ../configure will cause a full rebuild
# and we are lazy to detect an existing Makefile
- name: cmake configure qemu - Release
run: |
export MSYS=winsymlinks:native
cd qemu
mkdir BUILD || true
mkdir BUILD/BUILD_ROOT || true
cd BUILD
ls -l
# this should succeed
../configure --prefix=$(pwd)/BUILD_ROOT --enable-sdl --enable-gtk --disable-user --target-list=x86_64-softmmu --enable-whpx
- name: cmake build qemu - Release
run: |
export MSYS=winsymlinks:native
cd qemu/BUILD
ls -l
cat -n Makefile
# this should fail with sed.exe: -e expression #1, char 41: unterminated address regex
make --trace -j $(nproc)
```"""
additional = """https://github.com/mgood7123/qemu_app/actions/runs/8732163169/job/23958798258
note `make` `succeeds` (returns 0) but does not build anything due to sed error
qemu folder is https://download.qemu.org/qemu-9.0.0-rc4.tar.xz
symlinks incompatible with `git add` have been removed and then recreated in GHA"""
|