You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+39-9Lines changed: 39 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ Purpose: Make AI contributions precise, minimal, and correct. Follow these rules
5
5
## Bash scripting (applies to all repos)
6
6
7
7
Do
8
+
8
9
- Use `#!/bin/bash` as the shebang for Bash scripts.
9
10
- Use the `.bash` extension for Bash; use `.sh` only for POSIX-only scripts.
10
11
- Prefer `$BASH_SOURCE` over `$0` for script path detection.
@@ -17,31 +18,40 @@ Do
17
18
- For Bash references, consult: https://mywiki.wooledge.org and https://mywiki.wooledge.org/BashFAQ and include a source link when possible. Do not invent links.
18
19
19
20
Avoid
20
-
- Global “set -euo pipefail”; prefer targeted checks and explicit error handling.
21
+
22
+
-`set -euo pipefail`; prefer targeted checks and explicit error handling.
21
23
- Uppercase variable names for general scripting (reserve UPPERCASE for Docker/env settings).
22
24
- Clever one-liners that harm clarity.
23
25
- Generalized or speculative changes not asked for in the prompt.
24
26
- Over-engineering; keep it stable, concise, and C-like in mindset.
25
27
26
28
Scope and behavior
27
-
- Only implement what the prompt requests.
29
+
30
+
- Only implement what the prompt requests. All changes should be in the context of the prompt.
28
31
- Keep solutions minimal and modular; do not add placeholders or future-proofing unless required.
29
32
- When giving Bash/shell answers, add a relevant wooledge link if helpful; never fabricate links.
30
33
31
34
## GitHub Workflows (all repos)
32
35
33
36
- In reusable workflows, any job that uses outputs from another job must declare that job in `needs` to avoid null outputs.
34
37
- Do not use outdated Actions. Check for current recommended versions before editing.
35
-
- The `gh` CLI cannot fetch the ID of a workflow run it just started via `gh run workflow`. List runs afterward and extract the ID.
38
+
- gh cli can get gets the id of a workflow it starts, here is an example usage
39
+
40
+
```bash
41
+
run_url="$(~/bin/gh workflow run ci-main-reusable-caller.yml --repo user/repo -f skip_rerun=false -f retries=3)"
42
+
~/bin/gh run watch "${run_url##*/}" --repo user/repo --exit-status --compact --interval 30
43
+
```
36
44
37
45
## If repo name matches `*-musl-cross-make`
38
46
39
47
Toolchain specifics
48
+
40
49
- Use both `-static` and `--static` to produce static toolchain binaries. Using only `-static` can miss POSIX threads.
41
50
- When using `../config.mak`, always load options from both `../gcc-configure-options.md` and `../gcc-configure-options-recursive.md`.
42
51
- The binutils gold linker is deprecated. Use `ld=default` and `--disable-gold`.
43
52
44
53
Fully static toolchains with musl
54
+
45
55
- Do not use LTO: avoid `-flto` and `-fuse-linker-plugin`.
46
56
- Do not add any LTO-related settings.
47
57
- Only set linker options such as `LDFLAGS` at link time, not during library builds.
@@ -52,53 +62,63 @@ Fully static toolchains with musl
52
62
## Debugging with QEMU
53
63
54
64
- Start the target under QEMU with gdbstub, then attach with gdb:
github_repo: ""# To use ci-auto-rerun-failed-jobs.yml hosted in a remote repository else default to the current repository. Requires PAT token AUTO_RERUN
0 commit comments