-
Notifications
You must be signed in to change notification settings - Fork 39
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
5 changed files
with
62 additions
and
58 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
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
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 |
---|---|---|
|
@@ -11,11 +11,31 @@ jobs: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Run tests | ||
run: cargo test --verbose | ||
- name: Verify working directory is clean | ||
run: git diff --exit-code | ||
|
||
build: | ||
build-latest: | ||
name: Latest build on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
id: toolchain | ||
- run: rustup override set ${{steps.toolchain.outputs.name}} | ||
- name: Remove lockfile to build with latest dependencies | ||
run: rm Cargo.lock | ||
- name: Build crate | ||
run: cargo build --all-features --verbose | ||
- name: Verify working directory is clean (excluding lockfile) | ||
run: git diff --exit-code ':!Cargo.lock' | ||
|
||
build-nodefault: | ||
name: Build target ${{ matrix.target }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -24,7 +44,7 @@ jobs: | |
- wasm32-wasi | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Add target | ||
run: rustup target add ${{ matrix.target }} | ||
- run: cargo fetch | ||
|
@@ -35,7 +55,7 @@ jobs: | |
name: Bitrot check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
# Build benchmarks to prevent bitrot | ||
- name: Build benchmarks | ||
run: cargo build --benches | ||
|
@@ -44,54 +64,43 @@ jobs: | |
name: Book tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup mdBook | ||
uses: peaceiris/actions-mdbook@v1 | ||
with: | ||
mdbook-version: '0.4.5' | ||
- uses: actions/checkout@v4 | ||
- name: Install mdbook and mdbook-katex | ||
run: | | ||
mkdir mdbook | ||
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.35/mdbook-v0.4.35-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook | ||
echo `pwd`/mdbook >> $GITHUB_PATH | ||
- name: Test Orchard book | ||
run: mdbook test book/ | ||
|
||
codecov: | ||
name: Code coverage | ||
runs-on: ubuntu-latest | ||
container: | ||
image: xd009642/tarpaulin:develop-nightly | ||
options: --security-opt seccomp=unconfined | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
# Use stable for this to ensure that cargo-tarpaulin can be built. | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Install cargo-tarpaulin | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: cargo-tarpaulin | ||
- uses: actions/checkout@v4 | ||
- name: Generate coverage report | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: tarpaulin | ||
args: --all-features --timeout 600 --out Xml | ||
run: cargo tarpaulin --engine llvm --all-features --release --timeout 600 --out xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
uses: codecov/[email protected] | ||
|
||
doc-links: | ||
name: Intra-doc links | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- run: cargo fetch | ||
# Requires #![deny(intra_doc_link_resolution_failure)] in crates. | ||
# Requires #![deny(rustdoc::broken_intra_doc_links)] in crates. | ||
- name: Check intra-doc links | ||
run: cargo doc --document-private-items | ||
run: cargo doc --all-features --document-private-items | ||
|
||
fmt: | ||
name: Rustfmt | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- run: cargo fmt -- --check |
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 |
---|---|---|
|
@@ -11,17 +11,14 @@ jobs: | |
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: beta | ||
components: clippy | ||
override: true | ||
- name: Run Clippy (beta) | ||
uses: actions-rs/clippy-check@v1 | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@beta | ||
id: toolchain | ||
- run: rustup override set ${{steps.toolchain.outputs.name}} | ||
- name: Run Clippy | ||
uses: auguwu/[email protected] | ||
continue-on-error: true | ||
with: | ||
name: Clippy (beta) | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --all-targets | ||
|
||
working-directory: ${{ inputs.target }} | ||
warn: clippy::all |
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 |
---|---|---|
|
@@ -9,10 +9,10 @@ jobs: | |
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Run Clippy | ||
uses: actions-rs/clippy-check@v1 | ||
uses: auguwu/clippy-[email protected] | ||
with: | ||
name: Clippy (MSRV) | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features --all-targets -- -D warnings | ||
working-directory: ${{ inputs.target }} | ||
deny: warnings |