52
52
os : windows-2022
53
53
features : " "
54
54
target : " x86_64-pc-windows-msvc"
55
+ - rust : stable-x86_64-gnu
56
+ os : windows-2022
57
+ features : " "
58
+ target : " x86_64-pc-windows-gnullvm"
55
59
steps :
56
60
- name : Checkout sources
57
61
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
73
77
toolchain : " ${{matrix.rust}}"
74
78
targets : " ${{ matrix.target }}"
75
79
if : matrix.os == 'windows-2022'
80
+ - name : install llvm-mingw
81
+ run : |
82
+ curl -L -o llvm-mingw.zip https://github.com/mstorsjo/llvm-mingw/releases/download/20250709/llvm-mingw-20250709-ucrt-x86_64.zip
83
+ unzip llvm-mingw.zip -d llvm-mingw
84
+ echo "CARGO_TARGET_X86_64_PC_WINDOWS_GNULLVM_LINKER=$(pwd)/llvm-mingw/llvm-mingw-20250709-ucrt-x86_64/bin/x86_64-w64-mingw32-clang.exe" >> $GITHUB_ENV
85
+ if : matrix.target == 'x86_64-pc-windows-gnullvm'
76
86
- name : target
77
87
run : " rustc -vV | sed -n 's|host: ||p'"
78
88
if : matrix.os != 'windows-2022'
82
92
tool : cargo-llvm-cov,cargo-nextest
83
93
- name : cargo build
84
94
run : cargo build --target ${{matrix.target}} ${{ matrix.features }}
95
+ env :
96
+ CARGO_TARGET_X86_64_PC_WINDOWS_GNULLVM_LINKER : " llvm-mingw/llvm-mingw-20250709-ucrt-x86_64/bin/x86_64-w64-mingw32-clang.exe"
85
97
- name : cargo build (no_std)
86
98
run : cargo rustc --target ${{matrix.target}} -p libbz2-rs-sys --lib --no-default-features --crate-type rlib
87
99
env :
@@ -96,10 +108,18 @@ jobs:
96
108
env :
97
109
RUST_BACKTRACE : 1
98
110
- name : cargo nextest
99
- if : matrix.os == 'windows-2022'
111
+ if : matrix.target == 'x86_64-pc-windows-gnullvm'
112
+ run : cargo test --target ${{matrix.target}} ${{ matrix.features }} --no-fail-fast
113
+ env :
114
+ RUST_BACKTRACE : 1
115
+ CARGO_TARGET_X86_64_PC_WINDOWS_GNULLVM_LINKER : " llvm-mingw/llvm-mingw-20250709-ucrt-x86_64/bin/x86_64-w64-mingw32-clang.exe"
116
+ PATH : " ${{ github.workspace }}/llvm-mingw/llvm-mingw-20250709-ucrt-x86_64/bin:${{ runner.env.PATH }}"
117
+ - name : cargo nextest
118
+ if : matrix.os == 'windows-2022' && matrix.target != 'x86_64-pc-windows-gnullvm'
100
119
run : cargo nextest run --target ${{matrix.target}} ${{ matrix.features }} --no-fail-fast
101
120
env :
102
121
RUST_BACKTRACE : 1
122
+ CARGO_TARGET_X86_64_PC_WINDOWS_GNULLVM_LINKER : " llvm-mingw/llvm-mingw-20250709-ucrt-x86_64/bin/x86_64-w64-mingw32-clang.exe"
103
123
- name : Upload coverage to Codecov
104
124
uses : codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
105
125
if : matrix.os != 'windows-2022' && matrix.rust == 'stable'
0 commit comments