Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.0.4 #24

Merged
merged 7 commits into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .cargo/config.toml

This file was deleted.

13 changes: 9 additions & 4 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: πŸ§ͺ Audit
on:
push:
branches:
- main
- feat/cmn
pull_request:
branches:
Expand All @@ -15,9 +16,13 @@ jobs:
name: Audit dependencies
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
- uses: hecrj/setup-rust-action@v2
- name: Install cargo-audit
run: cargo install cargo-audit
- uses: actions/checkout@master
- name: Audit dependencies
run: cargo audit

- uses: actions/checkout@v4
- name: Resolve dependencies
run: cargo update

- name: Audit vulnerabilities
run: cargo audit
7 changes: 4 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: πŸ§ͺ Check
on:
push:
branches:
- main
- feat/cmn
pull_request:
branches:
Expand All @@ -15,9 +16,9 @@ jobs:
name: Check
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
- uses: hecrj/setup-rust-action@v2
with:
components: clippy
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Check lints
run: cargo check --all-targets --workspace --all-features
run: cargo check --all-targets --workspace --all-features
61 changes: 61 additions & 0 deletions .github/workflows/coverage.yml
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/grcov@v0.1
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 }}
12 changes: 7 additions & 5 deletions .github/workflows/document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
pull_request:
branches:
- main
release:
types: [created]

jobs:
all:
Expand All @@ -16,11 +18,11 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: hecrj/setup-rust-action@v1
- uses: hecrj/setup-rust-action@v2
with:
rust-version: nightly

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Update libssl
run: |
Expand All @@ -35,18 +37,18 @@ jobs:
echo '<html><head><meta http-equiv="refresh" content="0; url=/cmn/"></head><body></body></html>' > ./target/doc/index.html

- name: Deploy
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: documentation
path: target/doc
if-no-files-found: error
retention-days: 1

- name: Write CNAME file
run: echo 'doc.cmnlib.one' > ./target/doc/CNAME
run: echo 'doc.cmnlib.com' > ./target/doc/CNAME

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3.9.3
uses: peaceiris/actions-gh-pages@v4
with:
cname: true
commit_message: Deploy documentation at ${{ github.sha }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
- uses: hecrj/setup-rust-action@v2
with:
components: clippy
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Check lints
run: cargo clippy --workspace --all-features --all-targets --no-deps -- -D warnings
run: cargo clippy --workspace --all-features --all-targets --no-deps -- -D warnings
Loading
Loading