2424 prefix : Bi2Se3_advanced
2525 basis : lcao
2626
27+ defaults :
28+ run :
29+ working-directory : interfaces/Wannier90_interface/examples_python
30+
2731 steps :
2832 - name : Checkout repository
2933 uses : actions/checkout@v4
3640 - name : Install abacusw90
3741 run : |
3842 python -m pip install --upgrade pip
39- pip install -e .
43+ pip install -e ..
4044
4145 - name : Confirm no wannier90.x in environment
4246 run : |
4650 fi
4751 echo "OK: no wannier90.x (dryrun mode)"
4852
49- # ================================================================
50- # Shared mock + patch
51- # NOTE: env: MUST be a sibling of run: (same indent level).
52- # run: uses block scalar literal (|) so the heredoc inside
53- # is passed to bash with YAML indentation stripped.
54- # ================================================================
5553 - name : Create mock data & patch script
5654 env :
5755 SCRIPT : ${{ matrix.script }}
@@ -90,11 +88,22 @@ jobs:
9088 os.makedirs(d, exist_ok=True)
9189
9290 # ── 3. Mock STRU (scf/ + wannier/) ────────────────────
93- stru = textwrap.dedent("""\
94- ATOMIC_SPECIES
95- Bi 208.980 Bi.upf
96- Se 78.960 Se.upf
97-
91+ if basis == "pw":
92+ atom_species = (
93+ "ATOMIC_SPECIES\n"
94+ "Bi 208.980 Bi_pbe_fr.upf\n"
95+ "Se 78.960 Bi_pbe_fr.upf\n"
96+ "\n"
97+ )
98+ else:
99+ atom_species = (
100+ "ATOMIC_SPECIES\n"
101+ "Bi 208.980 Bi_pbe_fr.upf Bi_gga_10au_100Ry_2s2p2d.orb\n"
102+ "Se 78.960 Bi_pbe_fr.upf Se_gga_10au_100Ry_2s2p2d.orb\n"
103+ "\n"
104+ )
105+
106+ lattice_block = textwrap.dedent("""\
98107 LATTICE_CONSTANT
99108 1.0
100109
@@ -115,6 +124,8 @@ jobs:
115124 0.206 0.206 0.118 1 1 1
116125 0.794 0.794 0.882 1 1 1
117126 """)
127+
128+ stru = atom_species + lattice_block
118129 for d in [f"{prefix}/scf", f"{prefix}/wannier"]:
119130 p = os.path.join(d, "STRU")
120131 with open(p, "w") as f:
@@ -161,9 +172,9 @@ jobs:
161172 print(f"[mock] {nnkp} ({len(lines)} lines)")
162173
163174 # ── 5. Mock PP & ORB files ─────────────────────────────
164- orb_dir = " tests/PP_ORB/for_interface/Wannier90_interface"
175+ orb_dir = os.path.abspath("../../../ tests/PP_ORB/")
165176 os.makedirs(orb_dir, exist_ok=True)
166- for name in ["Bi .upf", "Se .upf", "Bi .orb", "Se .orb"]:
177+ for name in ["Bi_pbe_fr .upf", "Se_pbe_fr .upf", "Bi_gga_10au_100Ry_2s2p2d .orb", "Se_gga_10au_100Ry_2s2p2d .orb"]:
167178 p = os.path.join(orb_dir, name)
168179 with open(p, "w") as f:
169180 f.write("# mock for CI dryrun\n")
@@ -172,15 +183,9 @@ jobs:
172183 print("\n[done] all mocks ready")
173184 PYEOF
174185
175- # ================================================================
176- # Run
177- # ================================================================
178186 - name : Run ${{ matrix.script }} — dryrun
179187 run : python ${{ matrix.script }} 2>&1 | tee run.log
180188
181- # ================================================================
182- # Validate
183- # ================================================================
184189 - name : Check dryrun completion banner
185190 run : |
186191 if grep -q "DRY RUN COMPLETE" run.log; then
@@ -269,9 +274,6 @@ jobs:
269274 echo " ALL CHECKS PASSED (${{ matrix.name }})"
270275 echo "=========================================="
271276
272- # ================================================================
273- # Debug (always runs, even on failure)
274- # ================================================================
275277 - name : Show full script output
276278 if : always()
277279 run : cat run.log
0 commit comments