try this ci trick

This commit is contained in:
Rob Ede 2021-09-01 22:33:55 +01:00
parent f62fec2ccb
commit 915f04fdd6
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
3 changed files with 45 additions and 25 deletions

View File

@ -1,5 +1,21 @@
[alias] [alias]
chk = "check --workspace --all-features --tests --examples --bins" chk = "check --workspace --all-features --tests --examples --bins"
lint = "clippy --workspace --all-features --tests --examples --bins -- -Dclippy::todo" lint = "clippy --workspace --all-features --tests --examples --bins -- -Dclippy::todo"
ci-test = "test --workspace --all-features --lib --tests --no-fail-fast -- --nocapture"
ci-doctest = "test --workspace --all-features --doc --no-fail-fast -- --nocapture" ci-doctest = "test --workspace --all-features --doc --no-fail-fast -- --nocapture"
# just check the library (without dev deps)
ci-check-lib = "hack --workspace --feature-powerset --exclude-features io-uring check"
ci-check-lib-linux = "hack --workspace --feature-powerset check"
# check everything
ci-check = "hack --workspace --feature-powerset --exclude-features io-uring check --tests --examples"
ci-check-linux = "hack --workspace --feature-powerset check --tests --examples"
# tests avoiding io-uring feature
ci-test = "hack test --workspace --exclude=actix-rt --exclude=actix-server --all-features --lib --tests --no-fail-fast -- --nocapture"
ci-test-rt = " hack --feature-powerset --exclude-features io-uring test --package=actix-rt --lib --tests --no-fail-fast -- --nocapture"
ci-test-server = "hack --feature-powerset --exclude-features io-uring test --package=actix-server --lib --tests --no-fail-fast -- --nocapture"
# test with io-uring feature
ci-test-linux = "test --workspace --all-features --lib --tests --no-fail-fast -- --nocapture"

View File

@ -75,36 +75,40 @@ jobs:
command: install command: install
args: cargo-hack args: cargo-hack
- name: check minimal - name: check lib
if: matrix.target.os != 'ubuntu-latest'
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with: { command: ci-check-lib }
command: hack - name: check lib
args: check --workspace --no-default-features if: matrix.target.os == 'ubuntu-latest'
- name: check minimal + tests
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with: { command: ci-check-lib-linux }
command: hack
args: check --workspace --no-default-features --tests --examples
- name: check default
uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --tests --examples
- name: check full - name: check full
# TODO: compile OpenSSL and run tests on MinGW # TODO: compile OpenSSL and run tests on MinGW
if: matrix.target.triple != 'x86_64-pc-windows-gnu' if: >
matrix.target.os != 'ubuntu-latest'
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with: { command: ci-check }
command: check - name: check all
args: --workspace --all-features --tests --examples if: matrix.target.os == 'ubuntu-latest'
uses: actions-rs/cargo@v1
with: { command: ci-check-linux }
- name: tests - name: tests
if: matrix.target.triple != 'x86_64-pc-windows-gnu' if: >
matrix.target.os != 'ubuntu-latest'
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: { command: ci-test } run: |
cargo ci-test
cargo ci-test-rt
cargo ci-test-server
- name: tests
if: matrix.target.os == 'ubuntu-latest'
uses: actions-rs/cargo@v1
with: { command: ci-test-linux }
- name: Generate coverage file - name: Generate coverage file
if: > if: >
@ -120,8 +124,7 @@ jobs:
&& matrix.version == 'stable' && matrix.version == 'stable'
&& github.ref == 'refs/heads/master' && github.ref == 'refs/heads/master'
uses: codecov/codecov-action@v1 uses: codecov/codecov-action@v1
with: with: { file: cobertura.xml }
file: cobertura.xml
- name: Clear the cargo caches - name: Clear the cargo caches
run: | run: |

View File

@ -5,6 +5,7 @@
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
#[cfg(feature = "openssl")] #[cfg(feature = "openssl")]
#[allow(unused_extern_crates)]
extern crate tls_openssl as openssl; extern crate tls_openssl as openssl;
#[cfg(feature = "accept")] #[cfg(feature = "accept")]