Skip to content

CI

CI #651

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
- master
# Nightly run of the exact same check suite. The job installs the
# latest stable toolchain (dtolnay/rust-toolchain@stable), so this is
# also the guard against upstream regressions (rustc, clippy,
# soroban-sdk) that land between PRs.
#
# Failure behavior: a failed schedule run is reported as an annotation
# on this workflow; it does NOT block any PR (PRs are evaluated only
# by pull_request events). Triage: if a nightly failure is caused by
# an upstream change, either fix the code, or pin/bump the toolchain
# deliberately in a PR, then re-run.
schedule:
- cron: "0 3 * * *" # nightly at 03:00 UTC
# Concurrency control: cancel previous in-progress runs for the same workflow and ref
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@1.85
# Pin stellar-cli to v22.8.2 to match soroban-sdk v22 (Protocol 22)
- name: Install Stellar CLI
# Pinned to the v22 line to match soroban-sdk 22 (Cargo.lock);
# v22.8.2 is the latest patch release of that line. A CLI/SDK
# major-version mismatch can produce incompatible contract spec
# output or deploy-tooling surprises, so scripts/check-tooling.sh
# fails CI loudly when the two drift apart (bounties #126 / #127).
uses: stellar/stellar-cli@v22.8.2
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Show tool versions
run: ./scripts/check-tooling.sh --strict
- name: Format check
run: make fmt-check
- name: Lint
run: make lint
- name: Doc check
run: make docs
- name: Test
run: make test
- name: Documentation check
run: make doc
- name: Build Wasm artifacts and enforce size baseline
run: make build-wasm