Skip to content

Commit fa95ffa

Browse files
committed
init
Signed-off-by: YdrMaster <[email protected]>
0 parents  commit fa95ffa

File tree

16 files changed

+444
-0
lines changed

16 files changed

+444
-0
lines changed

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[alias]
2+
xtask = "run --package xtask --release --"
3+
debug = "run --package xtask --"
4+
setup = "xtask setup"
5+
learn = "xtask learn"
6+
eval = "xtask eval"

.github/workflows/build.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# rust-clippy is a tool that runs a bunch of lints to catch common
6+
# mistakes in your Rust code and help improve your Rust code.
7+
# More details at https://github.com/rust-lang/rust-clippy
8+
# and https://rust-lang.github.io/rust-clippy/
9+
10+
name: CI
11+
12+
on:
13+
pull_request:
14+
push:
15+
paths-ignore:
16+
- '**.md'
17+
- 'LICENSE'
18+
19+
jobs:
20+
rust-clippy-analyze:
21+
name: Run rust-clippy analyzing
22+
runs-on: ubuntu-latest
23+
permissions:
24+
security-events: write
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: Use latest toolchain
30+
run: rustup update
31+
32+
- name: Check format
33+
run: cargo fmt --check
34+
35+
- name: Run test
36+
run: cargo test --release
37+
38+
- name: Install required cargo
39+
run: cargo install clippy-sarif sarif-fmt
40+
41+
- name: Run rust-clippy
42+
run:
43+
cargo clippy
44+
--all-features
45+
--all-targets
46+
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
47+
continue-on-error: true
48+
49+
- name: Upload analysis results to GitHub
50+
uses: github/codeql-action/upload-sarif@v3
51+
with:
52+
sarif_file: rust-clippy-results.sarif
53+
wait-for-processing: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

Cargo.lock

Lines changed: 254 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[workspace]
2+
members = ["environment", "course", "xtask"]
3+
resolver = "3"
4+
package.edition = "2024"

LICENSE

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The MIT License (MIT)
2+
Copyright © 2025 YdrMaster
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5+
6+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7+
8+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# learning in camp
2+
3+
Opencamp 训练营通用学习工具。
4+
5+
## 环境准备
6+
7+
- cargo;
8+
- git;
9+
10+
## 功能
11+
12+
```shell
13+
cargo xtask --help
14+
```
15+
16+
```plaintext
17+
Usage: xtask <COMMAND>
18+
19+
Commands:
20+
setup
21+
learn
22+
eval
23+
help Print this message or the help of the given subcommand(s)
24+
25+
Options:
26+
-h, --help Print help
27+
-V, --version Print version
28+
```

course/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "course"
3+
version = "0.0.0"
4+
edition.workspace = true
5+
6+
[dependencies]

course/src/lib.rs

Whitespace-only changes.

environment/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[package]
2+
name = "environment"
3+
version = "0.0.0"
4+
edition.workspace = true
5+
6+
[dependencies]

0 commit comments

Comments
 (0)