forked from microsoft/windows-rs
140 lines (133 loc) · 6.94 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Test
on:
pull_request:
push:
branches:
- master
env:
RUSTFLAGS: -Dwarnings
jobs:
test:
name: Test
runs-on: windows-latest
strategy:
matrix:
include:
- version: stable
target: x86_64-pc-windows-msvc
- version: nightly
target: i686-pc-windows-msvc
- version: nightly
target: x86_64-pc-windows-gnu
- version: stable
target: i686-pc-windows-gnu
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update toolchain
run: rustup update --no-self-update ${{ matrix.version }} && rustup default ${{ matrix.version }}
- name: Add toolchain target
run: rustup target add ${{ matrix.target }}
- name: Install clippy
run: rustup component add clippy
- 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 for GNU toolchain
shell: pwsh
run: |
if("${{ matrix.target }}" -eq "i686-pc-windows-gnu") {
$MingwPath = "C:\msys64\mingw32\bin"
} else {
$MingwPath = "C:\msys64\mingw64\bin"
}
$MingwPath | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
if: contains(matrix.target, 'windows-gnu')
- name: Test stable
run: |
cargo test --target ${{ matrix.target }} -p windows-bindgen &&
cargo test --target ${{ matrix.target }} -p windows-metadata &&
cargo test --target ${{ matrix.target }} -p windows-sys &&
cargo test --target ${{ matrix.target }} -p windows-tokens &&
cargo test --target ${{ matrix.target }} -p windows &&
cargo test --target ${{ matrix.target }} -p windows_aarch64_msvc &&
cargo test --target ${{ matrix.target }} -p windows_i686_gnu &&
cargo test --target ${{ matrix.target }} -p windows_i686_msvc &&
cargo test --target ${{ matrix.target }} -p windows_x86_64_gnu &&
cargo test --target ${{ matrix.target }} -p windows_x86_64_msvc &&
cargo test --target ${{ matrix.target }} -p test_agile &&
cargo test --target ${{ matrix.target }} -p test_agile_reference &&
cargo test --target ${{ matrix.target }} -p test_alternate_success_code &&
cargo test --target ${{ matrix.target }} -p test_arch &&
cargo test --target ${{ matrix.target }} -p test_arch_feature &&
cargo test --target ${{ matrix.target }} -p test_bstr &&
cargo test --target ${{ matrix.target }} -p test_const_fields &&
cargo test --target ${{ matrix.target }} -p test_core &&
cargo test --target ${{ matrix.target }} -p test_debug &&
cargo test --target ${{ matrix.target }} -p test_deprecated &&
cargo test --target ${{ matrix.target }} -p test_does_not_return &&
cargo test --target ${{ matrix.target }} -p test_enums &&
cargo test --target ${{ matrix.target }} -p test_handles &&
cargo test --target ${{ matrix.target }} -p test_helpers &&
cargo test --target ${{ matrix.target }} -p test_interop &&
cargo test --target ${{ matrix.target }} -p test_lib &&
cargo test --target ${{ matrix.target }} -p test_matrix3x2 &&
cargo test --target ${{ matrix.target }} -p test_mshtml &&
cargo test --target ${{ matrix.target }} -p test_not_dll &&
cargo test --target ${{ matrix.target }} -p test_ntstatus &&
cargo test --target ${{ matrix.target }} -p test_pwstr &&
cargo test --target ${{ matrix.target }} -p test_return_struct &&
cargo test --target ${{ matrix.target }} -p test_structs &&
cargo test --target ${{ matrix.target }} -p test_sys &&
cargo test --target ${{ matrix.target }} -p test_unions &&
cargo test --target ${{ matrix.target }} -p test_weak &&
cargo test --target ${{ matrix.target }} -p test_win32 &&
cargo test --target ${{ matrix.target }} -p test_win32_arrays &&
cargo test --target ${{ matrix.target }} -p tool_bindings &&
cargo test --target ${{ matrix.target }} -p tool_gnu &&
cargo test --target ${{ matrix.target }} -p tool_msvc &&
cargo test --target ${{ matrix.target }} -p tool_sys &&
cargo test --target ${{ matrix.target }} -p tool_windows &&
cargo test --target ${{ matrix.target }} -p tool_yml
if: matrix.version == 'stable'
- name: Test nightly
run: |
cargo test --target ${{ matrix.target }} -p windows-implement &&
cargo test --target ${{ matrix.target }} -p sample_com_uri &&
cargo test --target ${{ matrix.target }} -p sample_core_app &&
cargo test --target ${{ matrix.target }} -p sample_create_window &&
cargo test --target ${{ matrix.target }} -p sample_create_window_sys &&
cargo test --target ${{ matrix.target }} -p sample_direct2d &&
cargo test --target ${{ matrix.target }} -p sample_direct3d12 &&
cargo test --target ${{ matrix.target }} -p sample_enum_windows &&
cargo test --target ${{ matrix.target }} -p sample_enum_windows_sys &&
cargo test --target ${{ matrix.target }} -p sample_kernel_event &&
cargo test --target ${{ matrix.target }} -p sample_memory_buffer &&
cargo test --target ${{ matrix.target }} -p sample_message_box &&
cargo test --target ${{ matrix.target }} -p sample_ocr &&
cargo test --target ${{ matrix.target }} -p sample_overlapped &&
cargo test --target ${{ matrix.target }} -p sample_rss &&
cargo test --target ${{ matrix.target }} -p sample_simple &&
cargo test --target ${{ matrix.target }} -p sample_spellchecker &&
cargo test --target ${{ matrix.target }} -p sample_uiautomation &&
cargo test --target ${{ matrix.target }} -p sample_xaml_app &&
cargo test --target ${{ matrix.target }} -p sample_xml &&
cargo test --target ${{ matrix.target }} -p test_implement &&
cargo test --target ${{ matrix.target }} -p test_implement_class_factory &&
cargo test --target ${{ matrix.target }} -p test_implement_data_object &&
cargo test --target ${{ matrix.target }} -p test_implement_identity &&
cargo test --target ${{ matrix.target }} -p test_implement_map &&
cargo test --target ${{ matrix.target }} -p test_implement_no_use &&
cargo test --target ${{ matrix.target }} -p test_implement_null_result &&
cargo test --target ${{ matrix.target }} -p test_implement_properties &&
cargo test --target ${{ matrix.target }} -p test_implement_winrt
if: matrix.version == 'nightly'