Skip to content

Commit

Permalink
feat: Initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
GrayJack committed May 15, 2024
0 parents commit ed4d623
Show file tree
Hide file tree
Showing 19 changed files with 1,661 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Check

on:
push:
branches: ["**"]
tags-ignore: ["**"]
paths-ignore:
- "**.md"
- LICENSE
- .github/FUNDING.yml
- .gitignore
pull_request:
paths-ignore:
- "**.md"
- "**/LICENSE"
- .github/FUNDING.yml
- .editorconfig
- .gitignore

jobs:
check:
name: Check and Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ["1.56.0", "stable", "nightly"]
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Cache cargo output
uses: Swatinem/rust-cache@v2
- name: Check
run: cargo check
- name: Run tests
run: cargo test

# miri:
# name: Miri
# runs-on: ubuntu-latest
# steps:
# - name: Checkout sources
# uses: actions/checkout@v4
# - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@master
# with:
# toolchain: nightly
# components: miri
# - name: Setup miri
# run: cargo miri setup
# - name: Run miri
# run: cargo miri test
54 changes: 54 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: docs
on:
push:
branches:
- dev
paths-ignore:
- "**.md"
- LICENSE
- .github/FUNDING.yml
- .gitignore

jobs:
rustdoc:
runs-on: ubuntu-latest
env:
# RUSTFLAGS: -D warnings
CARGO_INCREMENTAL: 0

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rust-src

- name: Cache cargo output
uses: Swatinem/rust-cache@v2

- name: Build Rust Documentation
env:
RUSTDOCFLAGS: --cfg _doc
run: cargo doc -Zrustdoc-map

- name: Build C Documentation
uses: mattnotmitt/[email protected]

- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./target/doc
force_orphan: true

- name: Deploy External Docs
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: oxilibc/oxilibc-docs
publish_branch: main # default: gh-pages
publish_dir: ./target/doc
31 changes: 31 additions & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Format test

on:
push:
paths-ignore:
- "**.md"
- LICENSE
- .github/FUNDING.yml
- .gitignore
pull_request:
paths-ignore:
- "**.md"
- "**/LICENSE"
- .github/FUNDING.yml
- .editorconfig
- .gitignore

jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt
- name: Check Format
run: cargo fmt -- --check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wip/
Loading

0 comments on commit ed4d623

Please sign in to comment.