From 1d6994702ebade7450cd418727ec8e2b073861c7 Mon Sep 17 00:00:00 2001 From: Brecht Devos Date: Tue, 2 Jul 2024 08:46:45 +0200 Subject: [PATCH] fix(raiko): run ci checks on merge queue (#305) * fix ci checks on merge queue * fix clippy --- .github/workflows/ci-all.yml | 2 ++ .github/workflows/ci-lint.yml | 1 + .github/workflows/ci-provers.yml | 2 ++ .github/workflows/ci-risc0.yml | 4 ++-- .github/workflows/ci-sgx-all.yml | 3 ++- .github/workflows/ci-sgx-docker.yml | 1 + .github/workflows/ci-sp1.yml | 1 + .github/workflows/openapi-deploy.yml | 1 + lib/src/utils.rs | 2 ++ 9 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-all.yml b/.github/workflows/ci-all.yml index 00c98701..dd39656f 100644 --- a/.github/workflows/ci-all.yml +++ b/.github/workflows/ci-all.yml @@ -12,6 +12,8 @@ on: - "host/**" - "lib/**" - "script/**" + merge_group: + env: CARGO_TERM_COLOR: always GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml index 0bc43b6c..c42d8363 100644 --- a/.github/workflows/ci-lint.yml +++ b/.github/workflows/ci-lint.yml @@ -3,6 +3,7 @@ name: CI - Lint on: pull_request: types: [opened, reopened, edited, synchronize] + merge_group: env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/ci-provers.yml b/.github/workflows/ci-provers.yml index 5bf3f3e0..16dd7cb1 100644 --- a/.github/workflows/ci-provers.yml +++ b/.github/workflows/ci-provers.yml @@ -11,6 +11,8 @@ on: paths: - "pipelines/**" - "harness/**" + merge_group: + env: CARGO_TERM_COLOR: always GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci-risc0.yml b/.github/workflows/ci-risc0.yml index bc0d95f2..f0590c02 100644 --- a/.github/workflows/ci-risc0.yml +++ b/.github/workflows/ci-risc0.yml @@ -1,6 +1,6 @@ name: CI - RISC0 -on: +on: workflow_call: push: branches: ["main"] @@ -9,7 +9,7 @@ on: pull_request: paths: - "provers/risc0/**" - + merge_group: jobs: build-test-risc0: diff --git a/.github/workflows/ci-sgx-all.yml b/.github/workflows/ci-sgx-all.yml index d08512cf..f3af7f9e 100644 --- a/.github/workflows/ci-sgx-all.yml +++ b/.github/workflows/ci-sgx-all.yml @@ -9,6 +9,7 @@ on: pull_request: paths: - "provers/sgx/**" + merge_group: jobs: build-test-sgx: @@ -21,7 +22,7 @@ jobs: build-test-sgx-docker: name: Build and test sgx with Docker uses: ./.github/workflows/ci-sgx-docker.yml - + build-test-sgx-hardware: name: Build and test sgx in hardware uses: ./.github/workflows/ci-sgx-hardware.yml diff --git a/.github/workflows/ci-sgx-docker.yml b/.github/workflows/ci-sgx-docker.yml index 0299738d..9e8f743b 100644 --- a/.github/workflows/ci-sgx-docker.yml +++ b/.github/workflows/ci-sgx-docker.yml @@ -9,6 +9,7 @@ on: pull_request: paths: - "docker/**" + merge_group: jobs: build-test-sgx-with-docker: diff --git a/.github/workflows/ci-sp1.yml b/.github/workflows/ci-sp1.yml index 6c0654b9..4da98dd7 100644 --- a/.github/workflows/ci-sp1.yml +++ b/.github/workflows/ci-sp1.yml @@ -9,6 +9,7 @@ on: pull_request: paths: - "provers/sp1/**" + merge_group: jobs: build-test-sgx: diff --git a/.github/workflows/openapi-deploy.yml b/.github/workflows/openapi-deploy.yml index a2737579..ee83ae59 100644 --- a/.github/workflows/openapi-deploy.yml +++ b/.github/workflows/openapi-deploy.yml @@ -4,6 +4,7 @@ on: push: branches: ["main"] pull_request: + merge_group: permissions: contents: read diff --git a/lib/src/utils.rs b/lib/src/utils.rs index fe9860a9..14ff9bff 100644 --- a/lib/src/utils.rs +++ b/lib/src/utils.rs @@ -12,6 +12,7 @@ use crate::consts::{ChainSpec, Network}; use crate::no_std::*; pub fn decode_transactions(tx_list: &[u8]) -> Vec { + #[allow(clippy::useless_asref)] Vec::::decode(&mut tx_list.as_ref()).unwrap_or_else(|e| { // If decoding fails we need to make an empty block println!("decode_transactions not successful: {e:?}, use empty tx_list"); @@ -25,6 +26,7 @@ fn validate_calldata_tx_list(tx_list: &[u8]) -> bool { } fn get_tx_list(chain_spec: &ChainSpec, is_blob_data: bool, tx_list: &[u8]) -> Vec { + #[allow(clippy::collapsible_else_if)] if chain_spec.is_taiko() { // taiko has some limitations to be aligned with taiko-client if is_blob_data {