Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/samples/typescript…
Browse files Browse the repository at this point in the history
…/devconsole.ts/protobufjs-7.2.5
  • Loading branch information
Milerius authored Dec 11, 2023
2 parents 11a5b91 + 769289c commit 6817cfb
Show file tree
Hide file tree
Showing 844 changed files with 65,483 additions and 17,170 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
build:
runs-on: [ self-hosted, macOS, ARM64, wallet-core ]
runs-on: macos-latest-large
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
Expand All @@ -29,6 +29,15 @@ jobs:
- name: Install system dependencies
run: |
tools/install-sys-dependencies-mac
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: |
rust
- name: Install Rust dependencies
run: |
tools/install-rust-dependencies
- name: Install Android Dependencies
Expand All @@ -39,7 +48,7 @@ jobs:
uses: actions/cache@v3
with:
path: build/local
key: ${{ runner.os }}-internal-${{ hashFiles('tools/install-dependencies') }}
key: ${{ runner.os }}-${{ runner.arch }}-internal-${{ hashFiles('tools/install-dependencies') }}

- name: Install internal dependencies
run: tools/install-dependencies
Expand All @@ -51,8 +60,21 @@ jobs:
- name: Build Kotlin doc
run: tools/kotlin-doc

- name: Run test
run: tools/android-test
- name: Build tests
run: |
pushd android
./gradlew assembleAndroidTest
popd
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
target: google_apis
arch: x86
ndk: 23.1.7779620
cmake: 3.18.1
script: cd android; ./gradlew connectedAndroidTest

- name: Build sample app
run: tools/samples-build android
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/ios-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,45 @@ concurrency:

jobs:
build:
runs-on: [ self-hosted, macOS, ARM64, wallet-core ]
runs-on: macos-latest-xlarge
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3

- name: Install system dependencies
run: |
tools/install-sys-dependencies-mac
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: |
rust
- name: Install Rust dependencies
run: |
tools/install-rust-dependencies
- name: Cache internal dependencies
id: internal_cache
uses: actions/cache@v3
with:
path: build/local
key: ${{ runner.os }}-internal-${{ hashFiles('tools/install-dependencies') }}

- name: Install internal dependencies
run: |
tools/install-dependencies
if: steps.internal_cache.outputs.cache-hit != 'true'

- name: Run codegen tests
run: tools/codegen-test

- name: Run iOS tests
run: |
tools/generate-files ios
tools/ios-test
- name: Build sample app
run: |
tools/samples-build ios
19 changes: 17 additions & 2 deletions .github/workflows/kotlin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
build:
runs-on: [ self-hosted, macOS, ARM64, wallet-core ]
runs-on: macos-latest-xlarge
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
Expand All @@ -23,6 +23,9 @@ jobs:
java-version: '17'
distribution: 'temurin'

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
Expand All @@ -31,6 +34,15 @@ jobs:
- name: Install system dependencies
run: |
tools/install-sys-dependencies-mac
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: |
rust
- name: Install Rust dependencies
run: |
tools/install-rust-dependencies
- name: Install emsdk
Expand Down Expand Up @@ -59,10 +71,13 @@ jobs:
run: |
cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DTW_UNITY_BUILD=ON -DTW_COMPILE_JAVA=ON -DTW_COMPILE_KOTLIN=ON -GNinja
# The build artifact will be used in `tools/kotlin-build` in the future.
- name: Build JNI
run: |
ninja -Cbuild
mv build/libTrustWalletCore.dylib kotlin/wallet-core-kotlin/src/jvmMain/resources/jni/macos-arm64/
- name: Build Kotlin Multiplatform
run: tools/kotlin-build

- name: Run Kotlin Multiplatform tests
run: tools/kotlin-test
5 changes: 4 additions & 1 deletion .github/workflows/kotlin-sample-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:

jobs:
build:
runs-on: [ self-hosted, macOS, ARM64, wallet-core ]
runs-on: macos-latest-xlarge
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
Expand All @@ -23,6 +23,9 @@ jobs:
java-version: '17'
distribution: 'temurin'

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Install Kotlin Dependencies
run: tools/install-kotlin-dependencies

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/linux-ci-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
run: |
tools/install-rust-dependencies dev
- name: Install emsdk
run: tools/install-wasm-dependencies

- name: Check code formatting
run: |
cargo fmt --check
Expand All @@ -55,6 +58,9 @@ jobs:
cargo llvm-cov nextest --profile ci --no-fail-fast --lcov --output-path coverage.info
working-directory: rust

- name: Run tests in WASM
run: tools/rust-test wasm

- name: Rust Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
Expand All @@ -68,3 +74,18 @@ jobs:
- name: Gather and check Rust code coverage
run: |
tools/check-coverage rust/coverage.stats rust/coverage.info
# Generate files for a blockchain in the end of the pipeline.
# Please note the blockchain should not be implemented in Rust at the moment of running this step,
# otherwise consider either generate files for another blockchain or remove this step at all.
- name: Test codegen-v2 new-blockchain-rust
run: |
cargo run -- new-blockchain-rust iotex
working-directory: codegen-v2

# Check if `new-blockchain-rust` command has generated files that do not break project compilation.
- name: Check Rust compiles
run: |
cargo check --tests
working-directory: rust

6 changes: 6 additions & 0 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: Remove GCC 13 from runner image
shell: bash
run: |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
sudo apt-get update
sudo apt-get install -y --allow-downgrades libc6=2.35-0ubuntu3.4 libc6-dev=2.35-0ubuntu3.4 libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04
- uses: actions/checkout@v3
- name: Install system dependencies
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/linux-sampleapp-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: Remove GCC 13 from runner image
shell: bash
run: |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
sudo apt-get update
sudo apt-get install -y --allow-downgrades libc6=2.35-0ubuntu3.4 libc6-dev=2.35-0ubuntu3.4 libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04
- uses: actions/checkout@v3
- name: Install system dependencies
run: |
Expand Down
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ RUN apt-get update \
software-properties-common \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Add latest cmake
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - \
&& apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -sc) main"

# Install required packages for dev
RUN apt-get update \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class CoinAddressDerivationTests {
ETHEREUM, SMARTCHAIN, POLYGON, OPTIMISM, ZKSYNC, ARBITRUM, ARBITRUMNOVA, ECOCHAIN, AVALANCHECCHAIN, XDAI,
FANTOM, CELO, CRONOSCHAIN, SMARTBITCOINCASH, KUCOINCOMMUNITYCHAIN, BOBA, METIS,
AURORA, EVMOS, MOONRIVER, MOONBEAM, KAVAEVM, KLAYTN, METER, OKXCHAIN, POLYGONZKEVM, SCROLL,
CONFLUXESPACE, ACALAEVM, OPBNB, NEON, BASE, LINEA, GREENFIELD -> assertEquals("0x8f348F300873Fd5DA36950B2aC75a26584584feE", address)
CONFLUXESPACE, ACALAEVM, OPBNB, NEON, BASE, LINEA, GREENFIELD, MANTLE, ZENEON -> assertEquals("0x8f348F300873Fd5DA36950B2aC75a26584584feE", address)
RONIN -> assertEquals("ronin:8f348F300873Fd5DA36950B2aC75a26584584feE", address)
ETHEREUMCLASSIC -> assertEquals("0x078bA3228F3E6C08bEEac9A005de0b7e7089aD1c", address)
GOCHAIN -> assertEquals("0x5940ce4A14210d4Ccd0ac206CE92F21828016aC2", address)
Expand All @@ -57,7 +57,7 @@ class CoinAddressDerivationTests {
XRP -> assertEquals("rPwE3gChNKtZ1mhH3Ko8YFGqKmGRWLWXV3", address)
TEZOS -> assertEquals("tz1acnY9VbMagps26Kj3RfoGRWD9nYG5qaRX", address)
THUNDERCORE -> assertEquals("0x4b92b3ED6d8b24575Bf5ce4C6a86ED261DA0C8d7", address)
TOMOCHAIN -> assertEquals("0xC74b6D8897cBa9A4b659d43fEF73C9cA852cE424", address)
VICTION -> assertEquals("0xC74b6D8897cBa9A4b659d43fEF73C9cA852cE424", address)
TRON -> assertEquals("TQ5NMqJjhpQGK7YJbESKtNCo86PJ89ujio", address)
VECHAIN -> assertEquals("0x1a553275dF34195eAf23942CB7328AcF9d48c160", address)
WANCHAIN -> assertEquals("0xD5ca90b928279FE5D06144136a25DeD90127aC15", address)
Expand Down Expand Up @@ -119,7 +119,7 @@ class CoinAddressDerivationTests {
NERVOS -> assertEquals("ckb1qzda0cr08m85hc8jlnfp3zer7xulejywt49kt2rr0vthywaa50xwsqdtyq04tvp02wectaumxn0664yw2jd53lqk4mxg3", address)
EVERSCALE -> assertEquals("0:0c39661089f86ec5926ea7d4ee4223d634ba4ed6dcc2e80c7b6a8e6d59f79b04", address)
TON -> assertEquals("EQDgEMqToTacHic7SnvnPFmvceG5auFkCcAw0mSCvzvKUfk9", address)
APTOS -> assertEquals("0x07968dab936c1bad187c60ce4082f307d030d780e91e694ae03aef16aba73f30", address)
APTOS -> assertEquals("0x7968dab936c1bad187c60ce4082f307d030d780e91e694ae03aef16aba73f30", address)
NEBL -> assertEquals("NgDVaXAwNgBwb88xLiFKomfBmPkEh9F2d7", address)
SUI -> assertEquals("0xada112cfb90b44ba889cc5d39ac2bf46281e4a91f7919c693bcd9b8323e81ed2", address)
HEDERA -> assertEquals("0.0.302a300506032b657003210049eba62f64d0d941045595d9433e65d84ecc46bcdb1421de55e05fcf2d8357d5", address)
Expand All @@ -146,5 +146,7 @@ class CoinAddressDerivationTests {
NOBLE -> assertEquals("noble142j9u5eaduzd7faumygud6ruhdwme98qc8l3wa", address)
ROOTSTOCK -> assertEquals("0xA2D7065F94F838a3aB9C04D67B312056846424Df", address)
SEI -> assertEquals("sei142j9u5eaduzd7faumygud6ruhdwme98qagm0sj", address)
INTERNETCOMPUTER -> assertEquals("b9a13d974ee9db036d5abc5b66ace23e513cb5676f3996626c7717c339a3ee87", address)
TIA -> assertEquals("celestia142j9u5eaduzd7faumygud6ruhdwme98qpwmfv7", address)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TestCoinType {
assertEquals(CoinType.POANETWORK.value(), 178)
assertEquals(CoinType.VECHAIN.value(), 818)
assertEquals(CoinType.ICON.value(), 74)
assertEquals(CoinType.TOMOCHAIN.value(), 889)
assertEquals(CoinType.VICTION.value(), 889)
assertEquals(CoinType.TEZOS.value(), 1729)
assertEquals(CoinType.QTUM.value(), 2301)
assertEquals(CoinType.NEBULAS.value(), 2718)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class TestCosmosTransactions {

assertEquals(
output.serialized,
"{\"mode\":\"BROADCAST_MODE_BLOCK\",\"tx_bytes\":\"CvgBCvUBCh4vY29zbW9zLmF1dGh6LnYxYmV0YTEuTXNnR3JhbnQS0gEKLWNvc21vczEzazBxMGw3bGcya3IzMmt2dDdseTIzNnBwbGR5OHY5ZHp3aDN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"")
}
Expand Down
Loading

0 comments on commit 6817cfb

Please sign in to comment.