Skip to content

Commit d86c086

Browse files
eugenehpcursoragent
andcommitted
fix(ci): PAL-AMS closure env + shared bootstrap on routing/PAL workflows
Set PAL_AMS_SLICE_ONLY and tier-1 model in pal_ams-closure (matching unit tests) and route PNR routing + PAL–AMS CI through ci_bootstrap_deps.sh for rlx/klayout parity. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 4655127 commit d86c086

5 files changed

Lines changed: 30 additions & 26 deletions

File tree

‎.github/workflows/pal-ams-ci.yml‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
- 'data/pal_ams/**'
1919
- 'papers/ultrasound/pal_ams*'
2020
- 'scripts/pal_ams*.sh'
21+
- 'scripts/ci_bootstrap_deps.sh'
2122
- 'scripts/ci_bootstrap_rlx.sh'
2223
- 'scripts/ci_bootstrap_klayout.sh'
2324
- 'vendor/rlx-overlay/**'
@@ -40,6 +41,7 @@ on:
4041
- 'data/pal_ams/**'
4142
- 'papers/ultrasound/pal_ams*'
4243
- 'scripts/pal_ams*.sh'
44+
- 'scripts/ci_bootstrap_deps.sh'
4345
- 'scripts/ci_bootstrap_rlx.sh'
4446
- 'scripts/ci_bootstrap_klayout.sh'
4547
- 'vendor/rlx-overlay/**'
@@ -54,15 +56,8 @@ jobs:
5456
steps:
5557
- uses: actions/checkout@v4
5658

57-
- name: Init sky130-sar-adc upstream (rlx-eda-cli pulls sar-adc-product)
58-
run: git submodule update --init crates/circuits/mixed-signal/sky130-sar-adc/upstream/SKY130_SAR-ADC1
59-
6059
- name: Clone rlx and klayout-rs path dependencies
61-
run: |
62-
git clone --depth 1 https://github.com/MIT-RLX/rlx.git ../rlx
63-
git clone --depth 1 https://github.com/MIT-RLX/klayout-rs.git ../klayout-rs
64-
bash scripts/ci_bootstrap_rlx.sh
65-
bash scripts/ci_bootstrap_klayout.sh
60+
run: bash scripts/ci_bootstrap_deps.sh
6661

6762
- name: Install Rust toolchain
6863
uses: dtolnay/rust-toolchain@stable

‎.github/workflows/routing-strategy-ci.yml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ on:
88
- 'vendor/klayout-overlay/klayout-route/**'
99
- 'scripts/pomp_demo_parity.sh'
1010
- 'scripts/sync_klayout_route_vendor.sh'
11+
- 'scripts/ci_bootstrap_deps.sh'
12+
- 'scripts/ci_bootstrap_rlx.sh'
1113
- 'scripts/ci_bootstrap_klayout.sh'
14+
- 'vendor/rlx-overlay/**'
1215
- 'docker/pomp-demo-parity/**'
1316
- 'Justfile'
1417
- '.github/workflows/routing-strategy-ci.yml'
@@ -18,7 +21,10 @@ on:
1821
- 'vendor/klayout-overlay/klayout-route/**'
1922
- 'scripts/pomp_demo_parity.sh'
2023
- 'scripts/sync_klayout_route_vendor.sh'
24+
- 'scripts/ci_bootstrap_deps.sh'
25+
- 'scripts/ci_bootstrap_rlx.sh'
2126
- 'scripts/ci_bootstrap_klayout.sh'
27+
- 'vendor/rlx-overlay/**'
2228
- 'docker/pomp-demo-parity/**'
2329
- 'Justfile'
2430
- '.github/workflows/routing-strategy-ci.yml'
@@ -31,10 +37,7 @@ jobs:
3137
- uses: actions/checkout@v4
3238

3339
- name: Clone rlx and klayout-rs path dependencies
34-
run: |
35-
git clone --depth 1 https://github.com/MIT-RLX/rlx.git ../rlx
36-
git clone --depth 1 https://github.com/MIT-RLX/klayout-rs.git ../klayout-rs
37-
bash scripts/ci_bootstrap_klayout.sh
40+
run: bash scripts/ci_bootstrap_deps.sh
3841

3942
- name: Install Rust toolchain
4043
uses: dtolnay/rust-toolchain@stable

‎crates/circuits/analog/spike-pal-ams/src/bin/closure.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ fn main() {
2323

2424
fn run() -> Result<(), String> {
2525
let args = Args::parse();
26+
parity::configure_paper_closure_env();
2627
let contract = parity::ParityContract::load_path(&args.parity)?;
2728
let report = parity::validate_full_closure(&contract, &PalAmsProfile::PAPER);
2829
let json = serde_json::to_string_pretty(&report).map_err(|e| e.to_string())?;

‎crates/circuits/analog/spike-pal-ams/src/lib.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ pub use layout::{
3737
pub use mode_eval::{evaluate_mode, fa_from_corner_label, mode_from_corner_label};
3838
pub use modes::{PalAmsFocusMode, PalAmsPrimaryTone};
3939
pub use parity::{
40-
validate_full_closure, validate_measures, validate_paper_tier1, ClosureReport, ParityContract,
41-
ParityReport,
40+
configure_paper_closure_env, validate_full_closure, validate_measures, validate_paper_tier1,
41+
ClosureReport, ParityContract, ParityReport,
4242
};
4343
pub use profile::PalAmsProfile;
4444
pub use reference::ReplayExpSource;

‎crates/circuits/analog/spike-pal-ams/src/parity.rs‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,22 @@ impl ParityContract {
153153
}
154154
}
155155

156+
/// Force 2D slice export for parity replay (viewer/sign-off use 3D volume by default).
157+
pub fn configure_slice_only_env() {
158+
// SAFETY: closure/validate binaries set this before sim; single-threaded CLI.
159+
unsafe {
160+
std::env::set_var("PAL_AMS_SLICE_ONLY", "1");
161+
}
162+
}
163+
164+
/// Tier-1 paper closure gate (`pal_ams-closure`, CI): 2D slice + Westervelt tier-1.
165+
pub fn configure_paper_closure_env() {
166+
configure_slice_only_env();
167+
unsafe {
168+
std::env::set_var("PAL_AMS_MODEL", "tier1");
169+
}
170+
}
171+
156172
/// Force tier-2 paraxial model for unit tests (`PAL_AMS_MODEL=tier2`).
157173
#[cfg(test)]
158174
pub fn configure_tier2_env() {
@@ -163,14 +179,6 @@ pub fn configure_tier2_env() {
163179
}
164180
}
165181

166-
/// Force 2D slice export for parity replay (viewer/sign-off use 3D volume by default).
167-
#[cfg(test)]
168-
pub fn configure_slice_only_env() {
169-
unsafe {
170-
std::env::set_var("PAL_AMS_SLICE_ONLY", "1");
171-
}
172-
}
173-
174182
#[derive(Debug, Clone, Default)]
175183
pub struct ParityReport {
176184
pub passed: bool,
@@ -344,10 +352,7 @@ mod tests {
344352

345353
#[test]
346354
fn full_closure_tier1_and_replay() {
347-
configure_slice_only_env();
348-
unsafe {
349-
std::env::set_var("PAL_AMS_MODEL", "tier1");
350-
}
355+
configure_paper_closure_env();
351356
let contract = contract();
352357
let report = validate_full_closure(&contract, &PalAmsProfile::PAPER);
353358
assert!(

0 commit comments

Comments
 (0)