File tree 2 files changed +21
-6
lines changed
2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 26
26
runs-on : macos-latest
27
27
self-hosted : false
28
28
fail-fast : false
29
- name : ${{ matrix.name }}
29
+ name : build / ${{ matrix.name }}
30
30
runs-on : ${{ matrix.runs-on }}
31
31
steps :
32
32
- uses : actions/checkout@v4
@@ -42,14 +42,29 @@ jobs:
42
42
- name : Build examples
43
43
run : cargo build --profile=CI --verbose --bins
44
44
clippy :
45
- runs-on : ubuntu-latest
45
+ strategy :
46
+ matrix :
47
+ include :
48
+ - name : windows-latest
49
+ runs-on : [self-hosted, Windows]
50
+ self-hosted : true
51
+ - name : ubuntu-latest
52
+ runs-on : ubuntu-latest
53
+ self-hosted : false
54
+ - name : macos-latest
55
+ runs-on : macos-latest
56
+ self-hosted : false
57
+ fail-fast : false
58
+ name : clippy / ${{ matrix.name }}
59
+ runs-on : ${{ matrix.runs-on }}
46
60
steps :
47
61
- uses : actions/checkout@v4
48
62
- run : rustup toolchain install stable --component clippy
49
63
- uses : Swatinem/rust-cache@v2
64
+ if : ${{ ! matrix.self-hosted }}
50
65
with :
51
- shared-key : ubuntu-latest
52
- save-if : " false"
66
+ shared-key : ${{ matrix.name }}
67
+ save-if : false
53
68
- name : Run clippy check
54
69
run : cargo clippy --profile=CI -- -Dwarnings
55
70
fmt :
Original file line number Diff line number Diff line change @@ -104,14 +104,14 @@ impl Surface {
104
104
} ,
105
105
#[ cfg( target_vendor = "apple" ) ]
106
106
( RawWindowHandle :: AppKit ( handle) , _) => {
107
- let layer = raw_window_metal:: Layer :: from_ns_view ( handle. ns_view ) ;
107
+ let layer = unsafe { raw_window_metal:: Layer :: from_ns_view ( handle. ns_view ) } ;
108
108
109
109
// Vulkan retains the CAMetalLayer, so no need to retain it past this invocation
110
110
unsafe { Self :: from_metal ( instance, layer. as_ptr ( ) . as_ptr ( ) , None ) }
111
111
}
112
112
#[ cfg( target_vendor = "apple" ) ]
113
113
( RawWindowHandle :: UiKit ( handle) , _) => {
114
- let layer = raw_window_metal:: Layer :: from_ui_view ( handle. ui_view ) ;
114
+ let layer = unsafe { raw_window_metal:: Layer :: from_ui_view ( handle. ui_view ) } ;
115
115
116
116
// Vulkan retains the CAMetalLayer, so no need to retain it past this invocation
117
117
unsafe { Self :: from_metal ( instance, layer. as_ptr ( ) . as_ptr ( ) , None ) }
You can’t perform that action at this time.
0 commit comments