From 46647078f33ff555b08cc681a2dc51444973a5f1 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Thu, 13 Jun 2024 13:15:32 +0200 Subject: [PATCH 1/4] ci: staking-miner-playground check only changed --- .github/workflows/ci.yml | 19 -------- .../workflows/staking-miner-playground.yml | 47 +++++++++++++++++++ 2 files changed, 47 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/staking-miner-playground.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a85527c6..b18f87e9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,25 +102,6 @@ jobs: ${{ env.RUST_INFO }} cargo hack check --workspace --each-feature --all-targets - check-staking-miner-playground: - name: Check staking-miner-playground - runs-on: ubuntu-latest - needs: [set-image] - container: ${{ needs.set-image.outputs.IMAGE }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Cache Rust dependencies - uses: swatinem/rust-cache@v2 - with: - key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }} - - - name: Check staking-miner-playground - run: | - ${{ env.RUST_INFO }} - cargo check --manifest-path staking-miner-playground/Cargo.toml - test: name: Run tests runs-on: ubuntu-latest diff --git a/.github/workflows/staking-miner-playground.yml b/.github/workflows/staking-miner-playground.yml new file mode 100644 index 000000000..8b5886d31 --- /dev/null +++ b/.github/workflows/staking-miner-playground.yml @@ -0,0 +1,47 @@ +name: Polkadot Staking Miner Playground CI + +on: + pull_request: + branches: + - main + paths: + - 'staking-miner-playground/**' + +env: + IMAGE: paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v20240408 + IMAGE_NAME: paritytech/polkadot-staking-miner + RUST_INFO: rustup show && cargo --version && rustup +nightly show && cargo +nightly --version + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + set-image: + # GitHub Actions does not allow using 'env' in a container context. + # This workaround sets the container image for each job using 'set-image' job output. + runs-on: ubuntu-latest + outputs: + IMAGE: ${{ steps.set_image.outputs.IMAGE }} + steps: + - id: set_image + run: echo "IMAGE=${{ env.IMAGE }}" >> $GITHUB_OUTPUT + + check: + name: Check staking-miner-playground + runs-on: ubuntu-latest + needs: [set-image] + container: ${{ needs.set-image.outputs.IMAGE }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Cache Rust dependencies + uses: swatinem/rust-cache@v2 + with: + key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }} + + - name: Check staking-miner-playground + run: | + ${{ env.RUST_INFO }} + cargo check --manifest-path staking-miner-playground/Cargo.toml From 64c0ae60f77414710303e6f854e213ab939b6742 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Thu, 13 Jun 2024 13:20:02 +0200 Subject: [PATCH 2/4] fix ci steps --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b18f87e9a..b0105e59b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,7 +162,6 @@ jobs: check-clippy, check-docs, check-cargo-hack, - check-staking-miner-playground, test, build] steps: @@ -202,7 +201,6 @@ jobs: check-clippy, check-docs, check-cargo-hack, - check-staking-miner-playground, test, build] steps: From d1ffb457491422dfec1a2447a8a17986c2fd9296 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Thu, 13 Jun 2024 13:27:32 +0200 Subject: [PATCH 3/4] update staking-miner-playground deps --- staking-miner-playground/Cargo.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/staking-miner-playground/Cargo.lock b/staking-miner-playground/Cargo.lock index 1ce094f53..7e5986613 100644 --- a/staking-miner-playground/Cargo.lock +++ b/staking-miner-playground/Cargo.lock @@ -583,7 +583,7 @@ checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", "rand 0.8.5", - "rand_core 0.6.4", + "rand_core 0.5.1", "serde", "unicode-normalization", ] @@ -2692,9 +2692,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ "bytes", "futures-channel", @@ -2707,7 +2707,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite 0.2.13", - "socket2 0.5.5", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -2724,7 +2724,7 @@ dependencies = [ "http", "hyper", "log", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs", "tokio", "tokio-rustls", @@ -3909,9 +3909,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -5633,9 +5633,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.7", @@ -6991,9 +6991,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" @@ -7068,9 +7068,9 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "snow" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58021967fd0a5eeeb23b08df6cc244a4d4a5b4aec1d27c9e02fad1a58b4cd74e" +checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85" dependencies = [ "aes-gcm", "blake2 0.10.6", @@ -8316,7 +8316,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", "tokio", ] From c587e27253b96039960b9518c0bb60db7f945fe9 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Thu, 13 Jun 2024 13:31:35 +0200 Subject: [PATCH 4/4] Update staking-miner-playground/Cargo.lock --- staking-miner-playground/Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staking-miner-playground/Cargo.lock b/staking-miner-playground/Cargo.lock index 7e5986613..43125971a 100644 --- a/staking-miner-playground/Cargo.lock +++ b/staking-miner-playground/Cargo.lock @@ -583,7 +583,7 @@ checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", "rand 0.8.5", - "rand_core 0.5.1", + "rand_core 0.6.4", "serde", "unicode-normalization", ]