-
-
Notifications
You must be signed in to change notification settings - Fork 13
105 lines (103 loc) · 3.14 KB
/
test.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
96
97
98
99
100
101
102
103
104
105
name: test
on:
push:
branches:
- main
pull_request:
merge_group:
jobs:
test-macos:
runs-on: macos-12
env:
CARGO_TERM_COLOR: always
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Install Rust specified toolchain
run: rustup show
- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --all-targets
- name: Build testbed
uses: actions-rs/cargo@v1
with:
command: build
args: --release --manifest-path test-crates/hyper-testbed/Cargo.toml
- name: Run cargo nextest
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --profile ci
test-windows:
runs-on: windows-2022
env:
CARGO_TERM_COLOR: always
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Install Rust specified toolchain
run: rustup show
- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --all-targets
- name: Build testbed
uses: actions-rs/cargo@v1
with:
command: build
args: --release --manifest-path test-crates/hyper-testbed/Cargo.toml
- name: Run cargo nextest
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --profile ci
test-linux:
env:
CARGO_TERM_COLOR: always
RUSTC_WRAPPER: sccache
CARGO_INCREMENTAL: 0
CARGO_HOME: /vol/cargo
runs-on: self-hosted
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Run unit tests and h2spec
run: |
cd ${{ github.workspace }}
sccache --zero-stats
cargo clippy
mkdir tools
export PATH=$PATH:${PWD}/tools
# (pushd tools && curl -L https://github.com/summerwind/h2spec/releases/download/v2.6.0/h2spec_linux_amd64.tar.gz | tar -xz && popd)
# Uses https://github.com/summerwind/h2spec/pull/123, more precisely
# https://github.com/fasterthanlime/h2spec/commit/72a6b9b2b01133d292bd74e019fde86c3638094a
(pushd tools && curl -fL https://github.com/hapsoc/h2spec-binaries/releases/download/72a6b9b/h2spec -o h2spec && chmod +x h2spec && popd)
just ci-test
sccache --show-stats
- name: Upload h2spec Report
uses: actions/upload-artifact@v3
if: always() # always run even if the previous step fails
with:
name: h2spec-results
path: |
target/h2spec-generic.xml
target/h2spec-hpack.xml
target/h2spec-http2.xml
retention-days: 280