-
Notifications
You must be signed in to change notification settings - Fork 0
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
6 changed files
with
150 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 'Setup Rust' | ||
description: 'Setup Rust by rustup' | ||
|
||
inputs: | ||
channel: | ||
description: 'Rust release channel[stable|beta|nightly]' | ||
default: stable | ||
required: false | ||
target: | ||
description: 'Rust build target' | ||
default: '' | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install Rust toolchain | ||
shell: bash | ||
run: | | ||
rustup update --no-self-update ${{ inputs.channel }} | ||
rustup default ${{ inputs.channel }} | ||
- name: Echo rust version | ||
shell: bash | ||
run: | | ||
rustc --version | ||
- if: ${{ inputs.target != '' }} | ||
name: Install Rust target | ||
shell: bash | ||
run: | | ||
rustup target add ${{ inputs.target }} |
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,15 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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,26 @@ | ||
name: rust-bench | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["*"] | ||
|
||
jobs: | ||
rust-bench: | ||
name: Run rust-bench | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup-rust | ||
with: | ||
channel: nightly | ||
- name: Install dependencies | ||
run: | | ||
apt update | ||
apt install -y fuse3 libfuse3-dev | ||
- name: Run rust-bench | ||
run: | | ||
cargo bench --locked --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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: format | ||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
rust_check_format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup-rust | ||
- name: run check format | ||
run: cargo fmt --check | ||
env: | ||
RUST_BACKTRACE: 1 |
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,43 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# rust-clippy is a tool that runs a bunch of lints to catch common | ||
# mistakes in your Rust code and help improve your Rust code. | ||
# More details at https://github.com/rust-lang/rust-clippy | ||
# and https://rust-lang.github.io/rust-clippy/ | ||
|
||
name: rust-clippy analyze | ||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
schedule: | ||
- cron: '29 14 * * 0' | ||
jobs: | ||
rust-clippy-analyze: | ||
name: Run rust-clippy analyzing | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
security-events: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup-rust | ||
- name: Install dependencies | ||
run: | | ||
apt update | ||
apt install -y fuse3 libfuse3-dev | ||
- name: Install required cargo | ||
run: cargo install clippy-sarif sarif-fmt | ||
- name: Run rust-clippy | ||
run: | | ||
cargo clippy --locked --all-features --message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt | ||
continue-on-error: true | ||
- name: Upload analysis results to GitHub | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: rust-clippy-results.sarif | ||
wait-for-processing: true |
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,22 @@ | ||
name: test | ||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
rust_doc_test: | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup-rust | ||
- name: Install dependencies | ||
run: | | ||
apt update | ||
apt install -y fuse3 libfuse3-dev | ||
- name: Run test | ||
run: cargo test --locked --release | ||
env: | ||
RUST_BACKTRACE: 1 |