Skip to content

Commit

Permalink
Cleanup unit testing/add ARM support (#1691)
Browse files Browse the repository at this point in the history
* WIP: check make test

* Update makefile

* Cleanup

* Deprecation fix

* Add build target

* Add libssl-dev

* Print openssl dir

* cfg path

* cfg path

* Add sysroot

* libssl

* ls

* fix apt

* ln

* libssl

* arm

* ...

* tmate

* apt sources

* Remove tmate

* libudev arm64

* Change runner to arm

* Fix rust job

* Update rust-cache

* Uncomment other OSes

* Cleanup apt

* Update rust-cache

* Unpin rust-cache version
  • Loading branch information
Ifropc authored Nov 6, 2024
1 parent 048d11b commit 1fc9c34
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
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
Expand Down Expand Up @@ -79,14 +79,10 @@ jobs:
- 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
# 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.sys.target }} --manifest-path $I/Cargo.toml
done
- 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 Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ generate-full-help-doc:
cargo run --bin doc-gen --features clap-markdown

test: build-test
cargo test
cargo test --workspace

e2e-test:
cargo test --features it --test it -- integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ use token::Client as TokenClient;
use token::StellarAssetClient as TokenAdminClient;

fn create_token_contract<'a>(e: &Env, admin: &Address) -> (TokenClient<'a>, TokenAdminClient<'a>) {
let contract_address = e.register_stellar_asset_contract(admin.clone());
let contract_address = e
.register_stellar_asset_contract_v2(admin.clone())
.address();
(
TokenClient::new(e, &contract_address),
TokenAdminClient::new(e, &contract_address),
Expand Down

0 comments on commit 1fc9c34

Please sign in to comment.