-
-
Notifications
You must be signed in to change notification settings - Fork 85
162 lines (155 loc) · 6.48 KB
/
build.yml
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
name: Builds
on:
push:
pull_request:
env:
# From https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk#download-icon-step-3-install-wdk
WDK_INSTALLER_URL: "https://go.microsoft.com/fwlink/?linkid=2249371"
jobs:
test-msvc-wine-linux:
runs-on: ubuntu-latest
steps:
- name: Install prerequisites
run: |
sudo dpkg --add-architecture i386 && sudo apt-get update
sudo apt-get install wine64 wine32 python3 msitools ca-certificates cmake ninja-build winbind meson
WINE=$(command -v wine64 || command -v wine || false)
$WINE wineboot
# Check https://gitlab.winehq.org/wine/wine/-/wikis/Wine-Mono#versions before updating the WINE package!
curl -s -L -O https://github.com/madewokherd/wine-mono/releases/download/wine-mono-8.1.0/wine-mono-8.1.0-x86.msi
$WINE msiexec /i wine-mono-8.1.0-x86.msi
- uses: actions/checkout@v4
- name: Download MSVC
run: |
WDK_INSTALLERS=$(./wdk-download.sh --cache /var/tmp/msvc-wine "$WDK_INSTALLER_URL")
echo Downloaded WDK installers to $WDK_INSTALLERS
./vsdownload.py --accept-license --dest $(pwd)/msvc --cache /var/tmp/msvc-wine --with-wdk-installers "$WDK_INSTALLERS"
./install.sh $(pwd)/msvc
- name: Test using the installed tools
run: |
HAVE_WDK=1 test/test.sh $(pwd)/msvc
# Intentionally not storing any artifacts with the downloaded tools;
# the installed files aren't redistributable!
test-msvc-wine-macos:
runs-on: macos-latest
steps:
- name: Install prerequisites
run: |
brew install wine-stable msitools cmake ninja meson
WINE=$(command -v wine64 || command -v wine || false)
$WINE wineboot
curl -s -L -O https://github.com/madewokherd/wine-mono/releases/download/wine-mono-9.0.0/wine-mono-9.0.0-x86.msi
$WINE msiexec /i wine-mono-9.0.0-x86.msi
- uses: actions/checkout@v4
- name: Download MSVC
run: |
./vsdownload.py --accept-license --dest $(pwd)/msvc
./install.sh $(pwd)/msvc
- name: Test using the installed tools
run: |
test/test.sh $(pwd)/msvc
# Intentionally not storing any artifacts with the downloaded tools;
# the installed files aren't redistributable!
test-clang-lld:
# Ubuntu 22.04 comes with Clang/LLD 14; at least 13 is required for providing
# __guard_eh_cont_table and __guard_eh_cont_count which are required with
# MSVC 2019 16.8 or newer.
# Since Clang 13, it's possible to point out the installed MSVC/WinSDK with
# the /winsysroot parameter. LLD also provides the same parameter since
# version 15. (For versions 13 and 14, this parameter can still be used
# for linking, as long as linking is done via Clang.)
runs-on: ubuntu-22.04
steps:
- name: Install prerequisites
run: |
sudo apt-get update && sudo apt-get install python3 msitools ca-certificates clang lld llvm cmake ninja-build
- name: Set up clang-cl/lld-link symlinks
run: |
if [ ! -e /usr/bin/clang-cl ]; then
sudo ln -s /usr/bin/clang /usr/bin/clang-cl
fi
if [ ! -e /usr/bin/lld-link ]; then
sudo ln -s /usr/bin/lld /usr/bin/lld-link
fi
- uses: actions/checkout@v4
- name: Download MSVC
run: |
./vsdownload.py --accept-license --dest $(pwd)/msvc
./install.sh $(pwd)/msvc
- name: Test using the installed tools
run: |
test/test-clang-cl.sh $(pwd)/msvc
# Intentionally not storing any artifacts with the downloaded tools;
# the installed files aren't redistributable!
test-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the main msvc-wine docker image
run: |
docker build -t msvc-wine -f Dockerfile .
- name: Test using the installed tools
run: |
docker build -f Dockerfile.hello .
- name: Test using the installation with Clang
run: |
docker build -f Dockerfile.clang .
# Intentionally not pushing the built docker images;
# the installed files aren't redistributable!
test-vsdownload-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Download MSVC
run: |
python vsdownload.py --accept-license --dest c:/msvc
- name: Inspect output
run: |
ls "c:/msvc/Windows Kits/10/Include/*/um/winnt.h"
ls "c:/msvc/VC/Tools/MSVC/*/include/intrin.h"
test-msvc-wine-versions:
runs-on: ubuntu-latest
steps:
- name: Install prerequisites
run: |
sudo dpkg --add-architecture i386 && sudo apt-get update
sudo apt-get install wine64 wine32 python3 msitools ca-certificates winbind
WINE=$(command -v wine64 || command -v wine || false)
$WINE wineboot
- uses: actions/checkout@v4
- name: Download MSVC 2017 latest
run: |
./vsdownload.py --accept-license --dest $(pwd)/msvc --major 15
./install.sh $(pwd)/msvc
./msvc/bin/x64/cl test/hello.c -Fehello.exe
rm -rf msvc
- name: Download MSVC 2019 latest
run: |
./vsdownload.py --accept-license --dest $(pwd)/msvc --major 16
./install.sh $(pwd)/msvc
./msvc/bin/x64/cl test/hello.c -Fehello.exe
rm -rf msvc
- name: Download MSVC 2017 specific version
run: |
./vsdownload.py --accept-license --dest $(pwd)/msvc --major 15 --msvc-version 15.5
./install.sh $(pwd)/msvc
./msvc/bin/x64/cl test/hello.c -Fehello.exe
rm -rf msvc
- name: Download MSVC 2019 specific version
run: |
./vsdownload.py --accept-license --dest $(pwd)/msvc --major 16 --msvc-version 16.0
./install.sh $(pwd)/msvc
./msvc/bin/x64/cl test/hello.c -Fehello.exe
rm -rf msvc
- name: Download MSVC 2022 specific version
run: |
./vsdownload.py --accept-license --dest $(pwd)/msvc --major 17 --msvc-version 17.0
./install.sh $(pwd)/msvc
./msvc/bin/x64/cl test/hello.c -Fehello.exe
rm -rf msvc
- name: Download MSVC 2022 with non-default SDK
run: |
./vsdownload.py --accept-license --dest $(pwd)/msvc --major 17 --sdk-version 10.0.26100
./install.sh $(pwd)/msvc
./msvc/bin/x64/cl test/hello.c -Fehello.exe
rm -rf msvc