-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
661a806
commit 6f3eb91
Showing
33 changed files
with
925 additions
and
975 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ name: 🧪 Check | |
on: | ||
push: | ||
branches: | ||
- main | ||
- feat/hsh | ||
pull_request: | ||
branches: | ||
|
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,61 @@ | ||
name: 📶 Coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
coverage: | ||
name: Code Coverage | ||
runs-on: ubuntu-latest | ||
env: | ||
CARGO_INCREMENTAL: "0" | ||
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests" | ||
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests" | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Setup Rust nightly | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
id: toolchain | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
# Configure cache for Cargo | ||
- name: Cache Cargo registry, index | ||
uses: actions/cache@v4 | ||
id: cache-cargo | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/bin | ||
~/.cargo/git | ||
key: linux-${{ steps.toolchain.outputs.rustc_hash }}-rust-cov-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
# Run tests with all features | ||
- name: Test (cargo test) | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: "--workspace" | ||
|
||
# Install grcov | ||
- uses: actions-rs/[email protected] | ||
id: coverage | ||
|
||
# Upload to Codecov.io | ||
- name: Upload to Codecov.io | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ${{ steps.coverage.outputs.report }} |
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 |
---|---|---|
|
@@ -3,10 +3,10 @@ name: 🧪 Document | |
on: | ||
push: | ||
branches: | ||
- feat/hsh | ||
- main | ||
pull_request: | ||
branches: | ||
- feat/hsh | ||
- main | ||
release: | ||
types: [created] | ||
|
||
|
@@ -45,16 +45,15 @@ jobs: | |
retention-days: 1 | ||
|
||
- name: Write CNAME file | ||
run: echo 'doc.hshlib.one' > ./target/doc/CNAME | ||
run: echo 'doc.hshlib.com' > ./target/doc/CNAME | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./target/doc | ||
publish_branch: gh-pages | ||
cname: true | ||
clean: true | ||
commit_message: Deploy documentation at ${{ github.sha }} | ||
commit_user_name: github-actions | ||
commit_user_email: [email protected] | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: ./target/doc | ||
user_email: [email protected] | ||
user_name: github-actions |
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 |
---|---|---|
|
@@ -37,33 +37,4 @@ jobs: | |
# Run tests with all features | ||
- name: Run tests with all features | ||
id: run-tests-all-features | ||
run: cargo test --verbose --workspace --all-features | ||
|
||
# Install grcov | ||
- name: Install grcov | ||
# Only run this job on the main branch when a commit is pushed. | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
id: install-grcov | ||
run: | | ||
mkdir -p "${HOME}/.local/bin" | ||
curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.18/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - -C "${HOME}/.local/bin" | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
# Use grcov to generate a coverage report | ||
- name: Generate coverage report | ||
# Only run this job on the main branch when a commit is pushed. | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
id: generate-code-coverage | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: xtask | ||
args: coverage | ||
|
||
# Upload the coverage report to codecov | ||
- name: Upload coverage report to codecov | ||
# Only run this job on the main branch when a commit is pushed. | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
id: upload-report-codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: coverage/*.lcov | ||
run: cargo test --verbose --workspace --all-features |
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ build | |
Icon? | ||
src/.DS_Store | ||
tarpaulin-report.html | ||
Cargo.lock |
Oops, something went wrong.