upload code
This commit is contained in:
commit
3f507064ce
111 changed files with 9258 additions and 0 deletions
37
.github/workflows/rust.yml
vendored
Normal file
37
.github/workflows/rust.yml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
- name: Get Rust Version
|
||||
id: rust-version
|
||||
run: echo "::set-output name=version::$(cargo -V | head -n1 | awk '{print $2}')"
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/git
|
||||
~/.cargo/registry
|
||||
target
|
||||
key: ${{runner.os}}-rust-${{steps.rust-version.outputs.version}}
|
||||
|
||||
- run: cargo test
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
rustfmt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
with:
|
||||
components: rustfmt
|
||||
- run: cargo fmt --all -- --check
|
Reference in a new issue