Skip to content

Commit 28d9c6a

Browse files
authored
Merge pull request #90 from actix/fix-ci
Tweak GitHub Actions
2 parents e5b5df1 + a970c2c commit 28d9c6a

File tree

25 files changed

+221
-167
lines changed

25 files changed

+221
-167
lines changed

.appveyor.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/clippy.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on: pull_request
2+
3+
name: Clippy Check
4+
jobs:
5+
clippy_check:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@master
9+
- uses: actions-rs/toolchain@v1
10+
with:
11+
toolchain: nightly
12+
components: clippy
13+
override: true
14+
- uses: actions-rs/clippy-check@v1
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
args: --all-features --all --tests

.github/workflows/macos.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI (macOS)
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build_and_test:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
version:
11+
- stable
12+
- nightly
13+
14+
name: ${{ matrix.version }} - x86_64-apple-darwin
15+
runs-on: macos-latest
16+
17+
steps:
18+
- uses: actions/checkout@master
19+
20+
- name: Install ${{ matrix.version }}
21+
uses: actions-rs/toolchain@v1
22+
with:
23+
toolchain: ${{ matrix.version }}-x86_64-apple-darwin
24+
profile: minimal
25+
override: true
26+
27+
- name: check build
28+
uses: actions-rs/cargo@v1
29+
with:
30+
command: check
31+
args: --all --bins --examples --tests
32+
33+
- name: tests
34+
uses: actions-rs/cargo@v1
35+
with:
36+
command: test
37+
args: --all --all-features --no-fail-fast -- --nocapture

.github/workflows/main.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI (Windows-gnu)
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
OPENSSL_DIR: d:\a\_temp\msys\msys64\usr
7+
8+
jobs:
9+
build_and_test:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
version:
14+
- stable
15+
- nightly
16+
17+
name: ${{ matrix.version }} - x86_64-pc-windows-gnu
18+
runs-on: windows-latest
19+
20+
steps:
21+
- uses: actions/checkout@master
22+
23+
- name: Install ${{ matrix.version }}
24+
uses: actions-rs/toolchain@v1
25+
with:
26+
toolchain: ${{ matrix.version }}-x86_64-pc-windows-gnu
27+
profile: minimal
28+
override: true
29+
30+
- name: Install MSYS2
31+
uses: numworks/setup-msys2@v1
32+
33+
- name: Install OpenSSL
34+
run: |
35+
msys2do pacman --noconfirm -S openssl-devel pkg-config
36+
37+
- name: Copy and check libs
38+
run: |
39+
Copy-Item d:\a\_temp\msys\msys64\usr\lib\libssl.dll.a d:\a\_temp\msys\msys64\usr\lib\libssl.dll
40+
Copy-Item d:\a\_temp\msys\msys64\usr\lib\libcrypto.dll.a d:\a\_temp\msys\msys64\usr\lib\libcrypto.dll
41+
Get-ChildItem d:\a\_temp\msys\msys64\usr\lib
42+
Get-ChildItem d:\a\_temp\msys\msys64\usr
43+
44+
- name: check build
45+
uses: actions-rs/cargo@v1
46+
with:
47+
command: check
48+
args: --all --bins --examples --tests
49+
50+
- name: tests
51+
uses: actions-rs/cargo@v1
52+
with:
53+
command: test
54+
args: --all --all-features --no-fail-fast -- --nocapture

.github/workflows/windows.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI (Windows)
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
VCPKGRS_DYNAMIC: 1
7+
8+
jobs:
9+
build_and_test:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
version:
14+
- stable
15+
- nightly
16+
target:
17+
- x86_64-pc-windows-msvc
18+
- i686-pc-windows-msvc
19+
20+
name: ${{ matrix.version }} - ${{ matrix.target }}
21+
runs-on: windows-latest
22+
23+
steps:
24+
- uses: actions/checkout@master
25+
26+
- name: Install ${{ matrix.version }}
27+
uses: actions-rs/toolchain@v1
28+
with:
29+
toolchain: ${{ matrix.version }}-${{ matrix.target }}
30+
profile: minimal
31+
override: true
32+
33+
- name: Install OpenSSL (x64)
34+
if: matrix.target == 'x86_64-pc-windows-msvc'
35+
run: |
36+
vcpkg integrate install
37+
vcpkg install openssl:x64-windows
38+
Get-ChildItem C:\vcpkg\installed\x64-windows\bin
39+
Get-ChildItem C:\vcpkg\installed\x64-windows\lib
40+
Copy-Item C:\vcpkg\installed\x64-windows\bin\libcrypto-1_1-x64.dll C:\vcpkg\installed\x64-windows\bin\libcrypto.dll
41+
Copy-Item C:\vcpkg\installed\x64-windows\bin\libssl-1_1-x64.dll C:\vcpkg\installed\x64-windows\bin\libssl.dll
42+
43+
- name: Install OpenSSL (x86)
44+
if: matrix.target == 'i686-pc-windows-msvc'
45+
run: |
46+
vcpkg integrate install
47+
vcpkg install openssl:x86-windows
48+
Get-ChildItem C:\vcpkg\installed\x86-windows\bin
49+
Get-ChildItem C:\vcpkg\installed\x86-windows\lib
50+
Copy-Item C:\vcpkg\installed\x86-windows\bin\libcrypto-1_1.dll C:\vcpkg\installed\x86-windows\bin\libcrypto.dll
51+
Copy-Item C:\vcpkg\installed\x86-windows\bin\libssl-1_1.dll C:\vcpkg\installed\x86-windows\bin\libssl.dll
52+
53+
- name: check build
54+
uses: actions-rs/cargo@v1
55+
with:
56+
command: check
57+
args: --all --bins --examples --tests
58+
59+
- name: tests
60+
uses: actions-rs/cargo@v1
61+
with:
62+
command: test
63+
args: --all --all-features --no-fail-fast -- --nocapture

actix-connect/src/ssl/rustls.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ where
3838
{
3939
pub fn service(connector: Arc<ClientConfig>) -> RustlsConnectorService<T, U> {
4040
RustlsConnectorService {
41-
connector: connector,
41+
connector,
4242
_t: PhantomData,
4343
}
4444
}

actix-ioframe/src/dispatcher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ where
213213
// drain service responses
214214
match Pin::new(&mut self.rx).poll_next(cx) {
215215
Poll::Ready(Some(Ok(msg))) => {
216-
if let Err(_) = self.framed.write(msg) {
216+
if self.framed.write(msg).is_err() {
217217
return Poll::Ready(Ok(()));
218218
}
219219
}

actix-macros/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use quote::quote;
1414
/// println!("Hello world");
1515
/// }
1616
/// ```
17+
#[allow(clippy::needless_doctest_main)]
1718
#[proc_macro_attribute]
1819
#[cfg(not(test))] // Work around for rust-lang/rust#62127
1920
pub fn main(_: TokenStream, item: TokenStream) -> TokenStream {

actix-rt/src/runtime.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ impl Runtime {
8686
where
8787
F: Future + 'static,
8888
{
89-
let res = self.local.block_on(&mut self.rt, f);
90-
res
89+
self.local.block_on(&mut self.rt, f)
9190
}
9291
}

0 commit comments

Comments
 (0)