Skip to content

Update GitHub actions to v4. #754

Update GitHub actions to v4.

Update GitHub actions to v4. #754

Workflow file for this run

name: Wine-Mono CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Remove packages require EULA
run: sudo apt remove msodbcsql17 linux-azure linux-cloud-tools-azure linux-headers-azure linux-image-azure linux-tools-azure -y 1>&2
- name: Install Wine
run: |
sudo apt-get update 1>&2
sudo apt install --install-recommends wine64 wine64-tools -y 1>&2
- name: Install Mono Build Dependencies
run: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF 1>&2
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update 1>&2
sudo apt-get install libtool-bin gettext cmake libgdiplus zip g++ -y 1>&2
- name: Check Environment
run: |
gcc --version 1>&2
g++ --version 1>&2
wine --version 1>&2
mono --version 1>&2
ld --version 1>&2
cmake --version 1>&2
man libtool | tail -1 1>&2
- name: make
run: make -j$(nproc)
- name: msi capture
uses: actions/upload-artifact@v4
with:
name: make msi output
path: wine-mono-*.msi
- name: bin capture
uses: actions/upload-artifact@v4
with:
name: make bin output
path: wine-mono-*-x86.tar.xz
- name: tests-zip capture
uses: actions/upload-artifact@v4
with:
name: make tests-zip output
path: wine-mono-*-tests.zip
- name: dbgsym capture
uses: actions/upload-artifact@v4
with:
name: make dbgsym output
path: wine-mono-*-dbgsym.tar.xz
- name: Check for unnecessary rebuild steps
run: |
make -n image
make -q image
- name: Check for untracked files
run: |
! (git clean -nd|grep .)
- name: Test make clean
run: |
make clean
! find build
! find tests
! find image
windows-test:
runs-on: windows-latest
needs: build
steps:
- name: Install XNA4
shell: cmd
run: |
curl https://download.microsoft.com/download/A/C/2/AC2C903B-E6E8-42C2-9FD7-BEBAC362A930/xnafx40_redist.msi --output xna4.msi
msiexec /q /i xna4.msi
- name: Download Wine Mono tests
uses: actions/download-artifact@v4
with:
name: make tests-zip output
- name: Run Wine Mono tests
shell: cmd
run: |
for %%z in (wine-mono-*-tests.zip) do tar -xf %%z
tests\run-tests.exe -pass-list:tests\github-windows-passing.txt -fail-list:tests\github-windows-failing.txt
linux-test:
runs-on: ubuntu-22.04
needs: build
steps:
- name: Remove packages require EULA
run: sudo apt remove msodbcsql17 linux-azure linux-cloud-tools-azure linux-headers-azure linux-image-azure linux-tools-azure -y 1>&2
- name: Install Wine
run: |
sudo dpkg --add-architecture i386 1>&2
wget -nc https://dl.winehq.org/wine-builds/winehq.key 1>&2
sudo apt-key add winehq.key 1>&2
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ jammy main' 1>&2
sudo apt update 1>&2
sudo apt remove -y libnginx-mod-http-image-filter || true
sudo apt remove -y nginx nginx-core || true
sudo apt install -y --allow-downgrades libgd3:i386=2.3.0-2ubuntu2 libgd3:i386=2.3.0-2ubuntu2 || true
sudo apt install --install-recommends -y --allow-downgrades winehq-devel wine-devel wine-devel-i386 libgphoto2-6:i386 libsane:i386 libgd3:i386 wine-devel-amd64 libgphoto2-6 libsane libgcc-s1:i386 libstdc++6:i386 libatomic1:i386
- name: Download Wine Mono msi
uses: actions/download-artifact@v4
with:
name: make msi output
- name: Install Wine Mono msi
run: wine msiexec /i wine-mono-*.msi 1>&2
- name: Install Wine Gecko
run: |
GECKO_VERSION=2.47.4
wget -nc "https://dl.winehq.org/wine/wine-gecko/${GECKO_VERSION}/wine-gecko-${GECKO_VERSION}-x86.msi" -O wine-gecko-${GECKO_VERSION}-x86.msi
wine msiexec /i wine-gecko-${GECKO_VERSION}-x86.msi
wget -nc "https://dl.winehq.org/wine/wine-gecko/${GECKO_VERSION}/wine-gecko-${GECKO_VERSION}-x86_64.msi" -O wine-gecko-${GECKO_VERSION}-x86_64.msi
wine msiexec /i wine-gecko-${GECKO_VERSION}-x86_64.msi
- name: Run 64-bit Wine mscoree tests
run: |
wget -nc 'https://gitlab.winehq.org/wine/wine/-/jobs/artifacts/master/raw/winetest64.exe?job=build-daily-winetest' -O winetest64.exe
wine64 winetest64.exe -x winetest64 >/dev/null
wine64 winetest64/mscoree_test.exe --list 2>/dev/null|sed 's/\r//'|tail -n +2|while read testname; do
echo BEGIN 64-BIT $testname TEST 1>&2
WINETEST_REPORT_SUCCESS=1 WINEDEBUG=mscoree WINE_MONO_TRACE=x timeout -v 300 wine64 winetest64/mscoree_test.exe $testname 1>&2 || printf 'mscoree:%s 64-bit test failed\n' $testname >> tests-failed
echo END 64-BIT $testname TEST >&2
done
- name: Run 32-bit Wine mscoree tests
run: |
wget -nc 'https://gitlab.winehq.org/wine/wine/-/jobs/artifacts/master/raw/winetest.exe?job=build-daily-winetest' -O winetest.exe
wine winetest.exe -x winetest >/dev/null
wine winetest/mscoree_test.exe --list 2>/dev/null|sed 's/\r//'|tail -n +2|while read testname; do
echo BEGIN 32-BIT $testname TEST 1>&2
WINETEST_REPORT_SUCCESS=1 WINEDEBUG=mscoree WINE_MONO_TRACE=x timeout -v 300 wine winetest/mscoree_test.exe $testname 1>&2 || printf 'mscoree:%s 32-bit test failed\n' $testname >> tests-failed
echo END 32-BIT $testname TEST 1>&2
done
- name: Install Test Dependencies
run: |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt install xvfb libgl1-mesa-glx libgl1-mesa-glx:i386 libgl1:i386 libglx-mesa0:i386 libgl1-mesa-dri:i386 unzip ttf-mscorefonts-installer openbox x11-utils -y 1>&2
- name: Download Wine Mono tests
uses: actions/download-artifact@v4
with:
name: make tests-zip output
- name: Run Wine Mono tests
run: |
unzip wine-mono-*-tests.zip 1>&2
Xvfb :2 & 1>&2
export DISPLAY=:2
while ! xdpyinfo; do sleep 1; jobs 1 || exit 1; done
openbox & 1>&2
wine reg add 'HKCU\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 0 /f 1>&2
wine64 tests/run-tests.exe -fail-list:tests/github-wine-failing.txt 1>&2 || printf 'Wine Mono tests failed\n' >> tests-failed
- name: Check for test failures
run: |
if test -f tests-failed; then
cat tests-failed
exit 1
fi
mac-test:
runs-on: macos-latest
needs: build
steps:
- name: Install Wine
run: |
brew update-reset
brew update
brew install coreutils # for gtimeout
brew install --cask --no-quarantine wine@devel
- name: Download Wine Mono msi
uses: actions/download-artifact@v4
with:
name: make msi output
- name: Install Wine Mono msi
run: wine msiexec /i wine-mono-*.msi 1>&2
- name: Run 64-bit Wine mscoree tests
run: |
wget -nc 'https://gitlab.winehq.org/wine/wine/-/jobs/artifacts/master/raw/winetest64.exe?job=build-daily-winetest' -O winetest64.exe
wine winetest64.exe -x winetest64 >/dev/null
wine winetest64/mscoree_test.exe --list 2>/dev/null|sed 's/.$//'|tail -n +2|while read testname; do
echo BEGIN $testname TEST 1>&2
WINETEST_REPORT_SUCCESS=1 WINEDEBUG=mscoree WINE_MONO_TRACE=x gtimeout -v 300 wine winetest64/mscoree_test.exe $testname 1>&2 || printf 'mscoree:%s 64-bit test failed\n' $testname >> tests-failed
echo END $testname TEST 1>&2
done
if test -f tests-failed; then
cat tests-failed
exit 1
fi
- name: Run 32-bit Wine mscoree tests
run: |
wget -nc 'https://gitlab.winehq.org/wine/wine/-/jobs/artifacts/master/raw/winetest.exe?job=build-daily-winetest' -O winetest.exe
wine winetest.exe -x winetest
wine winetest/mscoree_test.exe --list 2>/dev/null|sed 's/.$//'|tail -n +2|while read testname; do
echo BEGIN $testname TEST
WINETEST_REPORT_SUCCESS=1 WINEDEBUG=mscoree WINE_MONO_TRACE=x gtimeout -v 300 wine winetest/mscoree_test.exe $testname || printf 'mscoree:%s 32-bit test failed\n' $testname >> tests-failed
echo END $testname TEST
done
if test -f tests-failed; then
cat tests-failed
exit 1
fi
- name: Download Wine Mono tests
uses: actions/download-artifact@v4
with:
name: make tests-zip output
- name: Run Wine Mono tests
run: |
unzip wine-mono-*-tests.zip 1>&2
wine reg add 'HKCU\Software\Wine\WineDbg' /v ShowCrashDialog /t REG_DWORD /d 0 /f
wine tests/run-tests.exe -fail-list:tests/github-wine-failing.txt -fail-list:tests/github-macos-failing.txt