From 5a68f147062d2504b88e0f96d1a2cd3c1300e640 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 19:04:16 +0200 Subject: [PATCH 01/21] fix no-default-features tests --- parity-util-mem/tests/derive.rs | 1 + triehash/src/lib.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/parity-util-mem/tests/derive.rs b/parity-util-mem/tests/derive.rs index 4fb5f7328..63825ba61 100644 --- a/parity-util-mem/tests/derive.rs +++ b/parity-util-mem/tests/derive.rs @@ -53,6 +53,7 @@ fn derive_ignore() { } #[test] +#[cfg(all(feature = "lru", feature = "hashbrown"))] fn derive_morecomplex() { #[derive(MallocSizeOf)] struct Trivia { diff --git a/triehash/src/lib.rs b/triehash/src/lib.rs index a60a24998..16a3d32a3 100644 --- a/triehash/src/lib.rs +++ b/triehash/src/lib.rs @@ -260,10 +260,12 @@ where #[cfg(test)] mod tests { - use super::{hex_prefix_encode, shared_prefix_len, trie_root}; + use super::*; use ethereum_types::H256; use hex_literal::hex; use keccak_hasher::KeccakHasher; + #[cfg(not(feature = "std"))] + use alloc::vec; #[test] fn test_hex_prefix_encode() { From fc7586ee92d8f795838c7fb3cfb5a6ce16eba6c3 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 19:05:35 +0200 Subject: [PATCH 02/21] github actions --- .github/workflows/ci.yml | 140 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..4819212e2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,140 @@ +on: [pull_request] + +name: Continuous integration + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + args: --workspace --benches + + test: + name: Test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + - windows-latest + - macOS-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - run: rustup target add wasm32-unknown-unknown + + - name: Test no-default-features + uses: actions-rs/cargo@v1 + with: + command: test + args: --workspace --no-default-features + + - name: Test default features + uses: actions-rs/cargo@v1 + with: + command: test + args: --workspace + + - name: Test uint + uses: actions-rs/cargo@v1 + with: + command: test + args: -p uint --all-features + + - name: Test fixed-hash no_std + uses: actions-rs/cargo@v1 + with: + command: test + args: -p fixed-hash --no-default-features --features="byteorder,rustc-hex" + + - name: Test fixed-hash all-features + uses: actions-rs/cargo@v1 + with: + command: test + args: -p fixed-hash --all-features + + - name: Test primitive-types no_std + uses: actions-rs/cargo@v1 + with: + command: test + args: -p primitive-types --no-default-features --features="scale-info,num-traits,serde_no_std" + + - name: Test primitive-types all-features + uses: actions-rs/cargo@v1 + with: + command: test + args: -p primitive-types --all-features + + - name: Test ethereum-types no_std + uses: actions-rs/cargo@v1 + with: + command: test + args: -p ethereum-types --no-default-features --features="serialize,rlp" --target=wasm32-unknown-unknown + + - name: Test ethereum-types all-features + uses: actions-rs/cargo@v1 + with: + command: test + args: -p ethereum-types --all-features + + - name: Test ethbloom all-features + uses: actions-rs/cargo@v1 + with: + command: test + args: -p ethbloom --all-features + + - name: Test parity-crypto all-features + uses: actions-rs/cargo@v1 + with: + command: test + args: -p parity-crypto --all-features + + cross: + name: Test cross-compilation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - run: cargo install cross + + - name: Test parity-util-mem on Android + run: cross test -p parity-util-mem --target=aarch64-linux-android + + - name: Test uint on bigendian + run: cross test -p uint --target=mips64-unknown-linux-gnuabi64 + + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + From ef183b68390b3e27adced5e92793b6bdde7b632f Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 19:06:04 +0200 Subject: [PATCH 03/21] remove appveyor and travis configs --- .travis.yml | 69 ---------------------------------------------------- appveyor.yml | 32 ------------------------ 2 files changed, 101 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 13e3a218e..000000000 --- a/.travis.yml +++ /dev/null @@ -1,69 +0,0 @@ -language: rust -branches: - only: - - master -matrix: - include: - - os: linux - rust: stable - before_script: - - rustup component add rustfmt - - os: linux - rust: nightly - script: - - cargo generate-lockfile --verbose && cargo update -p funty --precise "1.1.0" --verbose - - cargo check --workspace --benches - - os: linux - rust: stable - install: - - cargo install cross - script: - - cargo generate-lockfile --verbose && cargo update -p funty --precise "1.1.0" --verbose - - cross test --target=aarch64-linux-android -p parity-util-mem - - cross test --target=mips64-unknown-linux-gnuabi64 -p uint - - os: osx - osx_image: xcode11.3 - addons: - firefox: latest - rust: stable - allow_failures: - - rust: nightly -install: - - rustup target add wasm32-unknown-unknown - - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | sh - - source ~/.nvm/nvm.sh - - nvm install --lts - - npm install -g geckodriver@1.19.1 # https://github.com/rustwasm/wasm-bindgen/issues/2261 - - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - - which geckodriver -script: - - cargo generate-lockfile --verbose && cargo update -p funty --precise "1.1.0" --verbose - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then - cargo fmt -- --check; - fi - - cargo check --workspace --tests --benches - - cargo test --workspace --exclude uint --exclude fixed-hash --exclude parity-crypto - - if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then - cd contract-address/ && cargo test --features=external_doc && cd ..; - fi - - cd ethbloom/ && cargo test --no-default-features --features="rustc-hex" && cargo check --benches && cd .. - - cd ethereum-types/ && cargo build --no-default-features --features="serialize,rlp" --target=wasm32-unknown-unknown && cd .. - - cd fixed-hash/ && cargo test --all-features && cargo test --no-default-features --features="byteorder,rustc-hex" && cd .. - - cd uint/ && cargo test --all-features && cargo test --no-default-features && cd .. - - cd keccak-hash/ && cargo test --no-default-features && cd .. - - cd plain_hasher/ && cargo test --no-default-features && cargo check --benches && cd .. - - cd parity-bytes/ && cargo test --no-default-features && cd .. - - cd parity-crypto/ && cargo test --all-features && cd .. - - cd parity-util-mem/ && cargo test --features=estimate-heapsize && cd .. - - cd parity-util-mem/ && cargo test --features=jemalloc-global && cd .. - - cd parity-util-mem/ && cargo test --features=mimalloc-global && cd .. - - cd parity-util-mem/ && cargo test --no-default-features --features=dlmalloc-global && cd .. - - cd primitive-types/ && cargo test --all-features && cd .. - - cd primitive-types/ && cargo test --no-default-features --features=serde_no_std && cd .. - - cd primitive-types/ && cargo test --no-default-features --features=scale-info && cd .. - - cd primitive-types/ && cargo test --no-default-features --features=num-traits && cd .. - - cd rlp/ && cargo test --no-default-features && cargo check --benches && cd .. - - cd triehash/ && cargo check --benches && cd .. - - cd kvdb-web/ && wasm-pack test --headless --firefox && cd .. - - cd ethbloom/ && cargo test --all-features && cd .. - - cd ethereum-types/ && cargo test --all-features && cd .. diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 6a0725a92..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,32 +0,0 @@ -environment: - matrix: - - FEATURES: "" - -platform: - - x86_64-pc-windows-msvc - -# avoid running tests twice -branches: - only: - - master - -install: - - curl -sSf -o rustup-init.exe https://win.rustup.rs/ - - rustup-init.exe -y --default-host %PLATFORM% - - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - - rustc -vV - - cargo -vV - -build_script: - - cargo generate-lockfile --verbose && cargo update -p funty --precise "1.1.0" --verbose - - cargo check --tests - - cargo build --all - -test_script: - - cargo test --all --exclude uint --exclude fixed-hash - - cd fixed-hash/ && cargo test --all-features && cd .. - - cd uint/ && cargo test --features=std,quickcheck --release && cd .. - - cd plain_hasher/ && cargo test --no-default-features && cd .. - - cd parity-util-mem/ && cargo test --no-default-features && cd .. - - cd parity-util-mem/ && cargo test --features=estimate-heapsize && cd .. - - cd parity-util-mem/ && cargo test && cd .. From 61ab409774db2fda988a6f614ae16d7980c87b88 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 19:07:23 +0200 Subject: [PATCH 04/21] fmt --- triehash/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/triehash/src/lib.rs b/triehash/src/lib.rs index 16a3d32a3..63f93a5f6 100644 --- a/triehash/src/lib.rs +++ b/triehash/src/lib.rs @@ -261,11 +261,11 @@ where #[cfg(test)] mod tests { use super::*; + #[cfg(not(feature = "std"))] + use alloc::vec; use ethereum_types::H256; use hex_literal::hex; use keccak_hasher::KeccakHasher; - #[cfg(not(feature = "std"))] - use alloc::vec; #[test] fn test_hex_prefix_encode() { From 152bcf752a2775fdcd47be6b17bd522a9746b552 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 19:22:13 +0200 Subject: [PATCH 05/21] try to fix windows --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4819212e2..7fa7ba72d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,14 @@ jobs: toolchain: stable override: true + - name: Remove msys64 # Workaround to resolve link error with C:\msys64\mingw64\bin\libclang.dll + if: runner.os == 'Windows' + run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse + + - name: Install dependencies + if: runner.os == 'Windows' + run: choco install llvm -y + - run: rustup target add wasm32-unknown-unknown - name: Test no-default-features From f5746ffbef42257fb7b8ebf83376019a726a5ff5 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 19:47:12 +0200 Subject: [PATCH 06/21] try single quotes? --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fa7ba72d..064559108 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p fixed-hash --no-default-features --features="byteorder,rustc-hex" + args: -p fixed-hash --no-default-features --features='byteorder,rustc-hex' - name: Test fixed-hash all-features uses: actions-rs/cargo@v1 @@ -79,7 +79,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p primitive-types --no-default-features --features="scale-info,num-traits,serde_no_std" + args: -p primitive-types --no-default-features --features='scale-info,num-traits,serde_no_std' - name: Test primitive-types all-features uses: actions-rs/cargo@v1 @@ -91,7 +91,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p ethereum-types --no-default-features --features="serialize,rlp" --target=wasm32-unknown-unknown + args: -p ethereum-types --no-default-features --features='serialize,rlp' --target=wasm32-unknown-unknown - name: Test ethereum-types all-features uses: actions-rs/cargo@v1 From 89b3da9737d71cfbb60329d3e98c4efd78562b06 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 22:09:15 +0200 Subject: [PATCH 07/21] try resolver=2 ??? --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index c3380e0da..3092027a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" members = [ "contract-address", "fixed-hash", From 10ce3a315c3421210cdfb4f08b16e98f338cb0c3 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 22:18:23 +0200 Subject: [PATCH 08/21] update the badge --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index b4647e7e9..2a97d14e0 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,4 @@ -[![Build Status travis][travis-image]][travis-url] -[![Build Status appveyor][appveyor-image]][appveyor-url] - -[travis-image]: https://travis-ci.org/paritytech/parity-common.svg?branch=master -[travis-url]: https://travis-ci.org/paritytech/parity-common -[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/paritytech/parity-common?branch=master&svg=true -[appveyor-url]: https://ci.appveyor.com/project/paritytech/parity-common/branch/master +[![Continuous integration](https://github.com/paritytech/parity-common/actions/workflows/ci.yml/badge.svg)](https://github.com/paritytech/parity-common/actions/workflows/ci.yml) # parity-common Collection of crates used in [Parity Technologies](https://www.paritytech.io/) projects From e909926cd50f846725231bdb162bc3cef5baa047 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 22:36:51 +0200 Subject: [PATCH 09/21] hmmmm --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 064559108..6da101fe5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p fixed-hash --no-default-features --features='byteorder,rustc-hex' + args: -p fixed-hash --no-default-features --features='byteorder' - name: Test fixed-hash all-features uses: actions-rs/cargo@v1 @@ -79,7 +79,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p primitive-types --no-default-features --features='scale-info,num-traits,serde_no_std' + args: -p primitive-types --no-default-features --features='num-traits' - name: Test primitive-types all-features uses: actions-rs/cargo@v1 @@ -91,7 +91,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p ethereum-types --no-default-features --features='serialize,rlp' --target=wasm32-unknown-unknown + args: -p ethereum-types --no-default-features --features='serialize' --target=wasm32-unknown-unknown - name: Test ethereum-types all-features uses: actions-rs/cargo@v1 From cc3e0371507fcb365dc2e6f3899801ed4c97da4d Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 23:04:48 +0200 Subject: [PATCH 10/21] use use-cross --- .github/workflows/ci.yml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6da101fe5..35bfc8a1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,24 +111,19 @@ jobs: command: test args: -p parity-crypto --all-features - cross: - name: Test cross-compilation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - run: cargo install cross - - name: Test parity-util-mem on Android - run: cross test -p parity-util-mem --target=aarch64-linux-android + uses: actions-rs/cargo@v1 + with: + use-cross: true + command: test + args: -p parity-util-mem --target=aarch64-linux-android - name: Test uint on bigendian - run: cross test -p uint --target=mips64-unknown-linux-gnuabi64 + uses: actions-rs/cargo@v1 + with: + use-cross: true + command: test + args: -p uint --target=mips64-unknown-linux-gnuabi64 fmt: name: Rustfmt From 29ddf921deeef613ad7d535f0b8dce943d68c6d1 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 23:04:58 +0200 Subject: [PATCH 11/21] Revert "hmmmm" This reverts commit e909926cd50f846725231bdb162bc3cef5baa047. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35bfc8a1c..083e1fcb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p fixed-hash --no-default-features --features='byteorder' + args: -p fixed-hash --no-default-features --features='byteorder,rustc-hex' - name: Test fixed-hash all-features uses: actions-rs/cargo@v1 @@ -79,7 +79,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p primitive-types --no-default-features --features='num-traits' + args: -p primitive-types --no-default-features --features='scale-info,num-traits,serde_no_std' - name: Test primitive-types all-features uses: actions-rs/cargo@v1 @@ -91,7 +91,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p ethereum-types --no-default-features --features='serialize' --target=wasm32-unknown-unknown + args: -p ethereum-types --no-default-features --features='serialize,rlp' --target=wasm32-unknown-unknown - name: Test ethereum-types all-features uses: actions-rs/cargo@v1 From c1ac1d3131266e62c4512d41e2eab17018725f3c Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 23:16:26 +0200 Subject: [PATCH 12/21] final boss --- .github/workflows/ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 083e1fcb9..c461ba44a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p fixed-hash --no-default-features --features='byteorder,rustc-hex' + args: --manifest-path fixed-hash/Cargo.toml --no-default-features --features='byteorder,rustc-hex' - name: Test fixed-hash all-features uses: actions-rs/cargo@v1 @@ -79,7 +79,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p primitive-types --no-default-features --features='scale-info,num-traits,serde_no_std' + args: --manifest-path primitive-types/Cargo.toml --no-default-features --features='scale-info,num-traits,serde_no_std' - name: Test primitive-types all-features uses: actions-rs/cargo@v1 @@ -91,7 +91,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: -p ethereum-types --no-default-features --features='serialize,rlp' --target=wasm32-unknown-unknown + args: --manifest-path ethereum-types/Cargo.toml --no-default-features --features='serialize,rlp' --target=wasm32-unknown-unknown - name: Test ethereum-types all-features uses: actions-rs/cargo@v1 @@ -140,4 +140,3 @@ jobs: with: command: fmt args: --all -- --check - From 385e6f00bf04cc8f586fa41a645a8cc789a2cf07 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 23:32:49 +0200 Subject: [PATCH 13/21] Revert "final boss" This reverts commit c1ac1d3131266e62c4512d41e2eab17018725f3c. --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c461ba44a..083e1fcb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --manifest-path fixed-hash/Cargo.toml --no-default-features --features='byteorder,rustc-hex' + args: -p fixed-hash --no-default-features --features='byteorder,rustc-hex' - name: Test fixed-hash all-features uses: actions-rs/cargo@v1 @@ -79,7 +79,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --manifest-path primitive-types/Cargo.toml --no-default-features --features='scale-info,num-traits,serde_no_std' + args: -p primitive-types --no-default-features --features='scale-info,num-traits,serde_no_std' - name: Test primitive-types all-features uses: actions-rs/cargo@v1 @@ -91,7 +91,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --manifest-path ethereum-types/Cargo.toml --no-default-features --features='serialize,rlp' --target=wasm32-unknown-unknown + args: -p ethereum-types --no-default-features --features='serialize,rlp' --target=wasm32-unknown-unknown - name: Test ethereum-types all-features uses: actions-rs/cargo@v1 @@ -140,3 +140,4 @@ jobs: with: command: fmt args: --all -- --check + From 58d88cfc65dc0fb6e164c7d6220e122f3c8f31fa Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 30 Jun 2021 23:36:42 +0200 Subject: [PATCH 14/21] listen --- .github/workflows/ci.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 083e1fcb9..fddce34e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,10 +64,7 @@ jobs: args: -p uint --all-features - name: Test fixed-hash no_std - uses: actions-rs/cargo@v1 - with: - command: test - args: -p fixed-hash --no-default-features --features='byteorder,rustc-hex' + run: cargo test -p fixed-hash --no-default-features --features='byteorder,rustc-hex' - name: Test fixed-hash all-features uses: actions-rs/cargo@v1 @@ -76,10 +73,7 @@ jobs: args: -p fixed-hash --all-features - name: Test primitive-types no_std - uses: actions-rs/cargo@v1 - with: - command: test - args: -p primitive-types --no-default-features --features='scale-info,num-traits,serde_no_std' + run: cargo test -p primitive-types --no-default-features --features='scale-info,num-traits,serde_no_std' - name: Test primitive-types all-features uses: actions-rs/cargo@v1 @@ -88,10 +82,7 @@ jobs: args: -p primitive-types --all-features - name: Test ethereum-types no_std - uses: actions-rs/cargo@v1 - with: - command: test - args: -p ethereum-types --no-default-features --features='serialize,rlp' --target=wasm32-unknown-unknown + run: cargo test -p ethereum-types --no-default-features --features='serialize,rlp' --target=wasm32-unknown-unknown - name: Test ethereum-types all-features uses: actions-rs/cargo@v1 From 68abc0f974488e3e1dd071ccd4e4040120df63d6 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Thu, 1 Jul 2021 00:11:47 +0200 Subject: [PATCH 15/21] if you had --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fddce34e6..f7de6046f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,8 +81,8 @@ jobs: command: test args: -p primitive-types --all-features - - name: Test ethereum-types no_std - run: cargo test -p ethereum-types --no-default-features --features='serialize,rlp' --target=wasm32-unknown-unknown + - name: Build ethereum-types no_std + run: cargo build -p ethereum-types --no-default-features --features='serialize,rlp' --target=wasm32-unknown-unknown - name: Test ethereum-types all-features uses: actions-rs/cargo@v1 From c03cb445fa11d7469ac992fc0cf13283e70776be Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Thu, 1 Jul 2021 00:46:01 +0200 Subject: [PATCH 16/21] one shot --- .github/workflows/ci.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7de6046f..2e7367255 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,19 +102,33 @@ jobs: command: test args: -p parity-crypto --all-features - - name: Test parity-util-mem on Android + - name: Test uint on bigendian + if: runner.os == 'Linux' uses: actions-rs/cargo@v1 with: use-cross: true command: test - args: -p parity-util-mem --target=aarch64-linux-android + args: -p uint --target=mips64-unknown-linux-gnuabi64 - - name: Test uint on bigendian + - name: Test parity-util-mem on Android + if: runner.os == 'Linux' uses: actions-rs/cargo@v1 with: use-cross: true command: test - args: -p uint --target=mips64-unknown-linux-gnuabi64 + args: -p parity-util-mem --target=aarch64-linux-android + + - name: Test parity-util-mem estimate-heapsize + run: cargo test -p parity-util-mem --features='estimate-heapsize' + + - name: Test parity-util-mem jemalloc-global + run: cargo test -p parity-util-mem --features='jemalloc-global' + + - name: Test parity-util-mem mimalloc-global + run: cargo test -p parity-util-mem --features='mimalloc-global' + + - name: Test parity-util-mem dlmalloc-global + run: cargo test -p parity-util-mem --no-default-features --features='dlmalloc-global' fmt: name: Rustfmt @@ -131,4 +145,3 @@ jobs: with: command: fmt args: --all -- --check - From 709b9387e539de57b35230bca1d099db37c13a9d Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Thu, 1 Jul 2021 12:32:41 +0200 Subject: [PATCH 17/21] one opportunity --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e7367255..ceeaea977 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,6 +125,7 @@ jobs: run: cargo test -p parity-util-mem --features='jemalloc-global' - name: Test parity-util-mem mimalloc-global + if: runner.os != 'Windows' run: cargo test -p parity-util-mem --features='mimalloc-global' - name: Test parity-util-mem dlmalloc-global From 4148c2082c009ed62d5bb744150170a8d2d48dfd Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Thu, 1 Jul 2021 13:13:04 +0200 Subject: [PATCH 18/21] 5G --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ceeaea977..66b7e00af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,6 +129,7 @@ jobs: run: cargo test -p parity-util-mem --features='mimalloc-global' - name: Test parity-util-mem dlmalloc-global + if: runner.os != 'Windows' run: cargo test -p parity-util-mem --no-default-features --features='dlmalloc-global' fmt: From 83298b36f54e5c7966e5342351313c2cb0f16bad Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Thu, 1 Jul 2021 16:07:39 +0200 Subject: [PATCH 19/21] run CI on push to master as well --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66b7e00af..67cd68f5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,8 @@ -on: [pull_request] +on: + pull_request: + push: + branches: + - master name: Continuous integration From 8f7fde589b1251ff30a61a1acaa4a5127d3e495e Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Thu, 1 Jul 2021 16:29:39 +0200 Subject: [PATCH 20/21] review feedback --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67cd68f5d..b9d353dc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: check - args: --workspace --benches + args: --workspace --all-targets test: name: Test @@ -39,6 +39,9 @@ jobs: toolchain: stable override: true + - name: Rust Cache + uses: Swatinem/rust-cache@v1.3.0 + - name: Remove msys64 # Workaround to resolve link error with C:\msys64\mingw64\bin\libclang.dll if: runner.os == 'Windows' run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse From ca803cc9446236ad7fb14d486c411f290b9d23e0 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Thu, 1 Jul 2021 17:01:01 +0200 Subject: [PATCH 21/21] cache cargo check Co-authored-by: Denis Pisarev --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9d353dc7..2bebe3d07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,10 @@ jobs: profile: minimal toolchain: stable override: true + + - name: Rust Cache + uses: Swatinem/rust-cache@v1.3.0 + - uses: actions-rs/cargo@v1 with: command: check