File tree Expand file tree Collapse file tree 3 files changed +35
-7
lines changed Expand file tree Collapse file tree 3 files changed +35
-7
lines changed Original file line number Diff line number Diff line change 8080 cargo lipo --verbose --all-features --features="async tokio/rt-multi-thread"
8181 - name : Abort on error
8282 if : ${{ failure() }}
83- run : echo "iOs build job failed" && false
83+ run : echo "iOS build job failed" && false
84+
85+ build_n_test_openharmony :
86+ strategy :
87+ matrix :
88+ target : [aarch64-unknown-linux-ohos, armv7-unknown-linux-ohos, x86_64-unknown-linux-ohos]
89+ fail-fast : false
90+ runs-on : ubuntu-latest
91+
92+ steps :
93+ - uses : actions/checkout@v4
94+ -
uses :
openharmony-rs/[email protected] 95+ id : setup-ohos
96+ with :
97+ version : " 5.0"
98+ - name : Install ohrs and rust compiler for ohos target
99+ if : ${{ !cancelled() }}
100+ run : |
101+ cargo install --locked ohrs
102+ rustup target add ${{ matrix.target }}
103+ - name : fmt & clippy
104+ if : ${{ !cancelled() }}
105+ run : |
106+ ohrs cargo --disable-target -- fmt --all -- --check
107+ ohrs cargo --disable-target -- clippy --target ${{matrix.target}} --all-features --features="async tokio/rt-multi-thread" -- -D warnings
108+ - name : Build
109+ if : ${{ !cancelled() }}
110+ run : |
111+ ohrs cargo --disable-target -- rustc --target ${{matrix.target}} --verbose --all-features --features="async tokio/rt-multi-thread" --lib --crate-type=cdylib
112+ - name : Abort on error
113+ if : ${{ failure() }}
114+ run : echo "OpenHarmony build job failed" && false
84115
85116 semver :
86117 name : Check semver
Original file line number Diff line number Diff line change 1515//! POSIX compliant support.
1616
1717mod sockaddr;
18- #[ cfg( any( target_os = "linux" , target_os = "freebsd" , target_os = "macos" ) ) ]
19- pub ( crate ) use sockaddr:: sockaddr_union;
20-
21- #[ cfg( any( target_os = "linux" , target_os = "macos" ) ) ]
22- pub ( crate ) use sockaddr:: ipaddr_to_sockaddr;
18+ #[ allow( unused_imports) ]
19+ pub ( crate ) use sockaddr:: { ipaddr_to_sockaddr, sockaddr_union} ;
2320
2421mod fd;
2522pub ( crate ) use self :: fd:: Fd ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ fn rs_addr_to_sockaddr(addr: std::net::SocketAddr) -> sockaddr_union {
6060
6161/// # Safety
6262/// Fill the `addr` with the `src_addr` and `src_port`, the `size` should be the size of overwriting
63- #[ cfg ( any ( target_os = "linux" , target_os = "macos" ) ) ]
63+ #[ allow ( dead_code ) ]
6464pub ( crate ) unsafe fn ipaddr_to_sockaddr < T > (
6565 src_addr : T ,
6666 src_port : u16 ,
You can’t perform that action at this time.
0 commit comments