Skip to content

Commit

Permalink
Merge pull request #1 from sebastienrousseau/feat/cmn
Browse files Browse the repository at this point in the history
feat(cmn): v0.0.3
  • Loading branch information
sebastienrousseau authored May 13, 2023
2 parents a4a68ee + fa09d45 commit c97b11e
Show file tree
Hide file tree
Showing 33 changed files with 3,323 additions and 906 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
xtask = "run --package xtask --bin xtask --"
67 changes: 0 additions & 67 deletions .github/CONTRIBUTING.md

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 🧪 Audit

on:
push:
branches:
- feat/cmn
pull_request:
branches:
- feat/cmn
release:
types: [created]

jobs:
dependencies:
name: Audit dependencies
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
- name: Install cargo-audit
run: cargo install cargo-audit
- uses: actions/checkout@master
- name: Audit dependencies
run: cargo audit
23 changes: 23 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 🧪 Check

on:
push:
branches:
- feat/cmn
pull_request:
branches:
- feat/cmn
release:
types: [created]

jobs:
all:
name: Check
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
with:
components: clippy
- uses: actions/checkout@master
- name: Check lints
run: cargo check --all-targets --workspace --all-features
57 changes: 57 additions & 0 deletions .github/workflows/document.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: 🧪 Document

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
all:
name: Document
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: nightly

- uses: actions/checkout@v3

- name: Update libssl
run: |
sudo apt-get update
sudo apt-get install -y libssl1.1
- name: Generate documentation for all features and publish it
run: |
RUSTDOCFLAGS="--cfg docsrs" \
cargo doc --no-deps --all-features --workspace
# Write index.html with redirect
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
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

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3.9.3
with:
cname: true
commit_message: Deploy documentation at ${{ github.sha }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc
user_email: actions@users.noreply.github.com
user_name: github-actions
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 🧪 Lint

on:
push:
branches:
- feat/cmn
pull_request:
branches:
- feat/cmn
release:
types: [created]

jobs:
all:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: hecrj/setup-rust-action@v1
with:
components: clippy
- uses: actions/checkout@master
- name: Check lints
run: cargo clippy --workspace --all-features --all-targets --no-deps -- -D warnings
Loading

0 comments on commit c97b11e

Please sign in to comment.