Skip to content

Commit fc1d1a3

Browse files
committed
Initial Commit
0 parents  commit fc1d1a3

File tree

143 files changed

+18763
-0
lines changed

Some content is hidden

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

143 files changed

+18763
-0
lines changed

.github/actions/setup/action.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test setup
2+
inputs:
3+
pull_token:
4+
description: "Token to use for private repo access"
5+
required: true
6+
runs:
7+
using: "composite"
8+
steps:
9+
- name: Set up git private repo access
10+
shell: bash
11+
run: |
12+
git config --global url."https://${{ inputs.pull_token }}@github.com/".insteadOf ssh://[email protected]
13+
git config --global url."https://${{ inputs.pull_token }}@github.com".insteadOf https://github.com
14+
15+
- name: rust-cache
16+
uses: actions/cache@v3
17+
with:
18+
path: |
19+
~/.cargo/bin/
20+
~/.cargo/registry/index/
21+
~/.cargo/registry/cache/
22+
~/.cargo/git/db/
23+
target/
24+
~/.rustup/
25+
key: rust-1.81.0-${{ hashFiles('**/Cargo.toml') }}
26+
restore-keys: rust-1.81.0-
27+
28+
- name: Setup toolchain
29+
id: rustc-toolchain
30+
shell: bash
31+
run: |
32+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.81.0 -y
33+
. "$HOME/.cargo/env"
34+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

.github/workflows/pr.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: PR
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
pull_request:
7+
branches:
8+
- "**"
9+
paths:
10+
- "crates/**"
11+
- "examples/**"
12+
- "Cargo.toml"
13+
- ".github/workflows/**"
14+
merge_group:
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
test-x86:
22+
name: Test (x86-64)
23+
runs-on:
24+
[
25+
runs-on,
26+
runner=64cpu-linux-x64,
27+
spot=false,
28+
"run-id=${{ github.run_id }}",
29+
]
30+
env:
31+
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
32+
steps:
33+
- name: Checkout sources
34+
uses: actions/checkout@v4
35+
36+
- name: Setup CI
37+
uses: ./.github/actions/setup
38+
with:
39+
pull_token: ${{ secrets.PRIVATE_PULL_TOKEN }}
40+
41+
- name: Run cargo check
42+
uses: actions-rs/cargo@v1
43+
with:
44+
command: check
45+
toolchain: 1.81.0
46+
args: --all-targets --all-features
47+
48+
- name: Run cargo test
49+
uses: actions-rs/cargo@v1
50+
with:
51+
command: test
52+
toolchain: 1.81.0
53+
args: --release --workspace
54+
env:
55+
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
56+
RUST_BACKTRACE: 1
57+
58+
test-arm:
59+
name: Test (ARM)
60+
runs-on:
61+
[
62+
runs-on,
63+
runner=64cpu-linux-arm64,
64+
spot=false,
65+
"run-id=${{ github.run_id }}",
66+
]
67+
env:
68+
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
69+
steps:
70+
- name: Checkout sources
71+
uses: actions/checkout@v4
72+
73+
- name: Setup CI
74+
uses: ./.github/actions/setup
75+
with:
76+
pull_token: ${{ secrets.PRIVATE_PULL_TOKEN }}
77+
78+
- name: Run cargo check
79+
uses: actions-rs/cargo@v1
80+
with:
81+
command: check
82+
toolchain: 1.81.0
83+
args: --all-targets --all-features
84+
85+
- name: Run cargo test
86+
uses: actions-rs/cargo@v1
87+
with:
88+
command: test
89+
toolchain: 1.81.0
90+
args: --release --workspace
91+
env:
92+
RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
93+
RUST_BACKTRACE: 1
94+
95+
lint:
96+
name: Formatting & Clippy
97+
runs-on: [runs-on, runner=8cpu-linux-x64, "run-id=${{ github.run_id }}"]
98+
steps:
99+
- name: Checkout sources
100+
uses: actions/checkout@v4
101+
102+
- name: Setup CI
103+
uses: ./.github/actions/setup
104+
with:
105+
pull_token: ${{ secrets.PRIVATE_PULL_TOKEN }}
106+
107+
- name: Run cargo fmt
108+
uses: actions-rs/cargo@v1
109+
with:
110+
command: fmt
111+
args: --all -- --check
112+
env:
113+
CARGO_INCREMENTAL: 1
114+
115+
- name: Run cargo clippy
116+
uses: actions-rs/cargo@v1
117+
with:
118+
command: clippy
119+
args: --all-features --all-targets -- -D warnings -A incomplete-features
120+
env:
121+
CARGO_INCREMENTAL: 1

.github/workflows/pr_lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: PR Lint
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
9+
permissions:
10+
pull-requests: read
11+
12+
jobs:
13+
main:
14+
name: Title
15+
runs-on: warp-ubuntu-latest-arm64-4x
16+
steps:
17+
- uses: amannn/action-semantic-pull-request@v5
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Cargo build
2+
**/target
3+
4+
# Cargo config
5+
.cargo
6+
7+
# Profile-guided optimization
8+
/tmp
9+
pgo-data.profdata
10+
11+
# MacOS nuisances
12+
.DS_Store
13+
14+
# Proofs
15+
**/proof-with-pis.bin
16+
**/proof-with-io.bin
17+
18+
# Benchmark
19+
benchmark.csv
20+
21+
# Environment
22+
.env

0 commit comments

Comments
 (0)