28
28
# https://sourceforge.net/p/mingw-w64/wiki2/Exception%20Handling
29
29
#
30
30
image : [macos-latest, ubuntu-latest]
31
- version : [stable, nightly]
32
31
target : [x86_64-pc-windows-gnu, aarch64-pc-windows-gnullvm, x86_64-pc-windows-gnullvm, i686-pc-windows-gnullvm]
33
32
runs-on : ${{ matrix.image }}
34
33
41
40
42
41
- name : Add toolchain target
43
42
run : rustup target add ${{ matrix.target }}
44
- if : contains(matrix.target, 'gnullvm') == false
45
-
46
- - name : Add nightly toolchain with gnullvm target
47
- run : |
48
- rustup default ${{ matrix.version }}
49
- rustup target add ${{ matrix.target }}
50
- if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
51
43
52
44
- name : Install gcc-mingw-w64-x86-64
53
45
run : sudo apt-get install -y gcc-mingw-w64-x86-64
@@ -60,20 +52,20 @@ jobs:
60
52
- name : LLVM MinGW toolchain cache configuration
61
53
id : cache-llvm-mingw-toolchain
62
54
uses : actions/cache@v4
63
- if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
55
+ if : contains(matrix.target, 'gnullvm')
64
56
with :
65
57
path : ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}
66
58
key : ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}
67
59
68
60
- name : Install LLVM MinGW toolchain
69
- if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly' && steps.cache-llvm-mingw-toolchain.outputs.cache-hit != 'true'
61
+ if : contains(matrix.target, 'gnullvm') && steps.cache-llvm-mingw-toolchain.outputs.cache-hit != 'true'
70
62
run : |
71
63
curl -L -o ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}.tar.xz https://github.com/mstorsjo/llvm-mingw/releases/download/20220906/${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}.tar.xz
72
64
tar -xf ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}.tar.xz
73
65
echo "${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}/bin" >> $GITHUB_PATH
74
66
75
67
- name : Add LLVM MinGW toolchain to PATH
76
- if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
68
+ if : contains(matrix.target, 'gnullvm')
77
69
run : |
78
70
echo "${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}/bin" >> $GITHUB_PATH
79
71
84
76
if (-Not (Resolve-Path "target/*/debug/deps/test_win32-*.exe" | Test-Path)) {
85
77
throw "Failed to find test_win32 executable."
86
78
}
87
- if : contains(matrix.target, 'gnullvm') == false
88
-
89
- - name : Test gnullvm
90
- shell : pwsh
91
- run : |
92
- cargo test --no-run --target ${{ matrix.target }} -p test_win32
93
- if (-Not (Resolve-Path "target/*/debug/deps/test_win32-*.exe" | Test-Path)) {
94
- throw "Failed to find test_win32 executable."
95
- }
96
- if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
0 commit comments