Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove rpc-client crate #218

Merged
merged 6 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .github/workflows/bump-version.yml

This file was deleted.

74 changes: 0 additions & 74 deletions .github/workflows/publish.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/required_status_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# workaround to simplify terraform management of required status checks,
# see https://github.com/orgs/community/discussions/12377
name: "Required status check"
on:
pull_request:

jobs:
complete:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: int128/wait-for-workflows-action@v1
with:
filter-workflow-names: |
Dependency sanity checker*
Linters*
Rust*
Soroban RPC*
101 changes: 3 additions & 98 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,106 +10,11 @@ defaults:
shell: bash

jobs:

complete:
if: always()
needs: [ fmt, build-and-test, publish-dry-run ]
runs-on: ubuntu-latest
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1

fmt:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update
- run: cargo fmt --all --check

build-and-test:
strategy:
fail-fast: false
matrix:
rust: [ msrv, latest ]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
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 }}
steps:
- uses: actions/checkout@v3
- uses: stellar/actions/rust-cache@main
- name: Use the minimum supported Rust version
if: matrix.rust == 'msrv'
run: |
msrv="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages | map(.rust_version) | map(values) | min')"
rustup override set $msrv
rustup component add clippy --toolchain $msrv
- name: Error on warnings and clippy checks
# Only error on warnings and checks for the msrv, because new versions of
# Rust will frequently add new warnings and checks.
if: matrix.rust == 'msrv'
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 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 to avoid building the preflight library (otherwise it will fail with missing symbols)
run: |
for I in cmd/crates/* ; do
cargo test --target ${{ matrix.target }} --manifest-path $I/Cargo.toml
done

publish-dry-run:
if: github.event_name == 'push' || startsWith(github.head_ref, 'release/')
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
cargo-hack-feature-options: --feature-powerset
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
cargo-hack-feature-options: --feature-powerset
- os: macos-latest
target: x86_64-apple-darwin
cargo-hack-feature-options: --feature-powerset
- os: macos-latest
target: aarch64-apple-darwin
cargo-hack-feature-options: --feature-powerset
# Windows builds notes:
#
# The different features that need testing are split over unique
# isolated builds for Windows, because there's a bug in Cargo [1] that
# causes builds of wasm-opt [2] to fail when run one after the other and
# attempting to clean up artifacts in between. The bug has been fixed,
# but will not make it into a stable release of Cargo until ~August
# 2023.
#
# [1]: https://github.com/rust-lang/cargo/pull/11442
# [2]: https://github.com/brson/wasm-opt-rs/issues/116
- os: windows-latest-8-cores
target: x86_64-pc-windows-msvc
cargo-hack-feature-options: ''
- os: windows-latest-8-cores
target: x86_64-pc-windows-msvc
cargo-hack-feature-options: --features opt --ignore-unknown-features
uses: stellar/actions/.github/workflows/rust-publish-dry-run-v2.yml@main
with:
crates: stellar-rpc-client
runs-on: ${{ matrix.os }}
target: ${{ matrix.target }}
cargo-hack-feature-options: ${{ matrix.cargo-hack-feature-options }}
- run: make rust-check
- run: make rust-test
25 changes: 7 additions & 18 deletions .github/workflows/soroban-rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ jobs:
- uses: ./.github/actions/setup-go
with:
go-version: ${{ matrix.go }}
- name: Build soroban contract fixtures
run: |
rustup update
rustup target add wasm32-unknown-unknown
make build-test-wasms
- run: rustup update
- run: make build-libpreflight
- run: go test -race -cover -timeout 25m -v ./cmd/soroban-rpc/...

Expand Down Expand Up @@ -65,10 +61,6 @@ jobs:
with:
go-version: 1.22

- run: |
rustup target add ${{ matrix.rust_target }}
rustup update

# On windows, make sure we have the same compiler (linker) used by rust.
# This is important since the symbols names won't match otherwise.
- if: matrix.os == 'windows-latest'
Expand All @@ -86,6 +78,10 @@ jobs:
sudo apt-get install -y gcc-10-aarch64-linux-gnu
echo 'CC=aarch64-linux-gnu-gcc-10' >> $GITHUB_ENV

- run: |
rustup target add ${{ matrix.rust_target }}
rustup update

- name: Build libpreflight
run: make build-libpreflight
env:
Expand Down Expand Up @@ -138,14 +134,6 @@ jobs:

- uses: stellar/actions/rust-cache@main

- name: Build soroban contract fixtures
shell: bash
run: |
rustup update
rustup target add wasm32-unknown-unknown
make build_rust
make build-test-wasms

- name: Install Captive Core
shell: bash
run: |
Expand Down Expand Up @@ -187,11 +175,12 @@ jobs:
echo "Docker Compose Version:"
docker-compose version

- run: rustup update

- name: Build libpreflight
shell: bash
run: make build-libpreflight

- name: Run Soroban RPC Integration Tests
run: |
make install_rust
go test -race -timeout 60m -v ./cmd/soroban-rpc/internal/test/...
Loading
Loading