Skip to content

Commit

Permalink
Add raw-dylib testing with nightly-i686-pc-windows-gnu (#2312)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr authored Feb 2, 2023
1 parent 1a056c8 commit f3c923c
Showing 1 changed file with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion .github/workflows/raw_dylib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,63 @@ jobs:
- target: x86_64-pc-windows-msvc
- target: i686-pc-windows-msvc
- target: x86_64-pc-windows-gnu
- target: i686-pc-windows-gnu
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Update toolchain
run: rustup update --no-self-update nightly && rustup default nightly-${{ matrix.target }}

- name: Add toolchain target
run: rustup target add ${{ matrix.target }}


- name: Configure Cargo for GNU toolchain
shell: pwsh
run: |
Add-Content $env:USERPROFILE\.cargo\config @"
[target.x86_64-pc-windows-gnu]
linker = `"C:\\msys64\\mingw64\\bin\\x86_64-w64-mingw32-gcc.exe`"
ar = `"C:\\msys64\\mingw64\\bin\\ar.exe`"
[target.i686-pc-windows-gnu]
linker = `"C:\\msys64\\mingw32\\bin\\i686-w64-mingw32-gcc.exe`"
ar = `"C:\\msys64\\mingw32\\bin\\ar.exe`"
"@
if: contains(matrix.target, 'windows-gnu')

- name: Configure environment
shell: pwsh
run: |
switch -Wildcard ("${{ matrix.target }}")
{
"i686-pc-windows-gnu"
{
"C:\msys64\mingw32\bin" >> $env:GITHUB_PATH
}
"x86_64-pc-windows-gnu"
{
"C:\msys64\mingw64\bin" >> $env:GITHUB_PATH
}
"i686*"
{
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x86" >> $env:GITHUB_PATH
((Resolve-Path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\*\bin\Hostx86\x86")
| Sort-Object -Descending | Select -First 1).ToString() >> $env:GITHUB_PATH
}
"x86_64*"
{
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64" >> $env:GITHUB_PATH
((Resolve-Path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\*\bin\Hostx64\x64")
| Sort-Object -Descending | Select -First 1).ToString() >> $env:GITHUB_PATH
}
"*"
{
(Join-Path $env:GITHUB_WORKSPACE "target\debug\deps").ToString() >> $env:GITHUB_PATH
(Join-Path $env:GITHUB_WORKSPACE "target\test\debug\deps").ToString() >> $env:GITHUB_PATH
"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" `
>> $env:GITHUB_ENV
}
}
- name: Test
run: cargo test -p test_calling_convention

0 comments on commit f3c923c

Please sign in to comment.