Skip to content

Commit

Permalink
Merge branch 'main' into upgrade-typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch authored Nov 6, 2024
2 parents e89989e + 8163f30 commit ef01ce2
Show file tree
Hide file tree
Showing 120 changed files with 2,495 additions and 2,313 deletions.
12 changes: 10 additions & 2 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,8 +27,6 @@ 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
Expand Down Expand Up @@ -62,6 +65,11 @@ 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
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ defaults:
shell: bash

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

This file was deleted.

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@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

- 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
39 changes: 21 additions & 18 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 @@ -30,20 +30,21 @@ jobs:
- 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
Expand All @@ -54,7 +55,7 @@ jobs:
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:
Expand All @@ -73,17 +74,18 @@ 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 }}
- 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 build-test
- if: startsWith(matrix.target, 'x86_64')
# TODO: enable ARM linux
- if: startsWith(matrix.sys.target, 'x86_64') || runner.os == 'macOS'
# 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
cargo test --target ${{ matrix.sys.target }} --manifest-path $I/Cargo.toml
done
publish-dry-run:
Expand All @@ -96,10 +98,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 ef01ce2

Please sign in to comment.