Skip to content

Commit 6cd2790

Browse files
zhoubotRuoyuZhou
andauthored
Refactor workspace crate names and hierarchy (#1)
* Refactor workspace crate layout and names * Add governance, docs, and crosscheck gates * Vendor ISA data for standalone CI --------- Co-authored-by: RuoyuZhou <ruoyu.zhou@hisilicon.com>
1 parent 0bb169d commit 6cd2790

141 files changed

Lines changed: 25087 additions & 1 deletion

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* @LinxISA/maintainers
2+
3+
/.github/ @LinxISA/maintainers
4+
/docs/ @LinxISA/maintainers
5+
/tools/ @LinxISA/maintainers
6+
7+
/crates/camodel/ @LinxISA/maintainers
8+
/crates/funcmodel/ @LinxISA/maintainers
9+
/crates/cosim/ @LinxISA/maintainers
10+
/crates/trace/ @LinxISA/maintainers
11+
/crates/runtime/ @LinxISA/maintainers
12+
/crates/isa/ @LinxISA/maintainers
13+
/crates/elf/ @LinxISA/maintainers
14+
/crates/dse/ @LinxISA/maintainers
15+
/crates/lx-tools/ @LinxISA/maintainers
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Bug report
2+
description: Report a functional, cycle-model, trace, or tooling bug
3+
title: "[bug] "
4+
labels: ["bug"]
5+
body:
6+
- type: textarea
7+
id: summary
8+
attributes:
9+
label: Summary
10+
description: What is broken?
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: repro
15+
attributes:
16+
label: Reproduction
17+
description: Include commands, fixture paths, and expected vs actual behavior.
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: validation
22+
attributes:
23+
label: Validation context
24+
description: Note whether `tools/regression/run_crosschecks.sh` was run and what failed.
25+
validations:
26+
required: false

.github/ISSUE_TEMPLATE/docs.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Documentation
2+
description: Request or report a docs update
3+
title: "[docs] "
4+
labels: ["documentation"]
5+
body:
6+
- type: textarea
7+
id: issue
8+
attributes:
9+
label: What should change?
10+
validations:
11+
required: true
12+
- type: input
13+
id: path
14+
attributes:
15+
label: Relevant path
16+
description: README, docs path, or crate path if known.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Regression
2+
description: Report a behavior change against a previously passing gate or smoke
3+
title: "[regression] "
4+
labels: ["regression"]
5+
body:
6+
- type: input
7+
id: last_good
8+
attributes:
9+
label: Last known good commit
10+
validations:
11+
required: true
12+
- type: input
13+
id: first_bad
14+
attributes:
15+
label: First known bad commit
16+
- type: textarea
17+
id: evidence
18+
attributes:
19+
label: Evidence
20+
description: Include command lines, gate report excerpts, and any relevant logs or trace references.
21+
validations:
22+
required: true

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
open-pull-requests-limit: 10
8+
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "weekly"

.github/pull_request_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Summary
2+
3+
Describe what this PR changes and why.
4+
5+
## Validation
6+
7+
- [ ] `bash tools/ci/check_repo_layout.sh`
8+
- [ ] `bash tools/regression/run_crosschecks.sh`
9+
- [ ] (Optional local smoke) `bash tools/regression/run_crosschecks.sh --require-smoke`
10+
11+
## Notes
12+
13+
- [ ] Public docs were updated if crate names, verification commands, or repo
14+
structure changed
15+
- [ ] No old `linxcore-*` crate names were reintroduced
16+
- [ ] Superproject references were only updated where they point directly to
17+
this workspace

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
layout:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Check repository layout
17+
run: bash tools/ci/check_repo_layout.sh
18+
19+
workspace:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: dtolnay/rust-toolchain@stable
24+
with:
25+
components: rustfmt
26+
- uses: Swatinem/rust-cache@v2
27+
- name: Cargo fmt
28+
run: cargo fmt --all --check
29+
- name: Cargo test
30+
run: cargo test -q
31+
32+
crosscheck:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: dtolnay/rust-toolchain@stable
37+
with:
38+
components: rustfmt
39+
- uses: Swatinem/rust-cache@v2
40+
- name: Run repo-local crosschecks
41+
run: bash tools/regression/run_crosschecks.sh --out-dir out/ci-crosschecks
42+
- name: Upload gate artifacts
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: crosscheck-artifacts
46+
path: |
47+
out/ci-crosschecks
48+
docs/bringup/gates/latest.json

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
target/
2+
out/
3+
*.log
4+
*.json
5+
*.jsonl
6+
*.linxtrace
7+
*.md.tmp
8+
!docs/bringup/gates/latest.json
9+
!crates/isa/data/linxisa-v0.4.json

CODE_OF_CONDUCT.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
We want LinxCoreModel to be a professional, technically rigorous, and welcoming
6+
open source project. Contributors and maintainers are expected to participate in
7+
ways that keep discussion focused, respectful, and useful.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contribute to a positive environment:
12+
13+
- engaging with technical disagreements directly and respectfully
14+
- giving actionable review feedback with clear evidence
15+
- assuming good faith while still holding a high engineering bar
16+
- documenting decisions so later contributors can reproduce and audit them
17+
18+
Examples of unacceptable behavior:
19+
20+
- personal attacks, insults, or harassment
21+
- bad-faith argumentation or repeated derailment of technical discussion
22+
- publishing private information without consent
23+
- disruptive behavior that prevents productive collaboration
24+
25+
## Enforcement
26+
27+
Project maintainers are responsible for clarifying and enforcing these
28+
standards. They may remove, edit, or reject comments, commits, issues, pull
29+
requests, and other contributions that violate this Code of Conduct.
30+
31+
## Reporting
32+
33+
For conduct concerns, use GitHub’s private maintainer contact path where
34+
available, or open a private security/advisory report if the behavior is tied to
35+
an exploit or disclosure issue. Maintainers will review reports confidentially
36+
when practical.

CONTRIBUTING.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Contributing to LinxCoreModel
2+
3+
LinxCoreModel is the Rust modeling workspace under `tools/LinxCoreModel` in the
4+
larger `linx-isa` superproject.
5+
6+
## Scope and Ownership
7+
8+
- Keep repository-local changes inside this workspace unless the work explicitly
9+
requires a superproject integration change.
10+
- Do not reintroduce `linxcore-*` crate names inside this workspace. The crate
11+
graph is now `camodel`, `funcmodel`, `cosim`, `isa`, `elf`, `runtime`,
12+
`trace`, `dse`, and `lx-tools`.
13+
- Keep owner boundaries explicit. In particular:
14+
- `camodel` uses domain/stage modules
15+
- `funcmodel` uses engine/memory/syscall/trace domains
16+
- shared CLI logic belongs in `crates/lx-tools/src/cli/`
17+
18+
## Required Local Checks
19+
20+
Run these before opening or updating a pull request:
21+
22+
```bash
23+
bash tools/ci/check_repo_layout.sh
24+
bash tools/regression/run_crosschecks.sh --require-smoke
25+
```
26+
27+
If you do not have a local bring-up ELF under
28+
`out/bringup/linux_user_compiler_smoke_O0.elf`, you can still run the non-smoke
29+
gates:
30+
31+
```bash
32+
bash tools/regression/run_crosschecks.sh
33+
```
34+
35+
## Pull Requests
36+
37+
- Keep changes focused. Do not mix workspace refactors, behavior changes, and
38+
unrelated superproject edits in one PR.
39+
- Include validation evidence and note whether the smoke/crosscheck gates were
40+
run with a local ELF or in test-only mode.
41+
- Update docs when you change public crate names, verification commands, or
42+
owner/module boundaries.
43+
44+
## Superproject Relationship
45+
46+
This repository is intentionally narrower than the `linx-isa` superproject. Use
47+
superproject governance only where it directly applies here:
48+
49+
- mirror reusable patterns like `tools/ci`, `tools/regression`, and
50+
`docs/bringup/gates`
51+
- do not copy unrelated kernel/compiler/emulator process into this repo
52+
- do not rename architectural references to “LinxCore” or “LinxISA” in the
53+
wider superproject just because this workspace dropped redundant crate
54+
prefixes

0 commit comments

Comments
 (0)