Skip to content

Commit

Permalink
ci: upgrate to nightly-2023-12-11
Browse files Browse the repository at this point in the history
  • Loading branch information
ben1009 committed Jan 9, 2024
1 parent 07ac57b commit fc831c9
Show file tree
Hide file tree
Showing 56 changed files with 229 additions and 230 deletions.
87 changes: 20 additions & 67 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,22 @@ on:
push:
branches: [main, master]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

name: check
jobs:
fmt:
runs-on: ubuntu-latest
name: stable / fmt
strategy:
fail-fast: false
matrix:
toolchain: [nightly-2023-12-11]
name: fmt
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
Expand All @@ -22,8 +33,10 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@04b56c7813dcfe81f02753d8f4fe8b3635aa2dc0 # stable
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
# with:
# components: rustfmt
# - name: cargo fmt --check
Expand All @@ -41,7 +54,7 @@ jobs:
strategy:
fail-fast: false
matrix:
toolchain: [stable, beta]
toolchain: [nightly-2023-12-11]
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
Expand All @@ -52,70 +65,10 @@ jobs:
with:
submodules: true
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@e12eda571dc9a5ee5d58eecf4738ec291c66f295 # master
uses: dtolnay/rust-toolchain@master # master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
- name: cargo clippy
uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # v1.0.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
doc:
runs-on: ubuntu-latest
name: nightly / doc
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
- name: Install nightly
uses: dtolnay/rust-toolchain@655bc29a221a62ee6edb6a0fa9d9530cf424d31d # nightly
- name: cargo doc
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: --cfg docsrs
hack:
runs-on: ubuntu-latest
name: ubuntu / stable / features
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@04b56c7813dcfe81f02753d8f4fe8b3635aa2dc0 # stable
- name: cargo install cargo-hack
uses: taiki-e/install-action@de2548c6ca44a5affa3f3edd100cc348412010ab # cargo-hack
- name: cargo hack
run: cargo hack --feature-powerset check --lib --tests
msrv:
runs-on: ubuntu-latest
# we use a matrix here just because env can't be used in job names
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
strategy:
matrix:
msrv: [1.56.1] # 2021 edition requires 1.56
name: ubuntu / ${{ matrix.msrv }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- run: cargo clippy --workspace --all-features --all-targets -- -D warnings

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
- name: Install ${{ matrix.msrv }}
uses: dtolnay/rust-toolchain@e12eda571dc9a5ee5d58eecf4738ec291c66f295 # master
with:
toolchain: ${{ matrix.msrv }}
- name: cargo +${{ matrix.msrv }} check
run: cargo check

32 changes: 0 additions & 32 deletions .github/workflows/rust.yml.bak

This file was deleted.

49 changes: 23 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@ on:
push:
branches: [main, master]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

name: test
jobs:
required:
runs-on: ubuntu-latest
name: ubuntu / ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: [stable, beta]
toolchain: [nightly-2023-12-11]
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
Expand All @@ -30,31 +37,15 @@ jobs:
run: cargo generate-lockfile
# https://twitter.com/jonhoo/status/1571290371124260865
- name: cargo test --locked
run: cargo test --locked --all-features --all-targets
# minimal:
# runs-on: ubuntu-latest
# name: ubuntu / stable / minimal-versions
# steps:
# - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# with:
# submodules: true
# - name: Install stable
# uses: dtolnay/rust-toolchain@04b56c7813dcfe81f02753d8f4fe8b3635aa2dc0 # stable
# - name: Install nightly for -Zminimal-versions
# uses: dtolnay/rust-toolchain@nightly
# - name: rustup default stable
# run: rustup default stable
# - name: cargo update -Zminimal-versions
# run: cargo +nightly update -Zminimal-versions
# - name: cargo test
# run: cargo test --locked --all-features --all-targets
run: cargo test --locked --workspace --all-features --all-targets
os-check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / stable
name: ${{ matrix.os }} / nightly
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
toolchain: [nightly-2023-12-11]
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
Expand All @@ -64,16 +55,21 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@04b56c7813dcfe81f02753d8f4fe8b3635aa2dc0 # stable
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo test
run: cargo test --locked --all-features --all-targets
coverage:
runs-on: ubuntu-latest
name: ubuntu / stable / coverage
name: ubuntu / nightly / coverage
strategy:
matrix:
toolchain: [nightly-2023-12-11]
steps:
- name: Harden Runner
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1
Expand All @@ -83,17 +79,18 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@04b56c7813dcfe81f02753d8f4fe8b3635aa2dc0 # stable
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: llvm-tools-preview
- name: cargo install cargo-llvm-cov
uses: taiki-e/install-action@29ee91bbad05696171dd917a8c7a3838049b93d5 # cargo-llvm-cov
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo llvm-cov
run: cargo llvm-cov --locked --all-features --lcov --output-path lcov.info
run: cargo llvm-cov --locked --workspace --all-features --all-targets --lcov --output-path lcov.info
- name: Upload to codecov.io
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
Expand Down
13 changes: 8 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ authors = ["ben1009"]
edition = "2021"

[dependencies]
futures = { version = "0.3.5", features = ["thread-pool"] }
openssl = { version = "0.10", features = ["vendored"] }
rand = "0.6.5"
regex = "1.3.4"
reqwest = "0.9.8"
serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"
rand = "0.6.5"
regex = "1.3.4"
futures = { version = "0.3.5", features = ["thread-pool"] }
serde_json = "1.0"
surf = "1.0.3"
openssl = { version = "0.10", features = ["vendored"] }

[lib]
doctest = false
test = true

[package.metadata.cargo-machete]
ignored = ["openssl", "serde"]
Loading

0 comments on commit fc831c9

Please sign in to comment.