Skip to content

Commit 58f26d3

Browse files
Merge branch 'main' into feat/local-ts-boilerplate
2 parents 7113dbb + 212ebea commit 58f26d3

276 files changed

Lines changed: 21945 additions & 5999 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
[alias] # command aliases
44
f = "fmt"
5-
md-gen = "run --bin doc-gen"
65
s = "run --quiet --"
76
# b = "build"
87
# c = "check"

.github/actions/build-and-test/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ runs:
3030
- if: runner.os == 'Linux'
3131
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev libdbus-1-dev
3232
shell: bash
33+
- run: make build-test-wasms
34+
shell: bash
35+
env:
36+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
37+
CARGO_BUILD_TARGET: ${{ inputs.target }}
38+
CI_TESTS: true
3339
- run: cargo clippy --all-targets --target ${{ inputs.target }}
3440
shell: bash
3541
- run: make test

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Stellar CLI is a Rust-based command-line tool for interacting with the Stellar n
99
### Bootstrap and Build
1010

1111
- Install system dependencies: `sudo apt-get update && sudo apt-get install -y libudev-dev libdbus-1-dev build-essential`
12-
- Install Rust toolchain: `rustup update` (Rust 1.89.0+ required)
12+
- Install Rust toolchain: `rustup update` (Rust 1.92.0+ required)
1313
- Add WebAssembly target: `rustup target add wasm32v1-none`
1414
- Build main CLI: `cargo build --bin stellar` -- takes 45 seconds. NEVER CANCEL.
1515
- Install CLI: `make install` -- takes 3 minutes with potential network timeouts. NEVER CANCEL. Set timeout to 10+ minutes.
@@ -24,6 +24,7 @@ Stellar CLI is a Rust-based command-line tool for interacting with the Stellar n
2424

2525
- Test main soroban-cli library: `cargo test --package soroban-cli --lib` -- takes 52 seconds. NEVER CANCEL.
2626
- Test individual crates: `cargo test --package <crate-name>` -- typically takes 40 seconds per crate.
27+
- Test soroban-test integration tests: `cargo test --features it --test it -- integration` -- tests the commands of the cli and is where the bulk of the tests live for this repository. All new commands and changes to commands should include updates or additions to tests in soroban-test.
2728
- **WARNING**: Full test suite via `make test` requires building WebAssembly test fixtures and consumes significant memory and disk space. It may fail with "No space left on device" in constrained environments.
2829

2930
### CLI Usage and Validation
@@ -112,7 +113,6 @@ stellar keys address test # Test key operations
112113
The project uses GitHub Actions with workflows in `.github/workflows/`:
113114

114115
- `rust.yml`: Main CI pipeline with formatting, linting, building, and testing
115-
- `e2e.yml`: End-to-end system tests
116116
- `binaries.yml`: Multi-platform binary builds
117117

118118
Always run `make fmt` and `make check` locally before pushing to ensure CI passes.

.github/workflows/action.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Action
3+
4+
on:
5+
pull_request:
6+
7+
concurrency:
8+
group:
9+
${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha ||
10+
github.ref }}-{{ github.event_name }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
action:
15+
strategy:
16+
matrix:
17+
image: [macos-15, macos-15-intel, ubuntu-latest, windows-latest]
18+
runs-on: ${{ matrix.image }}
19+
20+
steps:
21+
- uses: stellar/stellar-cli@main
22+
with:
23+
version: v23.1.4

.github/workflows/binaries.yml

Lines changed: 96 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
target: aarch64-unknown-linux-gnu
3636
runs-on: ${{ matrix.sys.os }}
3737
steps:
38-
- uses: actions/checkout@v5
38+
- uses: actions/checkout@v6
3939
- uses: ./.github/actions/build-binary
4040
with:
4141
target: ${{ matrix.sys.target }}
@@ -53,13 +53,13 @@ jobs:
5353
- name: stellar-cli
5454
binary: stellar
5555
sys:
56-
- os: macos-14
56+
- os: macos-15
5757
target: aarch64-apple-darwin
58-
- os: macos-13
58+
- os: macos-15-intel
5959
target: x86_64-apple-darwin
6060
runs-on: ${{ matrix.sys.os }}
6161
steps:
62-
- uses: actions/checkout@v5
62+
- uses: actions/checkout@v6
6363
- uses: ./.github/actions/build-binary
6464
with:
6565
target: ${{ matrix.sys.target }}
@@ -82,19 +82,82 @@ jobs:
8282
ext: .exe
8383
runs-on: ${{ matrix.sys.os }}
8484
steps:
85-
- uses: actions/checkout@v5
85+
- uses: actions/checkout@v6
8686
- uses: ./.github/actions/build-binary
8787
with:
8888
target: ${{ matrix.sys.target }}
8989
crate-name: ${{ matrix.crate.name }}
9090
binary-name: ${{ matrix.crate.binary }}
9191
binary-ext: ${{ matrix.sys.ext }}
9292

93+
deb:
94+
needs: [build]
95+
strategy:
96+
fail-fast: false
97+
matrix:
98+
include:
99+
- target: x86_64-unknown-linux-gnu
100+
arch: amd64
101+
os: ubuntu-22.04
102+
- target: aarch64-unknown-linux-gnu
103+
arch: arm64
104+
os: ubuntu-22.04-arm
105+
runs-on: ${{ matrix.os }}
106+
steps:
107+
- uses: actions/checkout@v6
108+
109+
- name: Setup vars
110+
run: |
111+
version="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "stellar-cli") | .version')"
112+
echo "VERSION=${version}" >> $GITHUB_ENV
113+
echo "ARTIFACT_NAME=stellar-cli-${version}-${{ matrix.target }}.tar.gz" >> $GITHUB_ENV
114+
echo "DEB_NAME=stellar-cli_${version}_${{ matrix.arch }}.deb" >> $GITHUB_ENV
115+
echo "DEB_PKG_DIR=stellar-cli_${version}_${{ matrix.arch }}" >> $GITHUB_ENV
116+
117+
- name: Download Artifact
118+
uses: actions/download-artifact@v8.0.1
119+
with:
120+
name: ${{ env.ARTIFACT_NAME }}
121+
122+
- name: Build deb
123+
run: |
124+
mkdir -p ${{ env.DEB_PKG_DIR }}/usr/bin
125+
mkdir -p ${{ env.DEB_PKG_DIR }}/DEBIAN
126+
tar xzvf ${{ env.ARTIFACT_NAME }} -C ${{ env.DEB_PKG_DIR }}/usr/bin
127+
128+
cat > ${{ env.DEB_PKG_DIR }}/DEBIAN/control <<EOF
129+
Package: stellar-cli
130+
Version: ${{ env.VERSION }}
131+
Section: utils
132+
Priority: optional
133+
Architecture: ${{ matrix.arch }}
134+
Depends: libc6, libdbus-1-3, libudev1, libssl3
135+
Maintainer: Stellar Development Foundation <info@stellar.org>
136+
Homepage: https://github.com/stellar/stellar-cli
137+
Description: Stellar CLI
138+
Command-line interface for interacting with the Stellar network.
139+
EOF
140+
141+
dpkg-deb --root-owner-group --build ${{ env.DEB_PKG_DIR }}
142+
143+
- name: Validate deb
144+
run: |
145+
dpkg-deb --info ${{ env.DEB_NAME }}
146+
dpkg-deb --contents ${{ env.DEB_NAME }}
147+
sudo dpkg -i ${{ env.DEB_NAME }}
148+
stellar --version
149+
150+
- name: Upload Artifact
151+
uses: ./.github/actions/artifact-upload
152+
with:
153+
name: ${{ env.DEB_NAME }}
154+
path: ${{ env.DEB_NAME }}
155+
93156
installer:
94157
needs: [build, build-macos, build-windows]
95158
runs-on: windows-latest
96159
steps:
97-
- uses: actions/checkout@v5
160+
- uses: actions/checkout@v6
98161

99162
- name: Setup vars
100163
run: |
@@ -104,25 +167,50 @@ jobs:
104167
echo "STELLAR_CLI_INSTALLER_BASENAME=${installer_basename}" >> $GITHUB_ENV
105168
echo "STELLAR_CLI_INSTALLER=${installer_basename}.exe" >> $GITHUB_ENV
106169
echo "ARTIFACT_NAME=stellar-cli-${version}-x86_64-pc-windows-msvc.tar.gz" >> $GITHUB_ENV
170+
echo "SM_CLIENT_CERT_FILE=D:\\sm_client_cert.p12" >> "$GITHUB_ENV"
107171
108172
- name: Download Artifact
109-
uses: actions/download-artifact@v5
173+
uses: actions/download-artifact@v8.0.1
110174
with:
111175
name: ${{ env.ARTIFACT_NAME }}
176+
112177
- name: Uncompress Artifact
113178
run: tar xvf ${{ env.ARTIFACT_NAME }}
179+
114180
- shell: powershell
115-
run: winget install --id JRSoftware.InnoSetup --scope machine --silent --accept-package-agreements --accept-source-agreements
181+
run: winget install --id JRSoftware.InnoSetup --scope machine --silent --accept-package-agreements --accept-source-agreements --force
182+
116183
- shell: powershell
117184
run: |
118185
$innoPath = "C:\Program Files (x86)\Inno Setup 6"
119186
echo $innoPath | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
187+
120188
- name: Build Installer
121189
shell: powershell
122190
run: |
123191
$Env:STELLAR_CLI_VERSION = "${{ env.VERSION }}"
124192
ISCC.exe installer.iss
125193
mv Output/stellar-installer.exe ${{ env.STELLAR_CLI_INSTALLER }}
194+
195+
- name: Setup SM_CLIENT_CERT_FILE
196+
run: |
197+
echo "${{ secrets.SM_CLIENT_CERT_FILE_B64 }}" | base64 --decode > /d/sm_client_cert.p12
198+
shell: bash
199+
200+
- name: Setup Software Trust Manager
201+
env:
202+
SM_HOST: https://clientauth.one.digicert.com
203+
SM_API_KEY: ${{ secrets.SM_API_KEY }}
204+
SM_CLIENT_CERT_PASSWORD: ${{ secrets.SM_CLIENT_CERT_PASSWORD }}
205+
if:
206+
github.event_name == 'release' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.head_ref, 'release/')
207+
id: stm-setup
208+
uses: digicert/code-signing-software-trust-action@v1.2.1
209+
with:
210+
simple-signing-mode: true
211+
keypair-alias: key_1412258126
212+
input: ${{ env.STELLAR_CLI_INSTALLER }}
213+
126214
- name: Upload Artifact
127215
uses: ./.github/actions/artifact-upload
128216
with:

.github/workflows/bindings-ts.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@ jobs:
1616
- ubuntu-latest-8-cores
1717
# ARM
1818
- ubuntu-jammy-8-cores-arm64
19-
# Intel
20-
- macos-13
19+
# Apple Intel (this runner has better support to nested virtualization)
20+
- macos-15-large
2121
exclude:
22-
# Only run Linux x64 tests on pull request to save some time
23-
- sys:
24-
${{ github.event_name != 'push' && 'ubuntu-jammy-8-cores-arm64' }}
25-
- sys: ${{ github.event_name != 'push' && 'macos-13' }}
22+
# Only run Linux x64 on non-release PRs to save CI minutes
23+
- sys: ${{ github.event_name != 'push' && !startsWith(github.ref_name, 'release/') && 'ubuntu-jammy-8-cores-arm64' }}
24+
- sys: ${{ github.event_name != 'push' && !startsWith(github.ref_name, 'release/') && 'macos-15-large' }}
2625
runs-on: ${{ matrix.sys }}
2726
steps:
2827
- uses: stellar/quickstart@main
2928
with:
3029
tag: testing
31-
- uses: actions/setup-node@v5
30+
protocol_version: 26
31+
- uses: actions/setup-node@v6
3232
with:
3333
node-version: "20.x"
34-
- uses: actions/checkout@v5
34+
- uses: actions/checkout@v6
3535
- uses: stellar/actions/rust-cache@main
3636
- run: rustup update
3737
- name: install optional dependencies (Linux only)

.github/workflows/dependency-check.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)