Skip to content

Commit

Permalink
Merge branch 'main' into feat/ts-bindings/stellar-sdk-12.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fnando authored Nov 6, 2024
2 parents 5027549 + 1fc9c34 commit 35f3539
Show file tree
Hide file tree
Showing 152 changed files with 6,408 additions and 3,355 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ defaults:
run:
shell: bash

permissions:
id-token: write
contents: write
attestations: write

jobs:

build:
Expand All @@ -22,23 +27,21 @@ jobs:
crate:
- name: stellar-cli
binary: stellar
- name: soroban-cli
binary: soroban
sys:
- os: ubuntu-20.04 # Use 20.04 to get an older version of glibc for increased compat
target: x86_64-unknown-linux-gnu
- os: ubuntu-20.04 # Use 20.04 to get an older version of glibc for increased compat
target: aarch64-unknown-linux-gnu
- os: macos-14
target: x86_64-apple-darwin
- os: macos-12
target: aarch64-apple-darwin
- os: macos-12
target: x86_64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
ext: .exe
runs-on: ${{ matrix.sys.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: rustup update
- run: rustup target add ${{ matrix.sys.target }}
- if: matrix.sys.target == 'aarch64-unknown-linux-gnu'
Expand All @@ -62,18 +65,23 @@ jobs:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
working-directory: ${{ env.BUILD_WORKING_DIR }}
run: cargo build --target-dir="$GITHUB_WORKSPACE/target" --package ${{ matrix.crate.name }} --features opt --release --target ${{ matrix.sys.target }}
- name: Build provenance for attestation (release only)
if: github.event_name == 'release'
uses: actions/attest-build-provenance@v1
with:
subject-path: target/${{ matrix.sys.target }}/release/${{ matrix.crate.binary }}${{ matrix.sys.ext }}
- name: Compress
run: |
cd target/${{ matrix.sys.target }}/release
tar czvf $NAME.tar.gz ${{ matrix.crate.binary }}${{ matrix.sys.ext }}
- name: Upload to Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.NAME }}
path: 'target/${{ matrix.sys.target }}/release/${{ env.NAME }}.tar.gz'
- name: Upload to Release (release only)
if: github.event_name == 'release'
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bindings-ts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
--health-timeout 5s
--health-retries 50
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,8 @@ defaults:
shell: bash

jobs:
dependency-sanity-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update
- run: scripts/check-dependencies.bash
validate-rust-git-rev-deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: stellar/actions/rust-check-git-rev-deps@main
47 changes: 0 additions & 47 deletions .github/workflows/full-help-docs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ledger-emulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
env:
CI_TESTS: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: stellar/actions/rust-cache@main
- name: install libudev-dev
run: |
Expand Down
35 changes: 17 additions & 18 deletions .github/workflows/rpc-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: RPC Tests
on:
push:
Expand All @@ -15,32 +14,32 @@ jobs:
runs-on: ubuntu-22.04
services:
rpc:
image: stellar/quickstart:v438-testing
image: stellar/quickstart:testing
ports:
- 8000:8000
env:
ENABLE_LOGS: true
ENABLE_SOROBAN_DIAGNOSTIC_EVENTS: true
NETWORK: local
PROTOCOL_VERSION: 22
options: >-
--health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'"
--health-interval 10s
--health-timeout 5s
--health-retries 50
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup update
- run: cargo build
- run: rustup target add wasm32-unknown-unknown
- run: make build-test-wasms
- run: SOROBAN_PORT=8000 cargo test --features it --package soroban-test --test it -- integration

- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup update
- run: cargo build
- run: rustup target add wasm32-unknown-unknown
- run: make build-test-wasms
- run: SOROBAN_PORT=8000 cargo test --features it --package soroban-test --test it -- integration
51 changes: 25 additions & 26 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

complete:
if: always()
needs: [fmt, build-and-test, publish-dry-run]
needs: [fmt, check-generated-full-help-docs, build-and-test, publish-dry-run]
runs-on: ubuntu-latest
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
Expand All @@ -26,39 +26,40 @@ jobs:
fmt:
runs-on: ubuntu-latest-16-cores
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: rustup update
- run: cargo fmt --all --check

check-generated-examples-list:
runs-on: ubuntu-latest
check-generated-full-help-docs:
runs-on: ubuntu-latest-16-cores
steps:
- uses: actions/checkout@v4
- run: make generate-examples-list
- name: Check no diffs exist
run: git add -N . && git diff HEAD --exit-code
- uses: stellar/actions/rust-cache@main
- run: rustup update
- run: make generate-full-help-doc
- run: git add -N . && git diff HEAD --exit-code

build-and-test:
strategy:
fail-fast: false
matrix:
rust: [msrv, latest]
include:
sys:
- os: ubuntu-latest-16-cores
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest-16-cores
- os: ubuntu-jammy-16-cores-arm64
target: aarch64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest-8-cores
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.sys.os }}
env:
CI_TESTS: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: stellar/actions/rust-cache@main
- name: Use the minimum supported Rust version
if: matrix.rust == 'msrv'
Expand All @@ -73,18 +74,15 @@ jobs:
run: echo RUSTFLAGS='-Dwarnings -Dclippy::all -Dclippy::pedantic' >> $GITHUB_ENV
- run: rustup update
- run: cargo version
- run: rustup target add ${{ matrix.target }}
- run: rustup target add ${{ matrix.sys.target }}
- run: rustup target add wasm32-unknown-unknown
- if: matrix.target == 'aarch64-unknown-linux-gnu'
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- run: cargo clippy --all-targets --target ${{ matrix.target }}
- run: make build-test
- if: startsWith(matrix.target, 'x86_64')
# specify directories explicitly (otherwise it will fail with missing symbols)
run: |
for I in cmd/soroban-cli cmd/crates/* cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world ; do
cargo test --target ${{ matrix.target }} --manifest-path $I/Cargo.toml
done
- if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev
- run: cargo clippy --all-targets --target ${{ matrix.sys.target }}
- run: make test
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CARGO_BUILD_TARGET: ${{ matrix.sys.target }}

publish-dry-run:
if: github.event_name == 'push' || startsWith(github.head_ref, 'release/')
Expand All @@ -96,10 +94,11 @@ jobs:
target: x86_64-unknown-linux-gnu
cargo-hack-feature-options: --feature-powerset
additional-deb-packages: libudev-dev
# - os: ubuntu-latest-16-cores
# target: aarch64-unknown-linux-gnu
# cargo-hack-feature-options: --feature-powerset
# additional-deb-packages: libudev-dev libssl-dev
# TODO: add back ARM support
#- os: ubuntu-latest-16-cores
# target: aarch64-unknown-linux-gnu
# cargo-hack-feature-options: --feature-powerset
# additional-deb-packages: libudev-dev libssl-dev
- os: macos-latest
target: x86_64-apple-darwin
cargo-hack-feature-options: --feature-powerset
Expand Down
Loading

0 comments on commit 35f3539

Please sign in to comment.