Skip to content

Commit f3c923c

Browse files
authored
Add raw-dylib testing with nightly-i686-pc-windows-gnu (#2312)
1 parent 1a056c8 commit f3c923c

1 file changed

Lines changed: 51 additions & 1 deletion

File tree

.github/workflows/raw_dylib.yml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,63 @@ jobs:
2020
- target: x86_64-pc-windows-msvc
2121
- target: i686-pc-windows-msvc
2222
- target: x86_64-pc-windows-gnu
23+
- target: i686-pc-windows-gnu
2324
steps:
2425
- name: Checkout
2526
uses: actions/checkout@v3
27+
2628
- name: Update toolchain
2729
run: rustup update --no-self-update nightly && rustup default nightly-${{ matrix.target }}
30+
2831
- name: Add toolchain target
2932
run: rustup target add ${{ matrix.target }}
30-
33+
34+
- name: Configure Cargo for GNU toolchain
35+
shell: pwsh
36+
run: |
37+
Add-Content $env:USERPROFILE\.cargo\config @"
38+
[target.x86_64-pc-windows-gnu]
39+
linker = `"C:\\msys64\\mingw64\\bin\\x86_64-w64-mingw32-gcc.exe`"
40+
ar = `"C:\\msys64\\mingw64\\bin\\ar.exe`"
41+
[target.i686-pc-windows-gnu]
42+
linker = `"C:\\msys64\\mingw32\\bin\\i686-w64-mingw32-gcc.exe`"
43+
ar = `"C:\\msys64\\mingw32\\bin\\ar.exe`"
44+
"@
45+
if: contains(matrix.target, 'windows-gnu')
46+
47+
- name: Configure environment
48+
shell: pwsh
49+
run: |
50+
switch -Wildcard ("${{ matrix.target }}")
51+
{
52+
"i686-pc-windows-gnu"
53+
{
54+
"C:\msys64\mingw32\bin" >> $env:GITHUB_PATH
55+
}
56+
"x86_64-pc-windows-gnu"
57+
{
58+
"C:\msys64\mingw64\bin" >> $env:GITHUB_PATH
59+
}
60+
"i686*"
61+
{
62+
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86" >> $env:GITHUB_PATH
63+
((Resolve-Path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\*\bin\Hostx86\x86")
64+
| Sort-Object -Descending | Select -First 1).ToString() >> $env:GITHUB_PATH
65+
}
66+
"x86_64*"
67+
{
68+
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64" >> $env:GITHUB_PATH
69+
((Resolve-Path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\*\bin\Hostx64\x64")
70+
| Sort-Object -Descending | Select -First 1).ToString() >> $env:GITHUB_PATH
71+
}
72+
"*"
73+
{
74+
(Join-Path $env:GITHUB_WORKSPACE "target\debug\deps").ToString() >> $env:GITHUB_PATH
75+
(Join-Path $env:GITHUB_WORKSPACE "target\test\debug\deps").ToString() >> $env:GITHUB_PATH
76+
"INCLUDE=C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" `
77+
>> $env:GITHUB_ENV
78+
}
79+
}
80+
3181
- name: Test
3282
run: cargo test -p test_calling_convention

0 commit comments

Comments
 (0)