Skip to content

Set minimum rust version for crates with async fn in trait #570

Set minimum rust version for crates with async fn in trait

Set minimum rust version for crates with async fn in trait #570

Workflow file for this run

name: test
on:
push:
branches:
- main
pull_request:
merge_group:
jobs:
test-macos:
runs-on: macos-12
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install Rust specified toolchain
run: rustup show
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Make sure things build
run: |
cargo build --profile ci
test-windows:
runs-on: windows-2022
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install Rust specified toolchain
run: rustup show
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Make sure things build
run: |
cargo build --profile ci
test-linux:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 2
- id: cache-rustup
name: Cache Rust toolchain
uses: actions/cache@v3
with:
path: ~/.rustup
key: toolchain-
- name: Install Rust specified toolchain
run: rustup show
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Set up sccache (part 2)
run: sccache --start-server
- uses: taiki-e/install-action@v2
with:
tool: just,cargo-llvm-cov,cargo-nextest
- name: Run unit tests and h2spec
run: |
cd ${{ github.workspace }}
cargo clippy
cargo clippy --manifest-path test-crates/fluke-tls-sample/Cargo.toml
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 coverage information
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov
- 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: 90