Skip to content

Commit

Permalink
Update to protocol 21 (#1292)
Browse files Browse the repository at this point in the history
Co-authored-by: Leigh McCulloch <[email protected]>
Co-authored-by: Nando Vieira <[email protected]>
  • Loading branch information
3 people authored Apr 30, 2024
1 parent 3c7410c commit 49e053e
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 92 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,25 @@ jobs:
- run: rustup target add ${{ matrix.target }}
- 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
- name: Setup Version and Name
- name: Setup vars
run: |
version="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "soroban-cli") | .version')"
echo "VERSION=${version}" >> $GITHUB_ENV
echo "NAME=soroban-cli-${version}-${{ matrix.target }}" >> $GITHUB_ENV
- name: Package
- name: Package (release only)
if: github.event_name == 'release'
run: cargo package --no-verify
- name: Build
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
- name: Package Extract (release only)
if: github.event_name == 'release'
run: |
cd target/package
tar xvfz soroban-cli-$VERSION.crate
cd soroban-cli-$VERSION
cargo build --target-dir=../.. --features opt --release --target ${{ matrix.target }}
echo "BUILD_WORKING_DIR=target/package/soroban-cli-$VERSION" >> $GITHUB_ENV
- name: Build
env:
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" --features opt --release --target ${{ matrix.target }}
- name: Compress
run: |
cd target/${{ matrix.target }}/release
Expand All @@ -58,7 +62,7 @@ jobs:
with:
name: ${{ env.NAME }}
path: 'target/${{ matrix.target }}/release/${{ env.NAME }}.tar.gz'
- name: Upload to Release
- name: Upload to Release (release only)
if: github.event_name == 'release'
uses: actions/github-script@v6
with:
Expand Down
43 changes: 23 additions & 20 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,44 @@ jobs:
scenario-filter: ["^TestDappDevelop$/^.*$"]
runs-on: ubuntu-latest-4-cores
env:
# where git refs and images are available for the same artifact, the image
# can be set to pull a pre-compiled image from dockerhub, while the git
# refs can be used to build from source within this workflow.

# the gh tag of system-test repo version to run
SYSTEM_TEST_GIT_REF: master

# the pre-compiled image to use of quickstart, or the git ref to build
# from source.
SYSTEM_TEST_QUICKSTART_IMAGE: stellar/quickstart:v423-testing
# SYSTEM_TEST_QUICKSTART_GIT_REF: "https://github.com/stellar/quickstart.git#master"

# the version of components built in quickstart. only used if quickstart
# is configured above to build from source.
# SYSTEM_TEST_PROTOCOL_VERSION_DEFAULT: 21
# SYSTEM_TEST_RS_XDR_GIT_REF: v21.0.1
# SYSTEM_TEST_CORE_IMAGE:
# SYSTEM_TEST_CORE_GIT_REF: https://github.com/stellar/stellar-core.git#v21.0.0rc1
# SYSTEM_TEST_CORE_COMPILE_CONFIGURE_FLAGS: "--disable-tests"
# SYSTEM_TEST_SOROBAN_RPC_REF: https://github.com/stellar/soroban-rpc.git#v21.0.1

# the soroban CLI & RPC source code to compile and run from system test
# refers to checked out source of current git hub ref context
SYSTEM_TEST_SOROBAN_CLI_REF: ${{ github.workspace }}/soroban-cli
SYSTEM_TEST_SOROBAN_RPC_REF: https://github.com/stellar/soroban-rpc.git#v20.3.3

# core git ref should be latest commit for stable soroban functionality
# the core bin can either be compiled in-line here as part of ci,
SYSTEM_TEST_CORE_GIT_REF: https://github.com/stellar/stellar-core.git#v20.2.0
SYSTEM_TEST_CORE_COMPILE_CONFIGURE_FLAGS: "--disable-tests"
# or set SYSTEM_TEST_CORE_GIT_REF to empty, and set SYSTEM_TEST_CORE_IMAGE
# to pull a pre-compiled image from dockerhub instead
SYSTEM_TEST_CORE_IMAGE:

# sets the version of rust toolchain that will be pre-installed in the
# test runtime environment, tests invoke rustc/cargo
SYSTEM_TEST_RUST_TOOLCHAIN_VERSION: stable

# set the version of js-stellar-sdk to use, need to choose one of either
# resolution options, using npm release or a gh ref:
#
# option #1, set the version of stellar-sdk based on a npm release version
SYSTEM_TEST_JS_STELLAR_SDK_NPM_VERSION: 11.2.2
SYSTEM_TEST_JS_STELLAR_SDK_NPM_VERSION: 11.3.0
# option #2, set the version of stellar-sdk used as a ref to a gh repo if
# a value is set on SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO, it takes
# precedence over any SYSTEM_TEST_JS_STELLAR_SDK_NPM_VERSION
SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO:
SYSTEM_TEST_JS_STELLAR_SDK_GH_REF:

# the version of rs-stellar-xdr to use for quickstart
SYSTEM_TEST_RS_XDR_GIT_REF: v20.1.0

# system test will build quickstart image internally to use for running
# the service stack configured in standalone network mode(core, rpc)
SYSTEM_TEST_QUICKSTART_GIT_REF: https://github.com/stellar/quickstart.git#eeb44ee99c564275654800edea2e426d73e966b8
# SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO:
# SYSTEM_TEST_JS_STELLAR_SDK_GH_REF:

# triggers system test to log out details from quickstart's logs and test steps
SYSTEM_TEST_VERBOSE_OUTPUT: "true"
Expand Down Expand Up @@ -92,13 +93,15 @@ jobs:
JS_STELLAR_SDK_REF="file:/home/tester/js-stellar-sdk"; \
fi
make \
PROTOCOL_VERSION_DEFAULT=$SYSTEM_TEST_PROTOCOL_VERSION_DEFAULT \
CORE_GIT_REF=$SYSTEM_TEST_CORE_GIT_REF \
CORE_COMPILE_CONFIGURE_FLAGS="$SYSTEM_TEST_CORE_COMPILE_CONFIGURE_FLAGS" \
CORE_IMAGE=$SYSTEM_TEST_CORE_IMAGE \
SOROBAN_RPC_GIT_REF=$SYSTEM_TEST_SOROBAN_RPC_REF \
SOROBAN_CLI_GIT_REF=$SYSTEM_TEST_SOROBAN_CLI_REF \
RUST_TOOLCHAIN_VERSION=$SYSTEM_TEST_RUST_TOOLCHAIN_VERSION \
RS_XDR_GIT_REF=$SYSTEM_TEST_RS_XDR_GIT_REF \
QUICKSTART_IMAGE=$SYSTEM_TEST_QUICKSTART_IMAGE \
QUICKSTART_GIT_REF=$SYSTEM_TEST_QUICKSTART_GIT_REF \
JS_STELLAR_SDK_NPM_VERSION=$JS_STELLAR_SDK_REF \
build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rpc-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
runs-on: ubuntu-22.04
services:
rpc:
image: stellar/quickstart:testing@sha256:7f074dddaf081b21d273f7346325cc1017c38bbee7b839f8b633b280a663232d
image: stellar/quickstart:v423-testing
ports:
- 8000:8000
env:
ENABLE_LOGS: true
ENABLE_SOROBAN_DIAGNOSTIC_EVENTS: true
NETWORK: local
ENABLE_SOROBAN_RPC: true
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
Expand Down
Loading

0 comments on commit 49e053e

Please sign in to comment.