|
1 | | -name: Anchor |
| 1 | +name: Anchor v2 |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
8 | 8 | types: [opened, synchronize, reopened] |
9 | 9 | branches: |
10 | 10 | - main |
| 11 | + # These projects have no committed Cargo.lock (.gitignore ignores **/*/Cargo.lock), |
| 12 | + # so their transitive dependencies resolve fresh on every run and can break with |
| 13 | + # nobody touching the code. Dependabot does not cover them either: it is configured |
| 14 | + # for directory "/", which is the root workspace, and the per-project anchor/ workspaces are |
| 15 | + # what `anchor build` actually resolves. A weekly |
| 16 | + # build catches that drift on a cadence instead of at whatever unrelated pull request |
| 17 | + # happens to touch these files next. The analyze step already treats a scheduled run |
| 18 | + # as "build everything". |
| 19 | + schedule: |
| 20 | + - cron: '0 3 * * 1' |
11 | 21 |
|
12 | 22 | concurrency: |
13 | 23 | group: ${{ github.workflow }}-${{ github.ref }} |
@@ -50,11 +60,15 @@ jobs: |
50 | 60 | ignore_pattern=$(grep -v '^#' .github/.ghaignore | grep -v '^$' | tr '\n' '|' | sed 's/|$//') |
51 | 61 | echo "Ignore pattern: $ignore_pattern" |
52 | 62 |
|
53 | | - # Single source of truth for "what is a framework project": a directory |
| 63 | + # Single source of truth for "what is an Anchor v2 project": a directory |
54 | 64 | # whose name is exactly "anchor". `find -type d -name anchor` gives us |
55 | 65 | # that by construction — no substring matching, no path-segment trickery, |
56 | 66 | # so siblings like "anchor-example/" or nested files such as |
57 | 67 | # "anchor-example/app/pages/api/foo.ts" can never enter the build list. |
| 68 | + # It is also what keeps the two Anchor workflows disjoint: the Anchor v1 |
| 69 | + # projects live in "anchor-v1" directories, built by |
| 70 | + # .github/workflows/anchor-v1.yml, and an exact-name match on "anchor" |
| 71 | + # never sees them. |
58 | 72 | function get_projects() { |
59 | 73 | # An empty .ghaignore makes ignore_pattern empty, and `grep -vE ""` |
60 | 74 | # matches everything, silently emptying the project list - only |
@@ -173,11 +187,11 @@ jobs: |
173 | 187 | # runs `anchor --version | awk '{print $2}'` and writes the result straight to |
174 | 188 | # $GITHUB_OUTPUT. `anchor --version` now prints more than one line, so the value |
175 | 189 | # becomes multi-line and the step dies with "Invalid format", aborting the whole |
176 | | - # job before any project is built. These steps install the same toolchain (Solana |
177 | | - # via the Anza installer, Anchor via avm) and read the version from the first line |
178 | | - # only. The other workflows that use setup-anchor (native, quasar, pinocchio, |
179 | | - # solana-asm) hit the same latent bug once their matrices run; migrate them the |
180 | | - # same way once this is confirmed green. |
| 190 | + # job before any project is built. These steps install the toolchain directly |
| 191 | + # (Solana via the Anza installer, the Anchor CLI from crates.io) and read the |
| 192 | + # version from the first line only. The other workflows that use setup-anchor |
| 193 | + # (native, quasar, pinocchio, solana-asm) hit the same latent bug once their |
| 194 | + # matrices run; migrate them the same way once this is confirmed green. |
181 | 195 | - uses: actions/setup-node@v4 |
182 | 196 | with: |
183 | 197 | node-version: lts/* |
@@ -378,7 +392,7 @@ jobs: |
378 | 392 | - uses: actions/checkout@v5 |
379 | 393 | - name: Create job summary |
380 | 394 | run: | |
381 | | - echo "## Anchor Workflow Summary" >> $GITHUB_STEP_SUMMARY |
| 395 | + echo "## Anchor v2 Workflow Summary" >> $GITHUB_STEP_SUMMARY |
382 | 396 | echo "- Total projects: ${{ needs.changes.outputs.total_projects }}" >> $GITHUB_STEP_SUMMARY |
383 | 397 |
|
384 | 398 | # List all processed projects |
|
0 commit comments