Add `raw-dylib` testing with `nightly-i686-pc-windows-gnu`
@@ -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
