|
5 | 5 | push:
|
6 | 6 | branches:
|
7 | 7 | - master
|
| 8 | + |
8 | 9 | env:
|
9 | 10 | RUSTFLAGS: -Dwarnings
|
10 | 11 |
|
11 | 12 | jobs:
|
12 | 13 | test:
|
13 | 14 | name: Test
|
14 |
| - runs-on: ${{ matrix.os }} |
| 15 | + runs-on: windows-latest |
| 16 | + |
15 | 17 | strategy:
|
16 | 18 | matrix:
|
17 | 19 | include:
|
18 |
| - - os: windows-latest |
19 |
| - rust: stable |
20 |
| - other: x86_64-pc-windows-msvc |
21 |
| - platform: x64 |
22 |
| - - os: windows-latest |
23 |
| - rust: nightly |
24 |
| - other: i686-pc-windows-msvc |
25 |
| - platform: x86 |
26 |
| - - os: windows-latest |
27 |
| - rust: nightly |
28 |
| - other: x86_64-pc-windows-gnu |
29 |
| - platform: x64 |
30 |
| - - os: windows-latest |
31 |
| - rust: stable |
32 |
| - other: i686-pc-windows-gnu |
33 |
| - platform: x86 |
| 20 | + - version: stable |
| 21 | + target: x86_64-pc-windows-msvc |
| 22 | + - version: nightly |
| 23 | + target: i686-pc-windows-msvc |
| 24 | + - version: nightly |
| 25 | + target: x86_64-pc-windows-gnu |
| 26 | + - version: stable |
| 27 | + target: i686-pc-windows-gnu |
| 28 | + |
34 | 29 | steps:
|
35 | 30 | - name: Checkout
|
36 | 31 | uses: actions/checkout@v2
|
37 |
| - |
38 | 32 | - name: Update toolchain
|
39 |
| - run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} |
40 |
| - |
| 33 | + run: rustup update --no-self-update ${{ matrix.version }} && rustup default ${{ matrix.version }} |
41 | 34 | - name: Add toolchain target
|
42 |
| - run: rustup target add ${{ matrix.other }} |
43 |
| - |
| 35 | + run: rustup target add ${{ matrix.target }} |
| 36 | + - name: Install clippy |
| 37 | + run: rustup component add clippy |
44 | 38 | - name: Configure Cargo for GNU toolchain
|
45 | 39 | shell: pwsh
|
46 | 40 | run: |
|
47 | 41 | Add-Content $env:USERPROFILE\.cargo\config @"
|
48 |
| - [target.x86_64-pc-windows-gnu] |
49 |
| - linker = `"C:\\msys64\\mingw64\\bin\\x86_64-w64-mingw32-gcc.exe`" |
50 |
| - ar = `"C:\\msys64\\mingw64\\bin\\ar.exe`" |
51 |
| - [target.i686-pc-windows-gnu] |
52 |
| - linker = `"C:\\msys64\\mingw32\\bin\\i686-w64-mingw32-gcc.exe`" |
53 |
| - ar = `"C:\\msys64\\mingw32\\bin\\ar.exe`" |
| 42 | + [target.x86_64-pc-windows-gnu] |
| 43 | + linker = `"C:\\msys64\\mingw64\\bin\\x86_64-w64-mingw32-gcc.exe`" |
| 44 | + ar = `"C:\\msys64\\mingw64\\bin\\ar.exe`" |
| 45 | + [target.i686-pc-windows-gnu] |
| 46 | + linker = `"C:\\msys64\\mingw32\\bin\\i686-w64-mingw32-gcc.exe`" |
| 47 | + ar = `"C:\\msys64\\mingw32\\bin\\ar.exe`" |
54 | 48 | "@
|
55 |
| - if: contains(matrix.other, 'windows-gnu') |
56 |
| - |
| 49 | + if: contains(matrix.target, 'windows-gnu') |
57 | 50 | - name: Configure environment for GNU toolchain
|
58 | 51 | shell: pwsh
|
59 | 52 | run: |
|
60 |
| - if("${{ matrix.other }}" -eq "i686-pc-windows-gnu") { |
61 |
| - $MingwPath = "C:\msys64\mingw32\bin" |
| 53 | + if("${{ matrix.target }}" -eq "i686-pc-windows-gnu") { |
| 54 | + $MingwPath = "C:\msys64\mingw32\bin" |
62 | 55 | } else {
|
63 |
| - $MingwPath = "C:\msys64\mingw64\bin" |
| 56 | + $MingwPath = "C:\msys64\mingw64\bin" |
64 | 57 | }
|
65 | 58 | $MingwPath | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
66 |
| - if: contains(matrix.other, 'windows-gnu') |
| 59 | + if: contains(matrix.target, 'windows-gnu') |
| 60 | + - name: Test stable |
| 61 | + run: | |
| 62 | + cargo test --target ${{ matrix.target }} -p windows-bindgen && |
| 63 | + cargo test --target ${{ matrix.target }} -p windows-metadata && |
| 64 | + cargo test --target ${{ matrix.target }} -p windows-sys && |
| 65 | + cargo test --target ${{ matrix.target }} -p windows-tokens && |
| 66 | + cargo test --target ${{ matrix.target }} -p windows && |
| 67 | + cargo test --target ${{ matrix.target }} -p windows_aarch64_msvc && |
| 68 | + cargo test --target ${{ matrix.target }} -p windows_i686_gnu && |
| 69 | + cargo test --target ${{ matrix.target }} -p windows_i686_msvc && |
| 70 | + cargo test --target ${{ matrix.target }} -p windows_x86_64_gnu && |
| 71 | + cargo test --target ${{ matrix.target }} -p windows_x86_64_msvc && |
| 72 | + cargo test --target ${{ matrix.target }} -p test_agile && |
| 73 | + cargo test --target ${{ matrix.target }} -p test_alternate_success_code && |
| 74 | + cargo test --target ${{ matrix.target }} -p test_arch && |
| 75 | + cargo test --target ${{ matrix.target }} -p test_arch_feature && |
| 76 | + cargo test --target ${{ matrix.target }} -p test_bstr && |
| 77 | + cargo test --target ${{ matrix.target }} -p test_core && |
| 78 | + cargo test --target ${{ matrix.target }} -p test_debug && |
| 79 | + cargo test --target ${{ matrix.target }} -p test_deprecated && |
| 80 | + cargo test --target ${{ matrix.target }} -p test_enums && |
| 81 | + cargo test --target ${{ matrix.target }} -p test_handles && |
| 82 | + cargo test --target ${{ matrix.target }} -p test_helpers && |
| 83 | + cargo test --target ${{ matrix.target }} -p test_interop && |
| 84 | + cargo test --target ${{ matrix.target }} -p test_lib && |
| 85 | + cargo test --target ${{ matrix.target }} -p test_matrix3x2 && |
| 86 | + cargo test --target ${{ matrix.target }} -p test_mshtml && |
| 87 | + cargo test --target ${{ matrix.target }} -p test_ntstatus && |
| 88 | + cargo test --target ${{ matrix.target }} -p test_pwstr && |
| 89 | + cargo test --target ${{ matrix.target }} -p test_return_struct && |
| 90 | + cargo test --target ${{ matrix.target }} -p test_structs && |
| 91 | + cargo test --target ${{ matrix.target }} -p test_sys && |
| 92 | + cargo test --target ${{ matrix.target }} -p test_unions && |
| 93 | + cargo test --target ${{ matrix.target }} -p test_weak && |
| 94 | + cargo test --target ${{ matrix.target }} -p test_win32 && |
| 95 | + cargo test --target ${{ matrix.target }} -p test_win32_arrays && |
| 96 | + cargo test --target ${{ matrix.target }} -p tool_bindings && |
| 97 | + cargo test --target ${{ matrix.target }} -p tool_gnu && |
| 98 | + cargo test --target ${{ matrix.target }} -p tool_msvc && |
| 99 | + cargo test --target ${{ matrix.target }} -p tool_sys && |
| 100 | + cargo test --target ${{ matrix.target }} -p tool_windows && |
| 101 | + cargo test --target ${{ matrix.target }} -p tool_yml |
| 102 | + if: matrix.version == 'stable' |
67 | 103 |
|
68 |
| - - name: Test stable (${{ matrix.os }}) |
| 104 | + - name: Test nightly |
69 | 105 | run: |
|
70 |
| - cargo test --target ${{ matrix.other }} -p test_agile && |
71 |
| - cargo test --target ${{ matrix.other }} -p test_alternate_success_code && |
72 |
| - cargo test --target ${{ matrix.other }} -p test_arch && |
73 |
| - cargo test --target ${{ matrix.other }} -p test_arch_feature && |
74 |
| - cargo test --target ${{ matrix.other }} -p test_bstr && |
75 |
| - cargo test --target ${{ matrix.other }} -p test_core && |
76 |
| - cargo test --target ${{ matrix.other }} -p test_debug && |
77 |
| - cargo test --target ${{ matrix.other }} -p test_deprecated && |
78 |
| - cargo test --target ${{ matrix.other }} -p test_enums && |
79 |
| - cargo test --target ${{ matrix.other }} -p test_handles && |
80 |
| - cargo test --target ${{ matrix.other }} -p test_helpers && |
81 |
| - cargo test --target ${{ matrix.other }} -p test_interop && |
82 |
| - cargo test --target ${{ matrix.other }} -p test_lib && |
83 |
| - cargo test --target ${{ matrix.other }} -p test_matrix3x2 && |
84 |
| - cargo test --target ${{ matrix.other }} -p test_mshtml && |
85 |
| - cargo test --target ${{ matrix.other }} -p test_ntstatus && |
86 |
| - cargo test --target ${{ matrix.other }} -p test_pwstr && |
87 |
| - cargo test --target ${{ matrix.other }} -p test_return_struct && |
88 |
| - cargo test --target ${{ matrix.other }} -p test_structs && |
89 |
| - cargo test --target ${{ matrix.other }} -p test_sys && |
90 |
| - cargo test --target ${{ matrix.other }} -p test_unions && |
91 |
| - cargo test --target ${{ matrix.other }} -p test_weak && |
92 |
| - cargo test --target ${{ matrix.other }} -p test_win32 && |
93 |
| - cargo test --target ${{ matrix.other }} -p test_win32_arrays |
94 |
| - if: contains(matrix.rust, 'stable') |
| 106 | + cargo test --target ${{ matrix.target }} -p windows-implement && |
| 107 | + cargo test --target ${{ matrix.target }} -p sample_com_uri && |
| 108 | + cargo test --target ${{ matrix.target }} -p sample_core_app && |
| 109 | + cargo test --target ${{ matrix.target }} -p sample_create_window && |
| 110 | + cargo test --target ${{ matrix.target }} -p sample_create_window_sys && |
| 111 | + cargo test --target ${{ matrix.target }} -p sample_direct2d && |
| 112 | + cargo test --target ${{ matrix.target }} -p sample_direct3d12 && |
| 113 | + cargo test --target ${{ matrix.target }} -p sample_enum_windows && |
| 114 | + cargo test --target ${{ matrix.target }} -p sample_enum_windows_sys && |
| 115 | + cargo test --target ${{ matrix.target }} -p sample_kernel_event && |
| 116 | + cargo test --target ${{ matrix.target }} -p sample_memory_buffer && |
| 117 | + cargo test --target ${{ matrix.target }} -p sample_message_box && |
| 118 | + cargo test --target ${{ matrix.target }} -p sample_ocr && |
| 119 | + cargo test --target ${{ matrix.target }} -p sample_overlapped && |
| 120 | + cargo test --target ${{ matrix.target }} -p sample_rss && |
| 121 | + cargo test --target ${{ matrix.target }} -p sample_simple && |
| 122 | + cargo test --target ${{ matrix.target }} -p sample_spellchecker && |
| 123 | + cargo test --target ${{ matrix.target }} -p sample_uiautomation && |
| 124 | + cargo test --target ${{ matrix.target }} -p sample_xaml_app && |
| 125 | + cargo test --target ${{ matrix.target }} -p sample_xml && |
| 126 | + cargo test --target ${{ matrix.target }} -p test_implement && |
| 127 | + cargo test --target ${{ matrix.target }} -p test_implement_class_factory && |
| 128 | + cargo test --target ${{ matrix.target }} -p test_implement_data_object && |
| 129 | + cargo test --target ${{ matrix.target }} -p test_implement_identity && |
| 130 | + cargo test --target ${{ matrix.target }} -p test_implement_map && |
| 131 | + cargo test --target ${{ matrix.target }} -p test_implement_no_use && |
| 132 | + cargo test --target ${{ matrix.target }} -p test_implement_null_result && |
| 133 | + cargo test --target ${{ matrix.target }} -p test_implement_properties && |
| 134 | + cargo test --target ${{ matrix.target }} -p test_implement_winrt |
| 135 | + if: matrix.version == 'nightly' |
95 | 136 |
|
96 |
| - - name: Test nightly (${{ matrix.os }}) |
| 137 | + - name: Test clippy |
97 | 138 | run: |
|
98 |
| - cargo test --target ${{ matrix.other }} -p test_implement && |
99 |
| - cargo test --target ${{ matrix.other }} -p test_implement_class_factory && |
100 |
| - cargo test --target ${{ matrix.other }} -p test_implement_data_object && |
101 |
| - cargo test --target ${{ matrix.other }} -p test_implement_identity && |
102 |
| - cargo test --target ${{ matrix.other }} -p test_implement_map && |
103 |
| - cargo test --target ${{ matrix.other }} -p test_implement_no_use && |
104 |
| - cargo test --target ${{ matrix.other }} -p test_implement_null_result && |
105 |
| - cargo test --target ${{ matrix.other }} -p test_implement_properties && |
106 |
| - cargo test --target ${{ matrix.other }} -p test_implement_winrt && |
107 |
| - cargo test --target ${{ matrix.other }} -p com_uri && |
108 |
| - cargo test --target ${{ matrix.other }} -p core_app && |
109 |
| - cargo test --target ${{ matrix.other }} -p create_window && |
110 |
| - cargo test --target ${{ matrix.other }} -p create_window_sys && |
111 |
| - cargo test --target ${{ matrix.other }} -p direct2d && |
112 |
| - cargo test --target ${{ matrix.other }} -p direct3d12 && |
113 |
| - cargo test --target ${{ matrix.other }} -p enum_windows && |
114 |
| - cargo test --target ${{ matrix.other }} -p enum_windows_sys && |
115 |
| - cargo test --target ${{ matrix.other }} -p kernel_event && |
116 |
| - cargo test --target ${{ matrix.other }} -p memory_buffer && |
117 |
| - cargo test --target ${{ matrix.other }} -p message_box && |
118 |
| - cargo test --target ${{ matrix.other }} -p ocr && |
119 |
| - cargo test --target ${{ matrix.other }} -p overlapped && |
120 |
| - cargo test --target ${{ matrix.other }} -p rss && |
121 |
| - cargo test --target ${{ matrix.other }} -p simple && |
122 |
| - cargo test --target ${{ matrix.other }} -p spellchecker && |
123 |
| - cargo test --target ${{ matrix.other }} -p uiautomation && |
124 |
| - cargo test --target ${{ matrix.other }} -p xaml_app && |
125 |
| - cargo test --target ${{ matrix.other }} -p xml |
126 |
| - if: contains(matrix.rust, 'nightly') |
| 139 | + cargo clippy -p windows-bindgen && |
| 140 | + cargo clippy -p windows-implement && |
| 141 | + cargo clippy -p windows-metadata && |
| 142 | + cargo clippy -p windows-sys && |
| 143 | + cargo clippy -p windows-tokens && |
| 144 | + cargo clippy -p windows && |
| 145 | + cargo clippy -p sample_com_uri && |
| 146 | + cargo clippy -p sample_core_app && |
| 147 | + cargo clippy -p sample_create_window && |
| 148 | + cargo clippy -p sample_create_window_sys && |
| 149 | + cargo clippy -p sample_direct2d && |
| 150 | + cargo clippy -p sample_direct3d12 && |
| 151 | + cargo clippy -p sample_enum_windows && |
| 152 | + cargo clippy -p sample_enum_windows_sys && |
| 153 | + cargo clippy -p sample_kernel_event && |
| 154 | + cargo clippy -p sample_memory_buffer && |
| 155 | + cargo clippy -p sample_message_box && |
| 156 | + cargo clippy -p sample_ocr && |
| 157 | + cargo clippy -p sample_overlapped && |
| 158 | + cargo clippy -p sample_rss && |
| 159 | + cargo clippy -p sample_simple && |
| 160 | + cargo clippy -p sample_spellchecker && |
| 161 | + cargo clippy -p sample_uiautomation && |
| 162 | + cargo clippy -p sample_xaml_app && |
| 163 | + cargo clippy -p sample_xml && |
| 164 | + cargo clippy -p windows_aarch64_msvc && |
| 165 | + cargo clippy -p windows_i686_gnu && |
| 166 | + cargo clippy -p windows_i686_msvc && |
| 167 | + cargo clippy -p windows_x86_64_gnu && |
| 168 | + cargo clippy -p windows_x86_64_msvc && |
| 169 | + cargo clippy -p test_agile && |
| 170 | + cargo clippy -p test_alternate_success_code && |
| 171 | + cargo clippy -p test_arch && |
| 172 | + cargo clippy -p test_arch_feature && |
| 173 | + cargo clippy -p test_bstr && |
| 174 | + cargo clippy -p test_core && |
| 175 | + cargo clippy -p test_debug && |
| 176 | + cargo clippy -p test_deprecated && |
| 177 | + cargo clippy -p test_enums && |
| 178 | + cargo clippy -p test_handles && |
| 179 | + cargo clippy -p test_helpers && |
| 180 | + cargo clippy -p test_implement && |
| 181 | + cargo clippy -p test_implement_class_factory && |
| 182 | + cargo clippy -p test_implement_data_object && |
| 183 | + cargo clippy -p test_implement_identity && |
| 184 | + cargo clippy -p test_implement_map && |
| 185 | + cargo clippy -p test_implement_no_use && |
| 186 | + cargo clippy -p test_implement_null_result && |
| 187 | + cargo clippy -p test_implement_properties && |
| 188 | + cargo clippy -p test_implement_winrt && |
| 189 | + cargo clippy -p test_interop && |
| 190 | + cargo clippy -p test_lib && |
| 191 | + cargo clippy -p test_matrix3x2 && |
| 192 | + cargo clippy -p test_mshtml && |
| 193 | + cargo clippy -p test_ntstatus && |
| 194 | + cargo clippy -p test_pwstr && |
| 195 | + cargo clippy -p test_return_struct && |
| 196 | + cargo clippy -p test_structs && |
| 197 | + cargo clippy -p test_sys && |
| 198 | + cargo clippy -p test_unions && |
| 199 | + cargo clippy -p test_weak && |
| 200 | + cargo clippy -p test_win32 && |
| 201 | + cargo clippy -p test_win32_arrays && |
| 202 | + cargo clippy -p tool_bindings && |
| 203 | + cargo clippy -p tool_gnu && |
| 204 | + cargo clippy -p tool_msvc && |
| 205 | + cargo clippy -p tool_sys && |
| 206 | + cargo clippy -p tool_windows && |
| 207 | + cargo clippy -p tool_yml |
| 208 | + if: matrix.version == 'nightly' && matrix.target == 'x86_64-pc-windows-gnu' |
0 commit comments