generated from al8n/crates
-
-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (84 loc) · 2.69 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: net
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'COPYRIGHT'
- 'LICENSE*'
- '**.md'
- '**.txt'
- 'art'
pull_request:
paths-ignore:
- 'README.md'
- 'COPYRIGHT'
- 'LICENSE*'
- '**.md'
- '**.txt'
- 'art'
workflow_dispatch:
jobs:
test:
name: ${{ matrix.os }} - ${{ matrix.runtime }} - ${{ matrix.stream_layer }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
# - macos-latest,
# - windows-latest
runtime: [tokio, async-std, smol]
stream_layer:
# - tls
# - native-tls
- tcp
steps:
- uses: actions/checkout@v3
- name: Install Rust
run: |
rustup update stable && rustup default stable
rustup component add clippy
rustup component add rustfmt
- name: Install OpenSSL (Windows)
if: matrix.os == 'windows-latest'
shell: powershell
run: |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
vcpkg install openssl:x64-windows-static-md
- name: Setup loopback interface (Windows)
if: matrix.os == 'windows-latest'
shell: powershell
run: ci\setup_subnet_windows.ps1
- name: Setup loopback interface (MacOS)
if: matrix.os == 'macos-latest'
run: ci/setup_subnet_macos.sh
- name: Setup loopback interface (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: ci/setup_subnet_ubuntu.sh
- name: Run Unit Tests for core
run: |
cargo test --no-default-features --features "test,encryption,serde"
working-directory: core
- name: Run Unit Tests for types
run: |
cargo test --no-default-features --features "metrics,encryption,serde"
working-directory: types
- name: Run Unit Tests for ruserf based on net transport
run: |
cargo test --no-default-features --features "test,encryption,net,metrics,${{ matrix.runtime }}" -- --test-threads=1
working-directory: ruserf
- name: Run Unit Tests for ruserf based on quinn transport
run: |
cargo test --no-default-features --features "test,compression,quinn,metrics,${{ matrix.runtime }}" -- --test-threads=1
working-directory: ruserf
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ matrix.runtime }}-${{ matrix.stream_layer }}