diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0ca517d0..676e36f9 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -16,9 +16,10 @@ jobs: # the gh tag of system-test repo version to run SYSTEM_TEST_GIT_REF: master - # the soroban tools source code to compile and run from system test + # 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_TOOLS_REF: ${{ github.workspace }}/soroban-tools + SYSTEM_TEST_SOROBAN_CLI_REF: https://github.com/stellar/soroban-tools.git\#main + SYSTEM_TEST_SOROBAN_RPC_REF: ${{ github.workspace }}/soroban-rpc # 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, @@ -66,7 +67,14 @@ jobs: - uses: actions/checkout@v3 name: checkout soroban-tools with: + repository: stellar/soroban-tools path: soroban-tools + - uses: actions/checkout@v3 + name: checkout soroban-rpc + with: + repository: stellar/soroban-rpc + path: soroban-rpc + - if: ${{ env.SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO != ''}} name: prepare local js-stellar-sdk run: | @@ -90,8 +98,8 @@ jobs: 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_TOOLS_REF \ - SOROBAN_CLI_GIT_REF=$SYSTEM_TEST_SOROBAN_TOOLS_REF \ + 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_GIT_REF=$SYSTEM_TEST_QUICKSTART_GIT_REF \ diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index b51a4852..00000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Publish - -on: - release: - types: [published] - -defaults: - run: - shell: bash - -jobs: - - publish: - uses: stellar/actions/.github/workflows/rust-publish.yml@main - secrets: - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} - - upload: - needs: publish - strategy: - fail-fast: false - matrix: - include: - - 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-latest - target: x86_64-apple-darwin - - os: macos-latest - target: aarch64-apple-darwin - - os: windows-latest - target: x86_64-pc-windows-msvc - ext: .exe - runs-on: ${{ matrix.os }} - env: - VERSION: '${{ github.event.release.name }}' - NAME: 'soroban-cli-${{ github.event.release.name }}-${{ matrix.target }}' - steps: - - uses: actions/checkout@v3 - - run: rustup update - - 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: Package - run: cargo package --no-verify - - name: Build - env: - CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc - run: | - cd target/package - tar xvfz soroban-cli-$VERSION.crate - cd soroban-cli-$VERSION - cargo build --target-dir=../.. --features opt --release --target ${{ matrix.target }} - - name: Compress - run: | - cd target/${{ matrix.target }}/release - tar czvf $NAME.tar.gz soroban${{ matrix.ext }} - - uses: actions/upload-artifact@v3 - with: - name: ${{ env.NAME }} - path: 'target/${{ matrix.target }}/release/${{ env.NAME }}.tar.gz' - - name: Upload - uses: actions/github-script@v6 - with: - script: | - const fs = require('fs'); - await github.rest.repos.uploadReleaseAsset({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: ${{ github.event.release.id }}, - name: '${{ env.NAME }}.tar.gz', - data: fs.readFileSync('target/${{ matrix.target }}/release/${{ env.NAME }}.tar.gz'), - }); diff --git a/RELEASING.md b/RELEASING.md index 09a6a7b4..9ca25dd4 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,5 +1,58 @@ # Releasing -The process for how to release the crates in this repository are documented here: +To release Soroban RPC, follow this process **in order**: -https://github.com/stellar/actions/blob/main/README-rust-release.md +## Update Horizon Version Dependency +1. Run `go get github.com/stellar/go@` to update `go.mod` and `go.sum` to match the tagged Horizon version branch. +2. Commit this change to `main` in a pull request + +## Follow Rust Workflow +Currently, the `soroban-rpc` repo doesn't publish crates, so we will be running a *modified* version of our main [Rust release workflow](https://github.com/stellar/actions/blob/main/README-rust-release.md). + +1. Run the [Bump Version workflow](https://github.com/stellar/actions/blob/main/README-rust-release.md#step-1-run-the-bump-version-workflow) from `main` +2. [Review the PR](https://github.com/stellar/actions/blob/main/README-rust-release.md#2-review-pr) from running the Bump Version workflow +3. [Merge the PR](https://github.com/stellar/actions/blob/main/README-rust-release.md#3-merge-pr) after the publish dry runs complete successfully. Although currently we don't publish crates from the `soroban-rpc` repo, we want the dry runs to succeed. + +## Create a GitHub Release From a Tag +1. Create an annotated tag with `git tag -a v -m "Description for release"` +2. Push the tag to remote with `git push origin --tags` +3. Create a new [GitHub release](https://github.com/stellar/soroban-rpc/releases/new) from the previously created tag. + * The release title MUST NOT start with a v, otherwise artifact uploads fail (see [workflow file](https://github.com/stellar/soroban-tools/blob/main/.github/workflows/publish.yml) and this [Slack thread](https://stellarfoundation.slack.com/archives/C04ECVCV162/p1694729751569919) for context) +4. Monitor GitHub actions until they succeed + +## Push New RPC Debian Package + +1. Run the [Buildmeister soroban-package-builder pipeline](https://buildmeister-v3.stellar-ops.com/job/Platform/job/soroban-package-builder/) + * Set `VERSION_OVERRIDE` if necessary, replacing "-" with "~" (e.g. 20.0.0~rc1) + * Set `BRANCH` to the release tag (e.g. v20.0.0-rc1) + * Enable `PROMOTE_TO_TESTING` + * ![Pipeline Parameters](docs/img/soroban-package-builder.png) + +2. Review the package stage log, and note the build number for next steps + +![Soroban Package Logs](docs/img/soroban-package-logs.png) + +## Push New Docker Image + +For reference, here is the [Soroban RPC docker repo](https://hub.docker.com/r/stellar/soroban-rpc) + +1. Run the [Buildmeister soroban-rpc-docker-builder pipeline](https://buildmeister-v3.stellar-ops.com/job/Platform/job/soroban-rpc-docker-builder/) + * Double check `STELLAR_CORE_VERSION` uses a version *without* test in the name + * ![Soroban Core Version](docs/img/soroban-core-version.png) + * ![Pipeline Parameters](docs/img/soroban-rpc-docker-builder.png) + +## Update Test Configs + +1. Update the [monorepo’s horizon.yml integration test config](https://github.com/stellar/go/blob/master/.github/workflows/horizon.yml) to point to the new rpc image (e.g. [go#5054](https://github.com/stellar/go/pull/5054)) + +## Update Quickstart Image Configs + +1. Update the quickstart image build configs to use the latest RPC and horizon (e.g. [quickstart#502](https://github.com/stellar/quickstart/pull/502/files)). + * Update `soroban_rpc_ref`, `go_ref`, and `core_ref` in all [build workflows](https://github.com/stellar/quickstart/tree/master/.github/workflows) + * Update `SOROBAN_RPC_REF`, `CORE_REF`, and `HORIZON_REF` in [the Makefile](https://github.com/stellar/quickstart/blob/master/Makefile) + +## Promote to Stable + +1. Run the Buildmeister [soroban-rpc-promote-to-stable pipeline](https://buildmeister-v3.stellar-ops.com/job/Platform/job/stellar-soroban-rpc-promote-to-stable/) + * Set `PACKAGE` to the release version + * ![Pipeline Parameters](docs/img/soroban-rpc-promote-to-stable.png) \ No newline at end of file diff --git a/docs/img/soroban-core-version.png b/docs/img/soroban-core-version.png new file mode 100644 index 00000000..0e57915c Binary files /dev/null and b/docs/img/soroban-core-version.png differ diff --git a/docs/img/soroban-package-builder.png b/docs/img/soroban-package-builder.png new file mode 100644 index 00000000..513d399f Binary files /dev/null and b/docs/img/soroban-package-builder.png differ diff --git a/docs/img/soroban-package-logs.png b/docs/img/soroban-package-logs.png new file mode 100644 index 00000000..52f4262b Binary files /dev/null and b/docs/img/soroban-package-logs.png differ diff --git a/docs/img/soroban-rpc-docker-builder.png b/docs/img/soroban-rpc-docker-builder.png new file mode 100644 index 00000000..4de35238 Binary files /dev/null and b/docs/img/soroban-rpc-docker-builder.png differ diff --git a/docs/img/soroban-rpc-promote-to-stable.png b/docs/img/soroban-rpc-promote-to-stable.png new file mode 100644 index 00000000..9318339b Binary files /dev/null and b/docs/img/soroban-rpc-promote-to-stable.png differ