Skip to content

Commit 16f1672

Browse files
ci: init (#1)
1 parent ad2bf12 commit 16f1672

5 files changed

Lines changed: 2877 additions & 1 deletion

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Cargo.lock merge=binary linguist-language=TOML linguist-generated=true

.github/workflows/build.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- ".github/workflows/build.yml"
8+
- "Cargo.toml"
9+
- "Cargo.lock"
10+
- "src/**"
11+
12+
pull_request:
13+
branches: [main]
14+
paths:
15+
- ".github/workflows/build.yml"
16+
- "Cargo.toml"
17+
- "Cargo.lock"
18+
- "src/**"
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
cargo-build:
26+
name: Cargo Build
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- name: Fetch Repository
31+
uses: actions/checkout@v6
32+
33+
- name: Install stable toolchain
34+
uses: actions-rust-lang/setup-rust-toolchain@v1
35+
36+
- name: cargo build
37+
run: cargo build --workspace --all-targets --all-features
38+
39+
cargo-fmt:
40+
name: Cargo fmt
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- name: Fetch Repository
45+
uses: actions/checkout@v6
46+
47+
- name: Install stable toolchain
48+
uses: actions-rust-lang/setup-rust-toolchain@v1
49+
with:
50+
components: rustfmt
51+
52+
- name: Rustfmt Check
53+
run: cargo fmt --all --check
54+
55+
cargo-clippy:
56+
name: Cargo clippy
57+
runs-on: ubuntu-latest
58+
59+
steps:
60+
- name: Fetch Repository
61+
uses: actions/checkout@v6
62+
63+
- name: Install stable toolchain
64+
uses: actions-rust-lang/setup-rust-toolchain@v1
65+
with:
66+
components: clippy
67+
68+
- name: Clippy Check
69+
run: cargo clippy --workspace --all-targets --all-features -- -Dwarnings

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
# Rust
66
/target/
7-
Cargo.lock
87

98
# Output files
109
.gh-ci-tool/*

0 commit comments

Comments
 (0)