Commit graph

254 commits

Author SHA1 Message Date
Yong
1af0f20238
Merge pull request #10955 from lightningnetwork/ci/workflow-job-split
ci: split the Claude PR-severity and issue-dedupe workflows into two jobs
2026-08-04 03:16:06 +08:00
Suheb
17a4d42fda github: bump gateway code-review to v0.6.0
Bumps both pins together: the gateway-action SHA and the runtime_ref it
resolves. runtime_ref is pinned explicitly rather than left to the
action's default, so bumping only the action would leave the job on the
v0.5.0 runtime.

v0.6.0 adds no trigger and no input, so the rest of the shim is
unchanged.
2026-07-27 20:38:47 -07:00
Olaoluwa Osuntokun
d1ea8687c0 ci: split issue dedupe into find and post jobs
In this commit, we give the issue dedupe workflow the same shape: one job
finds the duplicate candidates, another posts the comment. The find job
records the candidate issue numbers to a file, and the post job hands
those numbers to comment-on-duplicates.sh, which already validates each
number and renders the comment from a fixed template.

Keeping detection and posting apart mirrors how the script is already
factored, so the post job ends up a thin wrapper over it. We also drop the
unused id-token permission and turn off checkout credential persistence
while we're in here.
2026-07-07 21:24:55 -07:00
Olaoluwa Osuntokun
05c625275e ci: split PR severity workflow into classify and apply jobs
In this commit, we separate the two concerns in the PR severity workflow:
working out the severity, and applying it. The classify job inspects the
PR and records its verdict (the severity level, whether to comment, and
the comment body) to a few files. A second apply job reads those files
and does the mechanical work of setting the label and posting the comment.

Pulling the classification apart from the application keeps each job doing
one thing and makes the flow easier to follow. The apply job takes the
severity the classifier picked and checks it against the known set before
touching a label, and posts the comment from a file via --body-file so the
body is handled as plain data. We also turn off checkout credential
persistence, since neither job needs a git credential on disk.
2026-07-07 21:24:55 -07:00
saubyk
447703a47c
github: bump gateway code-review to v0.5.0
Update the gateway-action pin and runtime_ref to the v0.5.0 release
commits, and extend the shim for the new inline-command support: a
pull_request_review_comment trigger plus comment_in_reply_to input so
/gateway dismiss, promote, and explain work as replies on a finding's
inline thread. Same fork-PR safety profile as issue_comment — comment
events receive no secrets on fork PRs.

Runtime highlights in v0.5.0: /gateway promote (file a finding as an
issue and dismiss it), batch dismiss, gateway-approved label with
stale-approval retraction, and one review comment per run with a
verdict-first body.
2026-07-07 16:34:37 -07:00
Suheb
5e1e827f01
github: bump gateway code-review to v0.4.4 (#10926)
Some checks are pending
CI / Run unit tests-1 (push) Waiting to run
CI / Run unit tests-2 (push) Waiting to run
CI / Run unit tests-3 (push) Waiting to run
CI / Run unit tests-4 (push) Waiting to run
CI / Run unit tests-5 (push) Waiting to run
CI / Run unit tests-6 (push) Waiting to run
CI / Run unit tests-7 (push) Waiting to run
CI / Run unit tests-8 (push) Waiting to run
CI / Run unit tests-9 (push) Waiting to run
CI / Run basic itests (push) Waiting to run
CI / Run basic itests-1 (push) Waiting to run
CI / Run basic itests-2 (push) Waiting to run
CI / Run basic itests-3 (push) Waiting to run
CI / Run basic itests-4 (push) Waiting to run
CI / Run itests (push) Waiting to run
CI / Run itests-1 (push) Waiting to run
CI / Run itests-2 (push) Waiting to run
CI / Run itests-3 (push) Waiting to run
CI / Run itests-4 (push) Waiting to run
CI / Run itests-5 (push) Waiting to run
CI / Run itests-6 (push) Waiting to run
CI / Run itests-7 (push) Waiting to run
CI / Run windows itest (push) Waiting to run
CI / Run macOS itest (push) Waiting to run
CI / Check pinned dependencies (push) Waiting to run
CI / Check pinned dependencies-1 (push) Waiting to run
CI / Check release notes updated (push) Waiting to run
CI / Backwards compatibility test (push) Waiting to run
CI / Cache Cleanup (push) Waiting to run
CI / Send coverage report (push) Blocked by required conditions
Bump the gateway-action pin to v0.4.4 (abe7cf8) and the runtime_ref to
gateway v0.4.4 (20675fc), and drop the hardcoded installation_id. As of
v0.4.4 the runtime resolves the App installation covering this repo from
app_id/private_key, so a static (and easily wrong-org) id is no longer
needed.
2026-06-26 01:57:46 +00:00
Suheb
2e6e61d308
github: add gateway code-review workflow (#10910)
Some checks failed
CI / Run unit tests-1 (push) Has been cancelled
CI / Run unit tests-2 (push) Has been cancelled
CI / Run unit tests-3 (push) Has been cancelled
CI / Run unit tests-4 (push) Has been cancelled
CI / Run unit tests-5 (push) Has been cancelled
CI / Run unit tests-6 (push) Has been cancelled
CI / Run unit tests-7 (push) Has been cancelled
CI / Run unit tests-8 (push) Has been cancelled
CI / Run unit tests-9 (push) Has been cancelled
CI / Run basic itests (push) Has been cancelled
CI / Run basic itests-1 (push) Has been cancelled
CI / Run basic itests-2 (push) Has been cancelled
CI / Run basic itests-3 (push) Has been cancelled
CI / Run basic itests-4 (push) Has been cancelled
CI / Run itests (push) Has been cancelled
CI / Run itests-1 (push) Has been cancelled
CI / Run itests-2 (push) Has been cancelled
CI / Run itests-3 (push) Has been cancelled
CI / Run itests-4 (push) Has been cancelled
CI / Run itests-5 (push) Has been cancelled
CI / Run itests-6 (push) Has been cancelled
CI / Run itests-7 (push) Has been cancelled
CI / Run windows itest (push) Has been cancelled
CI / Run macOS itest (push) Has been cancelled
CI / Check pinned dependencies (push) Has been cancelled
CI / Check pinned dependencies-1 (push) Has been cancelled
CI / Check release notes updated (push) Has been cancelled
CI / Backwards compatibility test (push) Has been cancelled
CI / Cache Cleanup (push) Has been cancelled
CI / Send coverage report (push) Has been cancelled
* github: add gateway code-review workflow

Opt-in review bot invoked via /gateway review PR comments (maintainer-gated).
Thin shim onto the public lightninglabs/gateway-action (SHA-pinned to v0.4.3);
the review runtime stays private. Comment-commands only, so fork PRs never
spawn failing runs.

* github: address review on gateway workflow

- Gate the job on a /gateway command in the comment body so unrelated PR
  comments don't spin up no-op runners. Use contains() (not startsWith) since
  the runtime accepts the command at column 0 of any line, incl. multi-line.
- Pin runtime_ref to the gateway commit SHA so runtime upgrades require an lnd
  PR rather than a moved tag, matching the action SHA-pin.
2026-06-18 22:06:26 -07:00
ziggieXXX
cd201a0a65
ci: require OTS proofs for final releases 2026-06-09 21:17:57 -03:00
ziggie
92e29a422e
build: bump Go versions 2026-06-08 17:02:58 -03:00
Yong
f21262dd6f
Merge pull request #10841 from ziggie1984/bump-grpc-v1.79.3
build: bump grpc to v1.79.3
2026-05-28 22:22:33 +08:00
Yong
7d97e2de83
Merge pull request #10845 from ziggie1984/add-tag-release-script
scripts: add tag-release.sh to safely cut release tags
2026-05-28 02:32:01 +08:00
ziggie
2d1e05acd3
ci: add govulncheck binary scan 2026-05-26 15:45:16 -03:00
ziggie
d3dad1690d
build: bump Go version to 1.26.3 2026-05-26 15:45:16 -03:00
ziggie
e1f03b424f
release: validate version in release CI
The release workflow runs from pushed version tags, but the build step
was setting SKIP_VERSION_CHECK=1. That made scripts/release.sh exit
before running check-tag, so CI did not compare the pushed tag with
the version reported from build/version.go.

Run the normal release target instead. This keeps release CI from
producing artifacts when the tag and embedded lnd version drift apart.
2026-05-26 14:10:33 -03:00
ziggie
b32b67630f
build: bump grpc to v1.79.3 2026-05-25 14:04:09 -03:00
ziggie
651e5e6e7b
GitHub: bump itest bitcoind to v31
Bitcoin Core v31.0 was released on 2026-04-20. Update the CI itest
matrix to track the latest major release.
2026-04-23 11:33:50 -03:00
ziggie
752ad163fa
scripts+GitHub: use bitcoind v30.0 2026-04-21 21:56:04 -03:00
ziggie
77c566f2fa
ci: use GITHUB_TOKEN instead of PAT for PR severity workflow
The PR severity classifier only needs to run `gh pr view`, `gh pr edit`
(labels), and `gh pr comment`. All three operations are fully covered by
the built-in GITHUB_TOKEN given the existing permissions block:

  permissions:
    contents: read
    pull-requests: write
    issues: write

The workflow uses `pull_request_target`, which runs in the base repo
context, so GITHUB_TOKEN has write access even for fork PRs.

Inspection of the claude-code-action@v1 source confirmed that the only
internal call that would require `contents: write` is branch deletion,
which is never exercised here because Claude's tools are locked down to
`gh pr view/edit/comment` via --allowedTools.

This removes the dependency on the PR_SEVERITY_BOT_TOKEN PAT secret.
2026-04-08 14:49:16 +02:00
Andras Banki-Horvath
ccb3ec3859
multi: Run itests with bitcoind miner in CI
Add a basic itest matrix entry that sets minerbackend=bitcoind alongside
backend=bitcoind, ensuring CI covers the bitcoind miner path.
2026-03-23 15:46:37 +01:00
Olaoluwa Osuntokun
54688752f3 ci: update pinned grpc dependency to v1.79.1
In this commit, we update the CI workflow pinned dependency check
for google.golang.org/grpc from v1.59.0 to v1.79.1. While btcwallet
only requires v1.73.0, we upgrade to the latest stable release for
bug fixes and improvements.
2026-03-10 17:41:56 -05:00
ziggie
f6f6064938
scripts: fix backwards compatibility test timing issues
The backwards compatibility test was failing intermittently due to two
related timing issues in the test setup.

The issue was that Dave's `wait_graph_sync dave 3` was hanging
for up to 60 minutes. Dave's initial gossip sync with Charlie could
complete before Charlie had forwarded the alice-bob channel
announcement, leaving Dave stuck at 2 channels until lnd's historical
syncer fired at its default interval of 1 hour. After this 1-hour idle,
some routing state had become stale, causing the subsequent payment from
alice to dave to fail with FAILURE_REASON_NO_ROUTE.

This issues is now addressed by setting `--historicalsyncinterval=10s` on
all nodes. This causes nodes to periodically re-sync the full gossip
state from their peers every 10 seconds instead of every hour. Dave
therefore picks up any missed channel announcements and routing policies
within seconds, and alice's routing graph stays up-to-date throughout
the test.

Additionally, lnd debug logs from all containers are now collected
before teardown on failure and uploaded as a CI artifact, making future
failures easier to diagnose.
2026-03-04 13:04:26 +01:00
Olaoluwa Osuntokun
14a01eb84f
Merge pull request #10577 from ellemouton/elle-cheaper-dedupe-model
ci: use haiku model for issue dedupe workflow
2026-02-17 17:28:19 -08:00
ziggieXXX
12b15c14a8
Merge pull request #10571 from ziggie1984/add-verify-release-workflow
ci: add verify-release workflow
2026-02-16 16:33:23 +01:00
ziggie
5e3d608761
ci: add verify-release workflow
Add a workflow that triggers when a release is published. It runs
verify-install.sh inside the official Docker image to validate
signatures and binary hashes. If verification fails, the release
is automatically set back to draft.
2026-02-13 10:35:11 +01:00
Elle Mouton
5f429f0aff
ci: use haiku model for issue dedupe workflow
Switch the claude-dedupe-issues workflow from the default (most
expensive) model to claude-haiku-4-5, which is significantly cheaper
and sufficient for issue duplicate detection.
2026-02-13 10:52:46 +02:00
Yong
1bdd0f9a29
Merge pull request #10562 from ziggie1984/fix-severity-cmd-classification
build: classify cmd/* as MEDIUM in PR severity bot
2026-02-12 21:03:24 +08:00
ziggieXXX
17b956d320
Merge pull request #10559 from lightningnetwork/elle-issue-dedupe
.claude+.github: add issue dedupe workflow
2026-02-11 14:29:04 +01:00
Elle Mouton
7baead7183
multi: add issue dedupe command and workflow
- add /dedupe command definition for Claude Code
- add workflow to run dedupe on issue opened
- add comment helper script for posting duplicates
2026-02-11 13:06:42 +02:00
ziggie
ad8b64417f
build: classify cmd/* as MEDIUM in PR severity bot
The severity bot was misclassifying CLI client code as HIGH because
filenames like cmd_walletunlocker.go matched the walletunlocker/*
auth/security keyword. Add cmd/* explicitly to the MEDIUM tier and
add a classification rule to prevent filename-based false positives.
2026-02-10 10:48:09 +01:00
Olaoluwa Osuntokun
0871193cdf ci: reduce pr-severity bot comment spam
Only post a severity classification comment when the bot hasn't
commented before or when the severity actually changed. Previously
every push (synchronize event) would post a new comment even if the
classification was identical.

The prompt now instructs the classifier to:
- Check for existing bot comments via the pr-severity-bot marker
- Compare the new severity against the existing severity label
- Skip commenting if both match, while still ensuring labels are correct
- Include a severity changed banner when re-commenting due to a change
2026-02-04 10:02:53 -08:00
Olaoluwa Osuntokun
7b93441814 ci: add tool constraints to pr-severity prompt
Claude keeps trying to use `gh api` to add severity labels, which gets
denied by the allowed tools restriction. Instead of retrying with the
permitted `gh pr edit --add-label` command, it silently gives up and
only posts the comment. The result is that severity comments appear on
PRs but the actual labels are never applied.

Add an explicit tool constraints section at the top of the prompt so
Claude knows upfront that only `gh pr view`, `gh pr edit`, and
`gh pr comment` are available.
2026-02-03 10:22:56 -08:00
Olaoluwa Osuntokun
a77b9d9b89 workflows/pr-severity: allow non-write users for classification
The PR severity classifier was failing for external contributors because
the claude-code-action checks that the actor has write permissions. Since
this workflow only reads PR metadata via the API and doesn't execute any
code from the PR (and has restricted tool permissions), it's safe to allow
any user to trigger classification.
2026-01-29 15:57:18 -04:00
Olaoluwa Osuntokun
bcb589cc9e workflows/claude: fix PR checkout for fork PRs
When a PR originates from a fork, the PR branch doesn't exist in the
origin remote. This adds a step that uses `gh pr checkout` before
running the Claude action, which properly handles fork PRs by adding
the fork as a remote and fetching the branch from there.
2026-01-29 13:30:41 -04:00
Olaoluwa Osuntokun
4d98b004ac workflows/pr-severity: use pull_request_target for fork PRs
Switch from pull_request to pull_request_target to allow the workflow
to run on PRs from forks. The pull_request trigger runs in the fork's
context which cannot access repository secrets.

This is safe because the workflow only reads PR metadata via the GitHub
API (changed files, labels) and doesn't checkout or execute any code
from the PR itself.
2026-01-28 15:18:19 -04:00
Olaoluwa Osuntokun
22c2cc21e8
Merge pull request #10526 from lightningnetwork/pr-severity-workflow
build: add PR severity classification workflow
2026-01-28 14:58:33 -04:00
Olaoluwa Osuntokun
ba52a27860 build: add PR severity classification workflow
Add a GitHub Actions workflow that uses Claude Code to automatically
classify PRs by severity based on the files changed. This helps
reviewers prioritize and understand PR complexity at a glance.

The workflow:
- Triggers on PR open and synchronize events
- Uses Claude Code to analyze changed files against severity mapping
- Applies one of four severity labels (critical/high/medium/low)
- Posts a detailed comment explaining the classification
- Supports manual override via severity-override-* labels

Severity mapping:
- CRITICAL: lnwallet, htlcswitch, contractcourt, peer, keychain, input,
  channeldb, funding, lnwire, server.go, rpcserver.go
- HIGH: routing, invoices, sweep, discovery, graph, watchtower, feature,
  lnrpc, macaroons, chainntnfs, etc.
- MEDIUM: payments, autopilot, lncfg, kvdb, proto files, etc.
- LOW: docs, tests, scripts, CI/CD config
2026-01-28 14:33:15 -04:00
Olaoluwa Osuntokun
c000478121 "Claude PR Assistant workflow" 2026-01-27 15:39:04 -04:00
ziggie
61d82fd1f2
build: update CI+release version to Go 1.25.5
This updates the toolchain which we require to build the LND
executable.
2026-01-13 16:07:38 +01:00
ziggie
dbb3a9e953
ci: fix some minor issues in the backport ci job
-Due to a newer version we need to use add_labels instead of just
 labels

-The backport PR will now also copy the milestones in case the
 milstones were set
2025-12-14 09:00:02 +01:00
ziggie
7ecdb9b807
ci: add automated backport workflow
This commit introduces an automated GitHub Actions workflow to streamline
the backporting process for merged PRs from master to release branches.

Key features:
- Triggers on merged PRs with labels matching 'backport-v*' pattern
  (e.g., backport-v0.20.x-branch)
- Validates that target branches exist before attempting backport
- Creates separate backport PRs for each target branch
- Automatically adds 'no-changelog' label to backport PRs
- Handles merge conflicts by creating draft PRs with conflict markers
- Supports multiple simultaneous backports via multiple labels

Workflow steps:
1. Checkout repository with full git history
2. Validate all target branches exist in the remote repository
3. For each valid backport label:
   - Create a new branch (backport-<pr-num>-to-<target-branch>)
   - Cherry-pick commits from the master PR
   - Create a new PR targeting the release branch
   - Link back to the original PR
4. If conflicts occur, create a draft PR for manual resolution

Label format:
- Valid: backport-v0.20.x-branch, backport-v0.19.x-branch
- Invalid: backport candidate, backport-candidate, backport-needed

This automation reduces manual work and ensures consistency in the
backporting process while maintaining full visibility and control
for maintainers.
2025-12-12 22:48:51 +01:00
yyforyongyu
57448a90c8
github: add unit-race for sql tests 2025-12-08 19:31:56 +08:00
Boris Nagaev
4fc8d8dda3
build: update CI+release version to Go 1.25.3
We also update the go.mod files to pin to Go 1.24.9.
2025-10-21 14:32:44 -03:00
Olaoluwa Osuntokun
b82ed88be5 ci: use enhanced cleanup action in release workflow
In this commit, we replace the basic inline cleanup command in the release
workflow with the comprehensive cleanup-space action that was previously
only used in the main CI workflow. The previous release workflow cleanup
simply removed the hostedtoolcache directory, which freed only a few
gigabytes and proved insufficient for multi-platform release builds.

By switching to the cleanup-space action (now enhanced to free 20-25GB),
the release workflow will have substantially more disk space available
before beginning the build process. This should resolve the disk space
exhaustion issues that were occurring during the Windows ARM build phase,
which is one of the final platforms in the 15-platform build sequence.
2025-10-20 22:39:47 +01:00
Olaoluwa Osuntokun
2ccf4b9806 ci: enhance cleanup-space action for release builds
In this commit, we significantly expand the cleanup-space GitHub Actions
workflow to free up substantially more disk space on GitHub runners. The
previous cleanup only removed three large toolsets (dotnet, android,
ghc), which should free ~14GB. This enhancement adds removal of several
additional large packages and caches, bringing the total freed space to
approximately 20-25GB.

The specific additions include removing Swift and Julia language runtimes,
the hosted toolcache directory, all Docker images, numerous large apt
packages (aspnetcore, llvm, php, mongodb, mysql, azure-cli, browsers, and
development tools), and various cache directories. We also add disk space
reporting before and after cleanup to provide visibility into how much
space is actually being freed during workflow runs.

This enhancement was motivated by release builds running out of disk space
when building for all 15 supported platforms (darwin, freebsd, linux,
netbsd, openbsd, windows across multiple architectures). The sequential
builds with verbose output were consuming more space than the basic cleanup
could provide.
2025-10-20 22:39:47 +01:00
Olaoluwa Osuntokun
7fcbbd44ca
build: update CI+release version to Go 1.25.2
We also update the go.mod files to pin to Go 1.24.8.
2025-10-11 13:39:51 +01:00
bitromortac
f23b4d1ff1
github: change to form-based issue template
This commit introduces a more structured approach to issue generation,
where we can make certain info required.
2025-09-19 11:40:49 +02:00
Yong
0c1746a093
Merge pull request #10174 from hexcow/patch-1
chore(ci): upgrade checkout to v5
2025-09-15 15:29:55 +08:00
Olaoluwa Osuntokun
33406bc6f8
build: make special label checks auto-pass instead of skip
In this commit, we revamp the way our skip-labels worked to instead mark
certain stages as green, instead of skipping them. Skipped changes
didn't count towards the set of required checks, which slowed down PR
velocity.

Previously, when PRs were labeled with 'no-itest' or 'no-changelog',
the corresponding CI jobs would be completely skipped. This caused the
GitHub checks to show as skipped rather than successful, which could
be confusing and prevented certain merge rules from working properly.

This commit changes the behavior so that these jobs still run but
immediately report success when the special labels are detected. Each
affected job now starts with a label check step that sets a skip
flag, and all subsequent steps are conditionally executed based on
this flag. When skipped, the jobs add a notice to the GitHub step
summary explaining that tests were auto-passed due to the label.

The change affects five jobs: basic-integration-test, integration-test,
windows-integration-test, macos-integration-test, and milestone-check.
2025-09-03 16:09:31 -07:00
Boris Nagaev
6ffe257004
multi: bump Go to 1.24.6 2025-08-30 14:13:44 -03:00
hexcow
f1c807d482
chore(ci): upgrade checkout to v5 2025-08-25 11:06:38 +03:00