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
38
37
39
38
- name : Add toolchain target
40
39
run : rustup target add ${{ matrix.target }}
41
- if : contains(matrix.target, 'gnullvm') == false
42
-
43
- - name : Add nightly toolchain with gnullvm target
44
- run : |
45
- rustup default ${{ matrix.version }}
46
- rustup target add ${{ matrix.target }}
47
- if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
48
40
49
41
- name : Install gcc-mingw-w64-x86-64
50
42
run : sudo apt-get install -y gcc-mingw-w64-x86-64
@@ -57,20 +49,20 @@ jobs:
57
49
- name : LLVM MinGW toolchain cache configuration
58
50
id : cache-llvm-mingw-toolchain
59
51
uses : actions/cache@v4
60
- if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
52
+ if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm')
61
53
with :
62
54
path : ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}
63
55
key : ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}
64
56
65
57
- name : Install LLVM MinGW toolchain
66
- if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly' && steps.cache-llvm-mingw-toolchain.outputs.cache-hit != 'true'
58
+ if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && steps.cache-llvm-mingw-toolchain.outputs.cache-hit != 'true'
67
59
run : |
68
60
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
69
61
tar -xf ${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}.tar.xz
70
62
echo "${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}/bin" >> $GITHUB_PATH
71
63
72
64
- name : Add LLVM MinGW toolchain to PATH
73
- if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
65
+ if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm')
74
66
run : |
75
67
echo "${{ env.LLVM-MINGW-TOOLCHAIN-NAME }}/bin" >> $GITHUB_PATH
76
68
81
73
if (-Not (Resolve-Path "target/*/debug/deps/test_win32-*.exe" | Test-Path)) {
82
74
throw "Failed to find test_win32 executable."
83
75
}
84
- if : contains(matrix.target, 'gnullvm') == false
85
-
86
- - name : Test gnullvm
87
- shell : pwsh
88
- run : |
89
- cargo test --no-run --target ${{ matrix.target }} -p test_win32
90
- if (-Not (Resolve-Path "target/*/debug/deps/test_win32-*.exe" | Test-Path)) {
91
- throw "Failed to find test_win32 executable."
92
- }
93
- if : startsWith(matrix.image, 'ubuntu-') && contains(matrix.target, 'gnullvm') && matrix.version == 'nightly'
0 commit comments