Skip to content

port hyperium/* as rama-http-core #1746

port hyperium/* as rama-http-core

port hyperium/* as rama-http-core #1746

Workflow file for this run

name: CI
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: stable
RUST_TOOLCHAIN_NIGHTLY: nightly
RUST_TOOLCHAIN_MSRV: 1.80.0
RUST_TOOLCHAIN_BETA: beta
on:
push:
branches:
- main
pull_request: {}
jobs:
check-msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_MSRV}}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: check
run: |
cargo check --workspace --all-targets --all-features
- name: clippy
run: |
cargo clippy --workspace --all-targets --all-features
- name: rustfmt
run: |
cargo fmt --all --check
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: check
run: |
cargo check --workspace --all-targets --all-features
- name: clippy
run: |
cargo clippy --workspace --all-targets --all-features
- name: rustfmt
run: |
cargo fmt --all --check
check-all-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: check
run: |
cargo check --workspace --all-targets --all-features
- name: clippy
run: |
cargo clippy --workspace --all-targets --all-features
- name: rustfmt
run: |
cargo fmt --all --check
# TODO: enable again once this CI issue is gone :shrug:
# test-msrv:
# needs: [check, check-msrv, check-all-features]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# with:
# toolchain: ${{env.RUST_TOOLCHAIN_MSRV}}
# - uses: Swatinem/rust-cache@v2
# - name: Run tests
# run: cargo test --all-features --workspace
test-beta:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_BETA}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-features --workspace
test:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-features --workspace
test-all-features:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-features --workspace
test-macos-msrv:
needs: [check, check-msrv, check-all-features]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_MSRV}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-features --workspace
test-macos-beta:
needs: [check, check-msrv, check-all-features]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_MSRV}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-features --workspace
test-macos:
needs: [check, check-msrv, check-all-features]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --all-features --workspace
test-ignored-msrv:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_MSRV}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --features=cli,telemetry,compression,rustls --workspace -- --ignored
test-ignored-beta:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_BETA}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --features=cli,telemetry,compression,rustls --workspace -- --ignored
test-ignored:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --features=cli,telemetry,compression,rustls --workspace -- --ignored
test-ignored-macos-msrv:
needs: [check, check-msrv, check-all-features]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_MSRV}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --features=cli,telemetry,compression,rustls --workspace -- --ignored
test-ignored-macos-beta:
needs: [check, check-msrv, check-all-features]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_MSRV}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --features=cli,telemetry,compression,rustls --workspace -- --ignored
test-ignored-macos:
needs: [check, check-msrv, check-all-features]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --features=cli,telemetry,compression,rustls --workspace -- --ignored
test-docs:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- uses: Swatinem/rust-cache@v2
- name: Run doc tests
run: cargo test --doc --all-features --workspace
test-examples-beta:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_BETA}}
- uses: Swatinem/rust-cache@v2
- name: Run doc tests
run: cargo test --all-features --examples --workspace
test-examples-msrv:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_MSRV}}
- uses: Swatinem/rust-cache@v2
- name: Run doc tests
run: cargo test --all-features --examples --workspace
test-examples:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- uses: Swatinem/rust-cache@v2
- name: Run doc tests
run: cargo test --all-features --examples --workspace
test-examples-macos-beta:
needs: [check, check-msrv, check-all-features]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_BETA}}
- uses: Swatinem/rust-cache@v2
- name: Run doc tests
run: cargo test --all-features --examples --workspace
test-examples-macos-msrv:
needs: [check, check-msrv, check-all-features]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN_MSRV}}
- uses: Swatinem/rust-cache@v2
- name: Run doc tests
run: cargo test --all-features --examples --workspace
test-examples-macos:
needs: [check, check-msrv, check-all-features]
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- uses: Swatinem/rust-cache@v2
- name: Run doc tests
run: cargo test --all-features --examples --workspace
cargo-hack:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- name: install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: cargo hack check
run: cargo hack check --each-feature --no-dev-deps --workspace
dependencies-are-sorted:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- uses: Swatinem/rust-cache@v2
- name: Install cargo-sort
run: |
cargo install cargo-sort
- name: Check dependency tables
working-directory: .
run: |
cargo sort --workspace --grouped --check
cargo-deny:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
cargo-fuzz-ua:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{env.RUST_TOOLCHAIN_NIGHTLY}}
- name: Install cargo-fuzz
run: |
cargo install cargo-fuzz
- name: cargo fuzz check
run: |
cargo +nightly fuzz run ua_parse -- -max_len=131072 -max_total_time=30
cargo-fuzz-h2:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{env.RUST_TOOLCHAIN_NIGHTLY}}
- name: Install cargo-fuzz
run: |
cargo install cargo-fuzz
- name: cargo fuzz check
run: |
cargo +nightly fuzz run h2_client -- -max_total_time=30
cargo +nightly fuzz run h2_e2e -- -max_total_time=30
cargo +nightly fuzz run h2_hpack -- -max_total_time=30
test-spec-h2:
needs: [check, check-msrv, check-all-features]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{env.RUST_TOOLCHAIN}}
- name: h2spec
run: |
bash rama-http-core/ci/h2spec.sh -F
# action is not being updated atm
# TODO: enable once it works again, for now not that useful anyway
# semver-checks:
# needs: [check, check-msrv, check-all-features]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Check semver
# uses: obi1kenobi/cargo-semver-checks-action@v2
# with:
# rust-toolchain: ${{env.RUST_TOOLCHAIN}}
deploy-rama-cli-docker:
runs-on: ubuntu-latest
needs:
- test
- test-all-features
- test-examples
# - test-msrv
- test-beta
- test-examples-msrv
- test-examples-beta
- test-ignored
- test-ignored-msrv
- test-ignored-beta
- test-docs
- cargo-hack
- cargo-deny
- test-spec-h2
- cargo-fuzz-ua
- cargo-fuzz-h2
- dependencies-are-sorted
# - semver-checks
if: github.ref == 'refs/heads/main'
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: glendc/rama:latest
file: rama-cli/infra/Dockerfile
deploy-rama-fp-fly:
runs-on: ubuntu-latest
needs: deploy-rama-cli-docker
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: |
cd rama-fp/infra/deployments/fp
flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
deploy-rama-fp-h1-fly:
runs-on: ubuntu-latest
needs: deploy-rama-cli-docker
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: |
cd rama-fp/infra/deployments/fp-h1
flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
deploy-rama-echo-fly:
runs-on: ubuntu-latest
needs: deploy-rama-cli-docker
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: |
cd rama-fp/infra/deployments/echo
flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}