Skip to content

Commit f57fbf8

Browse files
authored
Merge pull request #1 from LIT-Protocol/ml/merge
Merge fixes from original
2 parents 462e0ee + 7163c50 commit f57fbf8

File tree

182 files changed

+7964
-5705
lines changed

Some content is hidden

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

182 files changed

+7964
-5705
lines changed

.github/INTEGRATION_FAILURE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: "bug: long-running integration tests failed"
33
labels: P-high, T-bug
44
---
55

6-
The heavy (long-running) integration tests have failed. This indicates a regression in foundry.
6+
The heavy (long-running) integration tests have failed. This indicates a regression in Foundry.
77

8-
Check the [heavy integration tests workflow page]({{env.WORKFLOW_URL}}) for details.
8+
Check the [heavy integration tests workflow page]({{ env.WORKFLOW_URL }}) for details.
99

10-
This issue was raised by the workflow at `.github/workflows/heavy-integration.yml`.
10+
This issue was raised by the workflow at `.github/workflows/heavy-integration.yml`.

.github/RELEASE_FAILURE_ISSUE_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ labels: P-high, T-bug
55

66
The release workflow has failed. Some or all binaries might have not been published correctly.
77

8-
Check the [release workflow page]({{env.WORKFLOW_URL}}) for details.
8+
Check the [release workflow page]({{ env.WORKFLOW_URL }}) for details.
99

10-
This issue was raised by the workflow at `.github/workflows/release.yml`.
10+
This issue was raised by the workflow at `.github/workflows/release.yml`.

.github/scripts/matrices.py

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
#!/usr/bin/env python3
2+
3+
import json
4+
import os
5+
6+
7+
class Target:
8+
# GitHub runner OS
9+
os_id: str
10+
# Rust target triple
11+
target: str
12+
13+
def __init__(self, os_id: str, target: str):
14+
self.os_id = os_id
15+
self.target = target
16+
17+
18+
class Case:
19+
name: str
20+
filter: str
21+
n_partitions: int
22+
xplatform: bool
23+
24+
def __init__(self, name: str, filter: str, n_partitions: int, xplatform: bool):
25+
self.name = name
26+
self.filter = filter
27+
self.n_partitions = n_partitions
28+
self.xplatform = xplatform
29+
30+
31+
class Expanded:
32+
os: str
33+
target: str
34+
name: str
35+
flags: str
36+
partition: int
37+
38+
def __init__(self, os: str, target: str, name: str, flags: str, partition: int):
39+
self.os = os
40+
self.target = target
41+
self.name = name
42+
self.flags = flags
43+
self.partition = partition
44+
45+
46+
default_target = Target("ubuntu-latest", "x86_64-unknown-linux-gnu")
47+
if os.environ.get("EVENT_NAME") == "pull_request":
48+
targets = [default_target]
49+
else:
50+
targets = [
51+
default_target,
52+
Target("ubuntu-latest", "aarch64-unknown-linux-gnu"),
53+
Target("macos-latest", "x86_64-apple-darwin"),
54+
Target("macos-latest", "aarch64-apple-darwin"),
55+
Target("windows-latest", "x86_64-pc-windows-msvc"),
56+
]
57+
58+
config = [
59+
Case(
60+
name="unit",
61+
filter="kind(lib) | kind(bench) | kind(proc-macro)",
62+
n_partitions=1,
63+
xplatform=True,
64+
),
65+
Case(
66+
name="integration",
67+
filter="kind(test) & !test(/issue|forge_std|ext_integration/)",
68+
n_partitions=3,
69+
xplatform=True,
70+
),
71+
Case(
72+
name="integration/issue-repros",
73+
filter="package(=forge) & test(~issue)",
74+
n_partitions=2,
75+
xplatform=False,
76+
),
77+
Case(
78+
name="integration/forge-std",
79+
filter="package(=forge) & test(~forge_std)",
80+
n_partitions=1,
81+
xplatform=False,
82+
),
83+
Case(
84+
name="integration/external",
85+
filter="package(=forge) & test(~ext_integration)",
86+
n_partitions=2,
87+
xplatform=False,
88+
),
89+
]
90+
91+
92+
def build_matrix():
93+
expanded = []
94+
for target in targets:
95+
expanded.append({"os": target.os_id, "target": target.target})
96+
print_json({"include": expanded})
97+
98+
99+
def test_matrix():
100+
expanded = []
101+
for target in targets:
102+
for case in config:
103+
if not case.xplatform and target != default_target:
104+
continue
105+
106+
for partition in range(1, case.n_partitions + 1):
107+
os_str = ""
108+
if len(targets) > 1:
109+
os_str = f" ({target.target})"
110+
111+
name = case.name
112+
flags = f"-E '{case.filter}'"
113+
if case.n_partitions > 1:
114+
s = f"{partition}/{case.n_partitions}"
115+
name += f" ({s})"
116+
flags += f" --partition count:{s}"
117+
name += os_str
118+
119+
obj = Expanded(
120+
os=target.os_id,
121+
target=target.target,
122+
name=name,
123+
flags=flags,
124+
partition=partition,
125+
)
126+
expanded.append(vars(obj))
127+
128+
print_json({"include": expanded})
129+
130+
131+
def print_json(obj):
132+
print(json.dumps(obj), end="", flush=True)
133+
134+
135+
if __name__ == "__main__":
136+
if int(os.environ.get("TEST", "0")) == 0:
137+
build_matrix()
138+
else:
139+
test_matrix()

.github/workflows/cross-platform.yml

Lines changed: 0 additions & 206 deletions
This file was deleted.

.github/workflows/deny.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: deny
33
on:
44
push:
55
branches: [master]
6-
paths: [Cargo.lock]
6+
paths: [Cargo.lock, deny.toml]
77
pull_request:
88
branches: [master]
9-
paths: [Cargo.lock]
9+
paths: [Cargo.lock, deny.toml]
1010

1111
env:
1212
CARGO_TERM_COLOR: always
@@ -15,6 +15,7 @@ jobs:
1515
cargo-deny:
1616
name: cargo deny check
1717
runs-on: ubuntu-latest
18+
timeout-minutes: 30
1819
steps:
1920
- uses: actions/checkout@v3
2021
- uses: EmbarkStudios/cargo-deny-action@v1

0 commit comments

Comments
 (0)