Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/anchor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ jobs:
done
fi

# TEMPORARY WORKAROUND - delete this block and the `$idl_flag`
# below once an Anchor release after 2.0.0-rc.1 is out.
# TEMPORARY WORKAROUND - delete this block and the `$idl_flag` and
# `$test_flag` below once an Anchor release after 2.0.0-rc.1 is out.
#
# anchor-derive-accounts 2.0.0-rc.1 emits enum type definitions with
# the JSON key "fields" where the IDL spec requires "variants", so
Expand All @@ -297,6 +297,14 @@ jobs:
# projects consumes a generated IDL (no `idls/` directory, no
# `declare_program!`). The program is still compiled and its tests
# still run.
#
# The skip also means `anchor test` must not start a validator for
# these projects. Surfpool 1.6 deploys the program at startup
# through a runbook that reads `target/idl/<program>.json`, and with
# no IDL it exits with `Runbook execution failed` before any test
# runs. None of these projects needs a validator: each one's
# Anchor.toml runs `cargo test`, which tests against LiteSVM
# in-process.
case "$project" in
./basics/pyth/anchor \
|./finance/betting-market/anchor \
Expand All @@ -309,9 +317,11 @@ jobs:
|./tokens/token-extensions/transfer-hook/allow-block-list-token/anchor)
echo "::notice::skipping IDL generation for $project (anchor#4947)"
idl_flag="--no-idl"
test_flag="--skip-local-validator"
;;
*)
idl_flag=""
test_flag=""
;;
esac

Expand All @@ -327,7 +337,7 @@ jobs:
# Run anchor test. It regenerates the IDL too, so the skip above
# has to apply here as well or the projects it exempts fail at the
# test step instead of the build step.
if ! anchor test $idl_flag; then
if ! anchor test $idl_flag $test_flag; then
echo "::error::anchor test failed for $project"
echo "$project: anchor test failed" >> $GITHUB_WORKSPACE/failed_projects.txt
rm -rf target node_modules
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this repository are documented here.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [2026-09-22] - Anchor v2 CI no longer starts a validator for LiteSVM-only projects

Surfpool 1.6, which the Anchor v2 workflow installs as `latest`, deploys each
program at startup through a runbook that reads `target/idl/<program>.json`.
The nine projects built with `--no-idl` (the anchor#4947 workaround) have no
IDL, so `anchor test` died with `Surfpool startup failed: Runbook execution
failed` before any test ran, turning main's Anchor v2 runs red.

- `anchor test` runs with `--skip-local-validator` for exactly those nine
projects. Each one's Anchor.toml runs `cargo test` against LiteSVM, so none
of them ever used the validator. Every other project is tested as before.

## [2026-09-14] - Token fundraiser contributors can close their accounts

A successful raise exits through `check_contributions`, which closes the vault
Expand Down
Loading