Skip to content

Commit 1d11706

Browse files
committed
chore: initial release v0.1.0
0 parents  commit 1d11706

50 files changed

Lines changed: 7936 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
branches: [master, main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUSTFLAGS: -D warnings
12+
13+
jobs:
14+
test:
15+
name: Test (${{ matrix.os }})
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest, macos-latest]
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Install Rust stable
26+
uses: dtolnay/rust-toolchain@stable
27+
with:
28+
components: rustfmt, clippy
29+
30+
- name: Cache cargo registry
31+
uses: actions/cache@v4
32+
with:
33+
path: |
34+
~/.cargo/registry/index/
35+
~/.cargo/registry/cache/
36+
~/.cargo/git/db/
37+
target/
38+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
39+
restore-keys: ${{ runner.os }}-cargo-
40+
41+
- name: Check formatting
42+
run: cargo fmt --all -- --check
43+
44+
- name: Clippy
45+
run: cargo clippy --all-targets --all-features
46+
47+
- name: Test
48+
run: cargo test --workspace
49+
50+
coverage:
51+
name: Coverage
52+
runs-on: ubuntu-latest
53+
needs: test
54+
55+
steps:
56+
- uses: actions/checkout@v4
57+
58+
- name: Install Rust stable
59+
uses: dtolnay/rust-toolchain@stable
60+
with:
61+
components: llvm-tools-preview
62+
63+
- name: Cache cargo registry
64+
uses: actions/cache@v4
65+
with:
66+
path: |
67+
~/.cargo/registry/index/
68+
~/.cargo/registry/cache/
69+
~/.cargo/git/db/
70+
target/
71+
key: coverage-cargo-${{ hashFiles('**/Cargo.lock') }}
72+
restore-keys: coverage-cargo-
73+
74+
- name: Install cargo-llvm-cov
75+
uses: taiki-e/install-action@cargo-llvm-cov
76+
77+
- name: Generate coverage (lcov)
78+
run: cargo llvm-cov --workspace --lcov --output-path lcov.info
79+
80+
- name: Upload to Codecov
81+
uses: codecov/codecov-action@v5
82+
with:
83+
token: ${{ secrets.CODECOV_TOKEN }}
84+
files: lcov.info
85+
fail_ci_if_error: true
86+
87+
wasm:
88+
name: WASM build
89+
runs-on: ubuntu-latest
90+
91+
steps:
92+
- uses: actions/checkout@v4
93+
94+
- name: Install Rust stable + wasm32 target
95+
uses: dtolnay/rust-toolchain@stable
96+
with:
97+
targets: wasm32-unknown-unknown
98+
99+
- name: Cache cargo registry
100+
uses: actions/cache@v4
101+
with:
102+
path: |
103+
~/.cargo/registry/index/
104+
~/.cargo/registry/cache/
105+
~/.cargo/git/db/
106+
target/
107+
key: wasm-cargo-${{ hashFiles('**/Cargo.lock') }}
108+
restore-keys: wasm-cargo-
109+
110+
- name: Build chisel-wasm
111+
run: cargo build -p chisel-wasm --target wasm32-unknown-unknown

.github/workflows/release.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
RUSTFLAGS: -D warnings
11+
12+
jobs:
13+
build:
14+
name: Build ${{ matrix.target }}
15+
runs-on: ${{ matrix.runner }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- target: x86_64-unknown-linux-gnu
21+
runner: ubuntu-latest
22+
artifact: chisel-linux-x86_64
23+
- target: aarch64-unknown-linux-gnu
24+
runner: ubuntu-latest
25+
artifact: chisel-linux-arm64
26+
use_cross: true
27+
- target: x86_64-apple-darwin
28+
runner: macos-13
29+
artifact: chisel-macos-x86_64
30+
- target: aarch64-apple-darwin
31+
runner: macos-latest
32+
artifact: chisel-macos-arm64
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- name: Install Rust stable
38+
uses: dtolnay/rust-toolchain@stable
39+
with:
40+
targets: ${{ matrix.target }}
41+
42+
- name: Cache cargo registry
43+
uses: actions/cache@v4
44+
with:
45+
path: |
46+
~/.cargo/registry/index/
47+
~/.cargo/registry/cache/
48+
~/.cargo/git/db/
49+
target/
50+
key: release-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
51+
restore-keys: release-${{ matrix.target }}-
52+
53+
- name: Install cross
54+
if: matrix.use_cross
55+
uses: taiki-e/install-action@cross
56+
57+
- name: Build (cross)
58+
if: matrix.use_cross
59+
run: cross build --release -p chisel --target ${{ matrix.target }}
60+
61+
- name: Build (cargo)
62+
if: ${{ !matrix.use_cross }}
63+
run: cargo build --release -p chisel --target ${{ matrix.target }}
64+
65+
- name: Rename artifact
66+
run: cp target/${{ matrix.target }}/release/chisel ${{ matrix.artifact }}
67+
68+
- name: Upload artifact
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: ${{ matrix.artifact }}
72+
path: ${{ matrix.artifact }}
73+
retention-days: 1
74+
75+
release:
76+
name: Publish release
77+
runs-on: ubuntu-latest
78+
needs: build
79+
permissions:
80+
contents: write
81+
82+
steps:
83+
- uses: actions/checkout@v4
84+
85+
- name: Download all artifacts
86+
uses: actions/download-artifact@v4
87+
with:
88+
path: artifacts
89+
merge-multiple: true
90+
91+
- name: Create GitHub release
92+
uses: softprops/action-gh-release@v2
93+
with:
94+
files: artifacts/*
95+
generate_release_notes: true

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/target
2+
notes
3+
tests/testing_target

Caddyfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Example Caddyfile — TLS is auto-managed by Caddy (Let's Encrypt).
2+
# Replace mcp.yourdomain.com with your actual domain.
3+
4+
mcp.yourdomain.com {
5+
reverse_proxy 127.0.0.1:3000
6+
}

0 commit comments

Comments
 (0)