Skip to content

Commit

Permalink
Enable unit tests for all platforms (#1689)
Browse files Browse the repository at this point in the history
* Test

* Comment out flows

* rust workflow

* fix

* fix

* Update dependencies and uncomment arm linux

* publish dry run test

* cleanup

* Comment ARM back

* undo diff

* PR comments

---------

Co-authored-by: Leigh McCulloch <[email protected]>
  • Loading branch information
Ifropc and leighmcculloch authored Oct 29, 2024
1 parent 4c8c735 commit 1c3f4d2
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
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 @@ -55,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 @@ -74,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 @@ -97,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

0 comments on commit 1c3f4d2

Please sign in to comment.