Skip to content

Commit 34722f6

Browse files
committed
👷 new ci and build workflow
1 parent e17e890 commit 34722f6

39 files changed

+4331
-1105
lines changed

.cargo/config.toml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[target.aarch64-unknown-linux-musl]
2+
linker = "aarch64-linux-musl-gcc"
3+
rustflags = ["-C", "target-feature=-crt-static"]
4+
[target.x86_64-pc-windows-msvc]
5+
rustflags = ["-C", "target-feature=+crt-static"]
6+
7+
8+
9+
10+
[alias]
11+
# Do not append `--` or it will break IDEs
12+
ck = "check --workspace --all-features --all-targets --locked"
13+
lint = "clippy --workspace --all-targets --all-features"
14+
codecov = "llvm-cov --workspace --ignore-filename-regex tasks"
15+

.changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.gitattributes

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*__Fish.snap linguist-language=fish
2+
*__Zsh.snap linguist-language=Shell
3+
*__Bash.snap linguist-language=Shell
4+
*__PowerShell.snap linguist-language=PowerShell
5+
*__WinCmd.snap linguist-language=Batchfile

.github/ISSUE_TEMPLATE/bug_report.md

-38
This file was deleted.

.github/ISSUE_TEMPLATE/custom.md

-10
This file was deleted.

.github/ISSUE_TEMPLATE/feature_request.md

-20
This file was deleted.

.github/workflows/bloat.tmpl

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Bloat Summary
2+
3+
## Largest functions
4+
5+
```
6+
${BLOAT_FUNC}
7+
```
8+
9+
## Largest crates
10+
11+
```
12+
${BLOAT_CRATE}
13+
```

.github/workflows/bloat.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Run `cargo bloat` for finding out what takes most of the space in your executable.
2+
3+
name: Cargo Bloat
4+
5+
on:
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
bloat:
14+
name: Cargo Bloat
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: taiki-e/checkout-action@v1
18+
19+
- uses: Boshen/setup-rust@main
20+
with:
21+
cache-key: warm
22+
tools: cargo-bloat
23+
24+
- name: Run
25+
env:
26+
RUSTFLAGS: "-C debuginfo=2 -C strip=none"
27+
shell: bash
28+
run: |
29+
echo "# Bloat Summary" >> $GITHUB_STEP_SUMMARY
30+
echo "" >> $GITHUB_STEP_SUMMARY
31+
32+
echo "## Largest functions" >> $GITHUB_STEP_SUMMARY
33+
echo '```' >> $GITHUB_STEP_SUMMARY
34+
echo "" >> $GITHUB_STEP_SUMMARY
35+
cargo bloat --release -n 15 >> $GITHUB_STEP_SUMMARY
36+
echo "" >> $GITHUB_STEP_SUMMARY
37+
echo '```' >> $GITHUB_STEP_SUMMARY

.github/workflows/changeset.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: changeset
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
concurrency: ${{ github.workflow }}-${{ github.ref }}
8+
9+
jobs:
10+
create_pull_request:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [22]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Install pnpm
18+
uses: pnpm/action-setup@v4
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
cache: 'pnpm'
24+
25+
- name: Install Node.js project dependencies
26+
run: pnpm install
27+
28+
- name: Create Release Pull Request
29+
uses: changesets/action@v1
30+
with:
31+
version: "pnpm version:prepare"
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, synchronize]
7+
paths-ignore:
8+
- "**/*.md"
9+
- "**/*.yml"
10+
- "!.github/workflows/ci.yml"
11+
push:
12+
branches:
13+
- main
14+
- "renovate/**"
15+
paths-ignore:
16+
- "**/*.md"
17+
- "**/*.yml"
18+
- "!.github/workflows/ci.yml"
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
22+
cancel-in-progress: ${{ github.ref_name != 'main' }}
23+
24+
defaults:
25+
run:
26+
shell: bash
27+
28+
env:
29+
CARGO_INCREMENTAL: 0
30+
RUSTFLAGS: "-D warnings"
31+
32+
jobs:
33+
test:
34+
name: Test
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
include:
39+
- os: windows-latest
40+
- os: ubuntu-latest
41+
- os: macos-14
42+
runs-on: ${{ matrix.os }}
43+
steps:
44+
- uses: taiki-e/checkout-action@v1
45+
- uses: Boshen/setup-rust@main
46+
with:
47+
# warm cache factory for all other CI jobs
48+
# cache `target` directory to avoid download crates
49+
save-cache: ${{ github.ref_name == 'main' }}
50+
cache-key: warm
51+
- run: cargo test --no-run
52+
- run: cargo test
53+
- run: cargo ck
54+
- run: git diff --exit-code # Must commit everything
55+
56+
typos:
57+
name: Spell Check
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: taiki-e/checkout-action@v1
61+
- uses: crate-ci/typos@master
62+
with:
63+
files: .
64+
65+
deny:
66+
name: Cargo Deny
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: taiki-e/checkout-action@v1
70+
71+
- uses: dorny/paths-filter@v3
72+
id: filter
73+
with:
74+
filters: |
75+
src:
76+
- 'Cargo.lock'
77+
78+
- uses: Boshen/setup-rust@main
79+
if: steps.filter.outputs.src == 'true'
80+
with:
81+
restore-cache: false
82+
tools: cargo-deny
83+
84+
- if: steps.filter.outputs.src == 'true'
85+
run: cargo deny check
86+
87+
unused-deps:
88+
name: Check Unused Dependencies
89+
runs-on: ubuntu-latest
90+
steps:
91+
- uses: taiki-e/checkout-action@v1
92+
- uses: dorny/paths-filter@v3
93+
id: filter
94+
with:
95+
filters: |
96+
src:
97+
- '**/*.rs'
98+
- '**/Cargo.toml'
99+
- 'Cargo.lock'
100+
- uses: Boshen/setup-rust@main
101+
with:
102+
restore-cache: false
103+
if: steps.filter.outputs.src == 'true'
104+
- uses: cargo-bins/cargo-binstall@v1.9.0
105+
if: steps.filter.outputs.src == 'true'
106+
- run: cargo binstall --no-confirm cargo-shear@1
107+
if: steps.filter.outputs.src == 'true'
108+
- run: cargo shear
109+
if: steps.filter.outputs.src == 'true'
110+
111+
format:
112+
name: Format
113+
runs-on: ubuntu-latest
114+
steps:
115+
- uses: taiki-e/checkout-action@v1
116+
- uses: Boshen/setup-rust@main
117+
with:
118+
components: rustfmt
119+
restore-cache: false
120+
- run: cargo fmt --all -- --check
121+
122+
lint:
123+
name: Clippy
124+
runs-on: ubuntu-latest
125+
steps:
126+
- uses: taiki-e/checkout-action@v1
127+
- uses: Boshen/setup-rust@main
128+
with:
129+
components: clippy
130+
- run: cargo lint -- -D warnings
131+
132+
doc:
133+
name: Doc
134+
runs-on: ubuntu-latest
135+
steps:
136+
- uses: taiki-e/checkout-action@v1
137+
- uses: Boshen/setup-rust@main
138+
with:
139+
components: rust-docs
140+
- run: RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items

.github/workflows/docker.yml

-20
This file was deleted.

0 commit comments

Comments
 (0)