-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
534 additions
and
77 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
rebase-strategy: "disabled" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
permissions: | ||
contents: read | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
name: Check | ||
jobs: | ||
fmt: | ||
runs-on: ubuntu-latest | ||
name: stable / fmt | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- name: cargo fmt --check | ||
run: cargo fmt --check | ||
clippy: | ||
runs-on: ubuntu-latest | ||
name: ${{ matrix.toolchain }} / clippy | ||
permissions: | ||
contents: read | ||
checks: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
toolchain: [stable, beta] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install ${{ matrix.toolchain }} | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
components: clippy | ||
- name: cargo clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
doc: | ||
runs-on: ubuntu-latest | ||
name: nightly / doc | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install nightly | ||
uses: dtolnay/rust-toolchain@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: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: cargo install cargo-hack | ||
uses: taiki-e/install-action@cargo-hack | ||
- name: cargo hack | ||
run: cargo hack --feature-powerset check --lib --tests | ||
|
||
dependency-audit: | ||
runs-on: ubuntu-latest | ||
name: Dependency audit | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: rustsec/audit-check@v1.4.1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
continue-on-error: true | ||
|
||
cargo-deny: | ||
name: cargo-deny | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
checks: | ||
# - advisories | ||
- bans licenses sources | ||
|
||
# Prevent sudden announcement of a new advisory from failing ci: | ||
continue-on-error: ${{ matrix.checks == 'advisories' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
command: check ${{ matrix.checks }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Release | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release-plz: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.RELEASE_PLZ_TOKEN }} | ||
|
||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Run release-plz | ||
uses: MarcoIeni/release-plz-action@v0.5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }} | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
permissions: | ||
contents: read | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
schedule: | ||
- cron: "7 7 * * *" | ||
name: Rolling | ||
|
||
jobs: | ||
nightly: | ||
runs-on: ubuntu-latest | ||
name: ubuntu / nightly | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install nightly | ||
uses: dtolnay/rust-toolchain@nightly | ||
- name: cargo generate-lockfile | ||
if: hashFiles('Cargo.lock') == '' | ||
run: cargo generate-lockfile | ||
- name: cargo test --locked | ||
run: cargo test --locked --all-features --all-targets | ||
|
||
update: | ||
runs-on: ubuntu-latest | ||
name: ubuntu / beta / updated | ||
# There's no point running this if no Cargo.lock was checked in in the | ||
# first place, since we'd just redo what happened in the regular test job. | ||
# Unfortunately, hashFiles only works in if on steps, so we reepeat it. | ||
# if: hashFiles('Cargo.lock') != '' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install beta | ||
if: hashFiles('Cargo.lock') != '' | ||
uses: dtolnay/rust-toolchain@beta | ||
- name: cargo update | ||
if: hashFiles('Cargo.lock') != '' | ||
run: cargo update | ||
- name: cargo test | ||
if: hashFiles('Cargo.lock') != '' | ||
run: cargo test --locked --all-features --all-targets | ||
env: | ||
RUSTFLAGS: -D deprecated |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
permissions: | ||
contents: read | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
name: Test | ||
jobs: | ||
required: | ||
runs-on: ubuntu-latest | ||
name: ubuntu / ${{ matrix.toolchain }} | ||
strategy: | ||
matrix: | ||
toolchain: [stable, beta] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install ${{ matrix.toolchain }} | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
- name: cargo generate-lockfile | ||
if: hashFiles('Cargo.lock') == '' | ||
run: cargo generate-lockfile | ||
- name: Restore cached target/ | ||
id: target-cache-restore | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
target | ||
/home/runner/.cargo | ||
key: ${{ matrix.toolchain }}-target | ||
- name: cargo test --locked | ||
run: cargo test --locked --all-features --all-targets | ||
- name: Save cached target/ | ||
id: target-cache-save | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: | | ||
target | ||
/home/runner/.cargo | ||
key: ${{ steps.target-cache-restore.outputs.cache-primary-key }} | ||
|
||
proptest: | ||
runs-on: ubuntu-latest | ||
name: ubuntu / stable | ||
needs: required | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Restore cached target/ | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
target | ||
/home/runner/.cargo | ||
key: stable-target | ||
- name: cargo test --test proptest --locked -- --ignored | ||
run: cargo test --locked --test proptest -- --ignored | ||
|
||
# minimal: | ||
# runs-on: ubuntu-latest | ||
# name: ubuntu / stable / minimal-versions | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# submodules: true | ||
# - name: Install stable | ||
# uses: dtolnay/rust-toolchain@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 | ||
# | ||
os-check: | ||
runs-on: ${{ matrix.os }} | ||
name: ${{ matrix.os }} / stable | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, windows-latest] | ||
steps: | ||
- run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append | ||
if: runner.os == 'Windows' | ||
- run: vcpkg install openssl:x64-windows-static-md | ||
if: runner.os == 'Windows' | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
- 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 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Install stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: llvm-tools-preview | ||
- name: cargo install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: cargo generate-lockfile | ||
if: hashFiles('Cargo.lock') == '' | ||
run: cargo generate-lockfile | ||
- name: Restore cached target/ | ||
id: target-cache-restore | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
target | ||
/home/runner/.cargo | ||
key: coverage-target | ||
- name: cargo llvm-cov clean | ||
run: cargo llvm-cov clean --workspace | ||
- name: cargo llvm-cov | ||
run: cargo llvm-cov --locked --all-features --no-report --release | ||
- name: cargo llvm-cov proptest | ||
run: cargo llvm-cov --locked --all-features --no-report --release --test proptest -- --ignored | ||
- name: Save cached target/ | ||
id: target-cache-save | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: | | ||
target | ||
/home/runner/.cargo | ||
key: ${{ steps.target-cache-restore.outputs.cache-primary-key }} | ||
- name: cargo llvm-cov report | ||
run: cargo llvm-cov report --release --lcov --output-path lcov.info | ||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
fail_ci_if_error: true | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
Oops, something went wrong.