Skip to content

Commit b366586

Browse files
committed
initt
1 parent 6e8e25e commit b366586

21 files changed

Lines changed: 1964 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: ci
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
push:
7+
branches:
8+
- main
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
jobs:
13+
build:
14+
name: build test fmt etc
15+
runs-on: ubuntu-latest # TODO: self-hosted explainer/link
16+
17+
steps:
18+
- name: checkout code
19+
uses: actions/checkout@v6
20+
21+
- name: install rust toolchain
22+
uses: dtolnay/rust-toolchain@stable
23+
with:
24+
components: rustfmt, clippy
25+
26+
- name: cache cargo registry
27+
uses: actions/cache@v4
28+
with:
29+
path: ~/.cargo/registry
30+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-cargo-registry-
33+
34+
- name: Cache cargo index
35+
uses: actions/cache@v4
36+
with:
37+
path: ~/.cargo/git
38+
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
39+
restore-keys: |
40+
${{ runner.os }}-cargo-git-
41+
42+
- name: Cache cargo build
43+
uses: actions/cache@v4
44+
with:
45+
path: target
46+
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
47+
restore-keys: |
48+
${{ runner.os }}-cargo-build-target-
49+
50+
# build before fmt/clippy/etc
51+
- name: Build
52+
run: cargo build --verbose
53+
54+
- name: Run tests
55+
run: cargo test --verbose
56+
57+
- name: Build examples
58+
run: cargo build --examples --verbose
59+
60+
- name: Run clippy
61+
run: cargo clippy -- -D warnings
62+
63+
- name: Check formatting
64+
run: cargo fmt -- --check
65+
66+
build-release:
67+
name: Build Release
68+
runs-on: self-hosted
69+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
70+
71+
steps:
72+
- name: Checkout code
73+
uses: actions/checkout@v6
74+
75+
- name: Install Rust toolchain
76+
uses: dtolnay/rust-toolchain@stable
77+
78+
- name: Cache cargo registry
79+
uses: actions/cache@v4
80+
with:
81+
path: ~/.cargo/registry
82+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
83+
restore-keys: |
84+
${{ runner.os }}-cargo-registry-
85+
86+
- name: Cache cargo index
87+
uses: actions/cache@v4
88+
with:
89+
path: ~/.cargo/git
90+
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
91+
restore-keys: |
92+
${{ runner.os }}-cargo-git-
93+
94+
- name: Cache cargo build
95+
uses: actions/cache@v4
96+
with:
97+
path: target
98+
key: ${{ runner.os }}-cargo-build-release-${{ hashFiles('**/Cargo.lock') }}
99+
restore-keys: |
100+
${{ runner.os }}-cargo-build-release-
101+
102+
- name: Build release
103+
run: cargo build --release --verbose
104+
105+
- name: Upload binary artifact
106+
uses: actions/upload-artifact@v4
107+
with:
108+
name: madstack
109+
path: target/release/madstack
110+
if-no-files-found: error

.github/workflows/todo.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: TODO
2+
on:
3+
push:
4+
branches:
5+
- main
6+
permissions:
7+
contents: read
8+
issues: write
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@main
14+
- name: run tdg-github-action
15+
uses: ribtoks/tdg-github-action@master
16+
with:
17+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
REPO: ${{ github.repository }}
19+
SHA: ${{ github.sha }}
20+
REF: ${{ github.ref }}

CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
run ./bin/ccc to validate changes
2+
3+
break api paths into groups like: "/user/name" and "/user/age" into users.rs
4+
5+
we're using maud, axum, and diesel

0 commit comments

Comments
 (0)