Merge pull request #107 from hapsoc/nightly-2023-09-12 #442
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |