Skip to content

Commit a83f619

Browse files
madeyeclaude
andcommitted
Add CI workflow for check, clippy, fmt, test, and build
Runs on push/PR to master. Builds release binaries for Linux x86_64 and macOS ARM64, uploaded as artifacts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 04db22b commit a83f619

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
check:
14+
name: Check
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: dtolnay/rust-toolchain@stable
19+
- uses: Swatinem/rust-cache@v2
20+
- run: cargo check
21+
22+
clippy:
23+
name: Clippy
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: dtolnay/rust-toolchain@stable
28+
with:
29+
components: clippy
30+
- uses: Swatinem/rust-cache@v2
31+
- run: cargo clippy -- -D warnings
32+
33+
fmt:
34+
name: Format
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: dtolnay/rust-toolchain@stable
39+
with:
40+
components: rustfmt
41+
- run: cargo fmt --check
42+
43+
test:
44+
name: Test
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: dtolnay/rust-toolchain@stable
49+
- uses: Swatinem/rust-cache@v2
50+
- run: cargo test
51+
52+
build:
53+
name: Build (${{ matrix.target }})
54+
runs-on: ${{ matrix.os }}
55+
strategy:
56+
matrix:
57+
include:
58+
- os: ubuntu-latest
59+
target: x86_64-unknown-linux-gnu
60+
- os: macos-latest
61+
target: aarch64-apple-darwin
62+
steps:
63+
- uses: actions/checkout@v4
64+
- uses: dtolnay/rust-toolchain@stable
65+
- uses: Swatinem/rust-cache@v2
66+
with:
67+
key: ${{ matrix.target }}
68+
- run: cargo build --release --target ${{ matrix.target }}
69+
- uses: actions/upload-artifact@v4
70+
with:
71+
name: https_proxy-${{ matrix.target }}
72+
path: target/${{ matrix.target }}/release/https_proxy

0 commit comments

Comments
 (0)