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,21 @@ 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 : |
113
+ echo "llvm-mingw/llvm-mingw-20250709-ucrt-x86_64/bin" >> "$GITHUB_PATH"
114
+ echo "llvm-mingw/llvm-mingw-20250709-ucrt-x86_64/lib" >> "$GITHUB_PATH"
115
+ echo "llvm-mingw/llvm-mingw-20250709-ucrt-x86_64/armv7-w64-mingw32/bin" >> "$GITHUB_PATH"
116
+ cargo test --target ${{matrix.target}} ${{ matrix.features }} --no-fail-fast
117
+ env :
118
+ RUST_BACKTRACE : 1
119
+ CARGO_TARGET_X86_64_PC_WINDOWS_GNULLVM_LINKER : " llvm-mingw/llvm-mingw-20250709-ucrt-x86_64/bin/x86_64-w64-mingw32-clang.exe"
120
+ - name : cargo nextest
121
+ if : matrix.os == 'windows-2022' && matrix.target != 'x86_64-pc-windows-gnullvm'
100
122
run : cargo nextest run --target ${{matrix.target}} ${{ matrix.features }} --no-fail-fast
101
123
env :
102
124
RUST_BACKTRACE : 1
125
+ CARGO_TARGET_X86_64_PC_WINDOWS_GNULLVM_LINKER : " llvm-mingw/llvm-mingw-20250709-ucrt-x86_64/bin/x86_64-w64-mingw32-clang.exe"
103
126
- name : Upload coverage to Codecov
104
127
uses : codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
105
128
if : matrix.os != 'windows-2022' && matrix.rust == 'stable'
0 commit comments