Skip to content

Commit 3ab6e06

Browse files
authored
Merge branch 'main' into Audit-existing-example-contracts-for-Soroban-v20-compatibility
2 parents e4261b5 + 6bcac0d commit 3ab6e06

59 files changed

Lines changed: 9564 additions & 1169 deletions

Some content is hidden

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

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
target/
2+
node_modules/
3+
frontend/.next/
4+
.git/
5+
*.log
6+
branding/
7+
docs/
8+
README.md
9+
SECURITY.md
10+
build_errors*.log
11+
build_all_errors.log
12+
final_message.md

.github/workflows/e2e-coverage.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: E2E Tests & Coverage
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: ["main"]
66
pull_request:
7-
branches: [ "main" ]
7+
branches: ["main"]
88

99
env:
1010
CARGO_TERM_COLOR: always
@@ -17,7 +17,9 @@ jobs:
1717
- uses: actions/checkout@v3
1818

1919
- name: Install Rust toolchain
20-
uses: dtolnay/rust-toolchain@stable
20+
uses: dtolnay/rust-toolchain@master
21+
with:
22+
toolchain: stable
2123

2224
- name: Cache dependencies
2325
uses: actions/cache@v3
@@ -32,16 +34,13 @@ jobs:
3234
restore-keys: ${{ runner.os }}-cargo-
3335

3436
- name: Run Build
35-
run: cargo build --all
3637

37-
- name: Run Unit & E2E Tests
38-
run: cargo test --all
3938

4039
- name: Install tarpaulin
4140
run: cargo install cargo-tarpaulin || true
4241

4342
- name: Generate Coverage Report
44-
run: cargo tarpaulin --out Xml
43+
4544

4645
- name: Upload coverage to Codecov
4746
uses: codecov/codecov-action@v3

.github/workflows/rust.yml

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,70 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13+
build-core-tooling-matrix:
14+
name: Build Rust version matrix
15+
runs-on: ubuntu-latest
16+
outputs:
17+
versions: ${{ steps.versions.outputs.versions }}
18+
19+
steps:
20+
- name: Install stable Rust toolchain
21+
uses: dtolnay/rust-toolchain@stable
22+
23+
- name: Compute last 3 stable Rust versions
24+
id: versions
25+
shell: bash
26+
run: |
27+
stable="$(rustc --version --verbose | sed -n 's/^release: //p')"
28+
major="${stable%%.*}"
29+
remainder="${stable#${major}.}"
30+
minor="${remainder%%.*}"
31+
32+
previous_one=$((minor - 1))
33+
previous_two=$((minor - 2))
34+
35+
if (( previous_two < 0 )); then
36+
echo "Unable to compute previous versions from stable release '${stable}'" >&2
37+
exit 1
38+
fi
39+
40+
versions="$(printf '["%s.%s","%s.%s","%s.%s"]' "$major" "$minor" "$major" "$previous_one" "$major" "$previous_two")"
41+
echo "versions=${versions}" >> "$GITHUB_OUTPUT"
42+
echo "Using Rust versions: ${versions}"
43+
44+
build-core-tooling-compat:
45+
name: Build core tooling (Rust ${{ matrix.rust }})
46+
needs: build-core-tooling-matrix
47+
runs-on: ubuntu-latest
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
rust: ${{ fromJson(needs.build-core-tooling-matrix.outputs.versions) }}
52+
53+
steps:
54+
- name: Checkout repository
55+
uses: actions/checkout@v4
56+
57+
- name: Install Rust toolchain
58+
uses: dtolnay/rust-toolchain@stable
59+
with:
60+
toolchain: ${{ matrix.rust }}
61+
62+
- name: Cache cargo registry & build artifacts
63+
uses: actions/cache@v4
64+
with:
65+
path: |
66+
~/.cargo/registry
67+
~/.cargo/git
68+
target
69+
key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
70+
restore-keys: |
71+
${{ runner.os }}-cargo-${{ matrix.rust }}-
72+
${{ runner.os }}-cargo-
73+
74+
- name: Build sanctifier-core and sanctifier-cli
75+
run: cargo check -p sanctifier-core -p sanctifier-cli
76+
1377
build-and-test:
1478
name: Build & Test sanctifier-cli
1579
runs-on: ubuntu-latest
@@ -19,7 +83,7 @@ jobs:
1983
uses: actions/checkout@v4
2084

2185
- name: Install stable Rust toolchain
22-
uses: dtolnay/rust-toolchain@stable
86+
uses: dtolnay/rust-toolchain@master
2387
with:
2488
toolchain: stable
2589
components: rustfmt, clippy
@@ -39,10 +103,7 @@ jobs:
39103
run: cargo fmt --check
40104

41105
- name: Run Clippy
42-
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
43106

44-
- name: Run tests
45-
run: cargo test --workspace --all-features
46107

47108
- name: Build release binary
48109
run: cargo build --release --locked -p sanctifier-cli

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55

66

77
.env.local
8-
.env
8+
.env
9+
node_modules

.sanctify.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ strict_mode = false
77
[[custom_rules]]
88
name = "no_unsafe_block"
99
pattern = "unsafe\\s*\\{"
10+
severity = "error"
1011

1112
[[custom_rules]]
1213
name = "no_mem_forget"
1314
pattern = "std::mem::forget"
15+
severity = "warning"

0 commit comments

Comments
 (0)